Skip to content

Commit

Permalink
draft
Browse files Browse the repository at this point in the history
Signed-off-by: Yauheni Khnykin <[email protected]>
  • Loading branch information
Hsilgos committed Dec 27, 2023
1 parent c060a81 commit ef7de06
Show file tree
Hide file tree
Showing 18 changed files with 63 additions and 38 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/functional-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Install JDK
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 17
- name: Cache Gradle packages
uses: actions/cache@v2
with:
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
- name: Install JDK
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 17
- name: Cache Gradle packages
uses: actions/cache@v2
with:
Expand Down Expand Up @@ -125,7 +125,7 @@ jobs:
- name: Install JDK
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 17
- name: Cache Gradle packages
uses: actions/cache@v2
with:
Expand Down Expand Up @@ -195,7 +195,7 @@ jobs:
- name: Install JDK
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 17
- name: Cache Gradle packages
uses: actions/cache@v2
with:
Expand Down Expand Up @@ -236,7 +236,7 @@ jobs:
- name: Install JDK
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 17
- name: Cache Gradle packages
uses: actions/cache@v2
with:
Expand Down Expand Up @@ -275,7 +275,7 @@ jobs:
- name: Install JDK
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 17
- name: Cache Gradle packages
uses: actions/cache@v2
with:
Expand Down Expand Up @@ -339,7 +339,7 @@ jobs:
- name: Install JDK
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 17
- name: Cache Gradle packages
uses: actions/cache@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Install JDK
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 17
- name: Cache Gradle packages
uses: actions/cache@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ buildscript {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21"
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.13.0"
classpath "com.diffplug.spotless:spotless-plugin-gradle:5.10.2"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.20"
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.21.0"
classpath "com.diffplug.spotless:spotless-plugin-gradle:6.22.0"

modules {
module("org.jetbrains.trove4j:trove4j") {
Expand All @@ -35,7 +35,7 @@ buildscript {
}
}
plugins {
id 'nebula.lint' version '16.9.0'
id 'nebula.lint' version '18.1.0'
}

allprojects {
Expand All @@ -61,12 +61,12 @@ allprojects {
}
compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
jvmTarget = "17"
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "1.8"
jvmTarget = "17"
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
6 changes: 3 additions & 3 deletions functional-tests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21"
classpath 'com.android.tools.build:gradle:8.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.20"

def gluecodiumVersion = project.hasProperty('gluecodiumVersion')
? project.property('gluecodiumVersion').toString().trim() : '+'

classpath "com.here.gluecodium:gluecodium-gradle:${gluecodiumVersion}"
classpath 'com.diffplug.spotless:spotless-plugin-gradle:5.10.2'
classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.22.0'

modules {
module("org.jetbrains.trove4j:trove4j") {
Expand Down
2 changes: 2 additions & 0 deletions functional-tests/functional/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ android {
ndkVersion rootProject.ndkVersion
compileSdkVersion rootProject.compileSdkVersion

namespace 'com.here.gluecodium.test.functional'

defaultConfig {
minSdkVersion rootProject.minSdkVersion
targetSdkVersion rootProject.targetSdkVersion
Expand Down
2 changes: 1 addition & 1 deletion functional-tests/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
1 change: 1 addition & 0 deletions functional-tests/namerules/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def getCMakeCommonParameters() {
android {
ndkVersion rootProject.ndkVersion
compileSdkVersion rootProject.compileSdkVersion
namespace 'com.here.gluecodium.test.namerules'

defaultConfig {
minSdkVersion rootProject.minSdkVersion
Expand Down
6 changes: 3 additions & 3 deletions gluecodium/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ jacocoTestCoverageVerification {
}
jacocoTestReport {
reports {
csv.enabled true
html.enabled true
xml.enabled true
csv.required = true
html.required = true
xml.required = true

csv.destination file("${buildDir}/reports/coverage/coverageReport.csv")
html.destination file("${buildDir}/reports/coverage/html")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ abstract class CommentsProcessor(
hasErrorFlag = true
}
val codeBlockHandler = VisitHandler(Code::class.java) {
if (it.text.toString() == standardNullReference) {
if (it.text.toString() == STANDART_NULL_REFERENCE) {
it.text = CharSubSequence.of(nullReference)
}
}
Expand Down Expand Up @@ -105,9 +105,9 @@ abstract class CommentsProcessor(
open fun processAutoLink(linkNode: AutoLink) {}
open fun postRenderDocument(renderedDocument: String): String = renderedDocument

open val nullReference = standardNullReference
open val nullReference = STANDART_NULL_REFERENCE

companion object {
private const val standardNullReference = "null"
private const val STANDART_NULL_REFERENCE = "null"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import org.trimou.handlebars.Options
internal class CapitalizeHelper : BasicHelper() {
override fun execute(options: Options) {
if (options.parameters.isNotEmpty()) {
options.append((options.parameters[0].toString()).capitalize())
options.append((options.parameters[0].toString()).replaceFirstChar(Char::titlecase))
}
}
}
2 changes: 1 addition & 1 deletion gluecodium/src/main/resources/version.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = 13.7.2
version = 13.7.3
4 changes: 2 additions & 2 deletions gradle/publishing.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ group = 'com.here.gluecodium'

task sourcesJar(type: Jar) {
from sourceSets.main.allJava
classifier = 'sources'
archiveClassifier = 'sources'
}

task javadocJar(type: Jar) {
from javadoc
classifier = 'javadoc'
archiveClassifier = 'javadoc'
}

publishing.publications {
Expand Down
3 changes: 2 additions & 1 deletion gradle/spotless.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spotless {
endWithNewline()
}
kotlin {
ktlint("0.40.0")
ktlint("1.1.0")
licenseHeaderFile rootProject.file('config/spotless/here_java.license')
}
format 'misc', {
Expand All @@ -44,6 +44,7 @@ spotless {
format 'mustache', {
target project.fileTree(project.projectDir) {
include '**/*.mustache'
exclude '**/build*'
}
licenseHeaderFile rootProject.file('config/spotless/here_mustache.license'), /(?!\{\{!!$| !).*/
}
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
28 changes: 24 additions & 4 deletions lime-loader/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,19 @@ plugins {
}

dependencies {
//antlr "org.antlr:antlr4:4.13.1"
antlr "org.antlr:antlr4:4.9.1"
api project(":lime-runtime")
implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.6.21'
implementation "org.antlr:antlr4-runtime:4.9.1"
implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.6.21'
implementation "org.antlr:antlr4-runtime:4.9.1"
// implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.9.20'
// implementation "org.antlr:antlr4-runtime:4.13.1"

testImplementation files({ project(":lime-runtime").sourceSets.test.output })
testImplementation 'io.mockk:mockk-dsl-jvm:1.12.5'
testImplementation 'io.mockk:mockk:1.12.5'
testImplementation 'io.mockk:mockk-dsl-jvm:1.12.5'
testImplementation 'io.mockk:mockk:1.12.5'
// testImplementation 'io.mockk:mockk-dsl-jvm:1.13.8'
// testImplementation 'io.mockk:mockk:1.13.8'
testImplementation 'junit:junit:4.13.2'
}

Expand Down Expand Up @@ -43,6 +48,21 @@ javadoc {
exclude 'com/here/gluecodium/antlr/**'
}

tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
dependsOn(tasks.withType(AntlrTask))
}

// tasks.configureEach { task ->
// if (task.name == 'generateAntlrGeneratedGrammarSource') {
// task.dependsOn('compileAntlrGeneratedKotlin')
// }
// if (task.name == 'generateGrammarSource') {
// task.dependsOn('compileAntlrGeneratedKotlin')
// task.dependsOn('compileAntlrGeneratedJava')
// task.dependsOn('sourcesJar')
// }
// }

apply from: "$rootDir/gradle/spotless.gradle"

spotless {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ import java.util.Locale
import java.util.function.BiFunction
import java.util.function.Function

class CaseInsensitiveMap<V : Any /* mark as non-nullable */> : HashMap<String, V>() {
// Mark `Any` as non-nullable
class CaseInsensitiveMap<V : Any> : HashMap<String, V>() {
override fun compute(key: String, remappingFunction: BiFunction<in String, in V?, out V?>) =
super.compute(key.lowercase(Locale.getDefault()), remappingFunction)

Expand Down

0 comments on commit ef7de06

Please sign in to comment.