Skip to content

Commit

Permalink
Kotlin specific compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
jjohannes committed Dec 4, 2023
1 parent 98f2d6c commit 40e6501
Show file tree
Hide file tree
Showing 13 changed files with 29 additions and 5 deletions.
9 changes: 6 additions & 3 deletions app/build.gradle.kts
Expand Up @@ -3,7 +3,7 @@ plugins {
}

application {
mainClass.set("org.example.product.app.Application")
mainClass.set("org.example.product.app.ApplicationKt")
}

dependencies {
Expand All @@ -17,16 +17,19 @@ dependencies {
implementation(project(":tatooine"))
implementation("com.google.inject.extensions:guice-servlet")
implementation("com.google.inject:guice")
implementation("org.jetbrains.kotlin:kotlin-stdlib")
implementation("org.slf4j:slf4j-api")

mockApiApi("com.google.guava:guava")
mockApiApi("org.jetbrains.kotlin:kotlin-stdlib")
mockApiImplementation(project(path))
mockApiImplementation("com.google.guava:guava")

testImplementation("org.junit.jupiter:junit-jupiter-api")

endToEndTestApi("org.jetbrains.kotlin:kotlin-stdlib")
endToEndTestApi("org.junit.jupiter:junit-jupiter-api")
endToEndTestImplementation(project(path)) { capabilities { requireCapabilities("${project.group}:${project.name}-mock-api") } }
endToEndTestImplementation("com.google.guava:guava")
endToEndTestImplementation("org.junit.jupiter:junit-jupiter-api")

runtimeOnly("org.slf4j:slf4j-simple")
}
1 change: 1 addition & 0 deletions bespin/build.gradle.kts
Expand Up @@ -4,6 +4,7 @@ plugins {

dependencies {
api(project(":corellia"))
api("org.jetbrains.kotlin:kotlin-stdlib")

implementation(project(":coruscant"))
implementation("org.apache.velocity:velocity-engine-core")
Expand Down
1 change: 1 addition & 0 deletions corellia/build.gradle.kts
Expand Up @@ -4,6 +4,7 @@ plugins {

dependencies {
api("org.apache.poi:poi")
api("org.jetbrains.kotlin:kotlin-stdlib")

implementation("commons-io:commons-io")
implementation("org.apache.poi:poi-ooxml")
Expand Down
1 change: 1 addition & 0 deletions coruscant/build.gradle.kts
Expand Up @@ -7,6 +7,7 @@ dependencies {
api("com.fasterxml.jackson.core:jackson-databind")
api("com.google.guava:guava")
api("jakarta.inject:jakarta.inject-api")
api("org.jetbrains.kotlin:kotlin-stdlib")
api("org.json:json")
api("org.opensaml:opensaml")

Expand Down
3 changes: 3 additions & 0 deletions gradle.properties
Expand Up @@ -6,3 +6,6 @@ org.gradle.configuration-cache=true

# activate Gradle build cache - switch between branches/commits without rebuilding every time
org.gradle.caching=true

# control Kotlin standard library dependencies (and their scope) ourselves
kotlin.stdlib.default.dependency=false
Expand Up @@ -6,4 +6,5 @@ dependencies {
implementation(platform(project(":plugins-platform")))

implementation("com.autonomousapps:dependency-analysis-gradle-plugin")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin") // required for 'dependency-analysis-gradle-plugin' + Kotlin. See: https://github.com/autonomousapps/dependency-analysis-android-gradle-plugin/issues/432
}
1 change: 1 addition & 0 deletions gradle/plugins/kotlin-base-plugins/build.gradle.kts
Expand Up @@ -6,4 +6,5 @@ dependencies {
implementation(platform(project(":plugins-platform")))

implementation(project(":base-plugins"))
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin")
}
@@ -1,18 +1,25 @@
plugins {
id("java")
id("org.jetbrains.kotlin.jvm")
id("jacoco") // Record test coverage data during test execution
id("org.example.base")
id("org.example.consistent-resolution")
id("org.example.dependency-analysis-project")
}

// Configure Java compilation on java {} extension or directly on 'JavaCompile' tasks
// Configure Java/Kotlin compilation on java/kotlin {} extension or directly on 'JavaCompile' tasks
val javaLanguageVersion = JavaLanguageVersion.of(17)
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
toolchain.languageVersion.set(javaLanguageVersion)
}
tasks.withType<JavaCompile>().configureEach {
options.encoding = "UTF-8"
}
kotlin {
jvmToolchain {
languageVersion.set(javaLanguageVersion)
}
}

// Configure details for *all* test executions directly on 'Test' task
tasks.withType<Test>().configureEach {
Expand Down
1 change: 1 addition & 0 deletions gradle/plugins/plugins-platform/build.gradle.kts
Expand Up @@ -7,5 +7,6 @@ dependencies.constraints {
api("dev.jacomet.gradle.plugins:logging-capabilities:0.11.1")
api("io.fuchs.gradle.classpath-collision-detector:classpath-collision-detector:0.3")
api("org.gradlex:java-ecosystem-capabilities:1.3.1")
api("org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21")
api("org.owasp:dependency-check-gradle:9.0.2")
}
1 change: 1 addition & 0 deletions kamino/build.gradle.kts
Expand Up @@ -5,6 +5,7 @@ plugins {
dependencies {
api(project(":coruscant"))
api("org.jboss.resteasy:resteasy-core")
api("org.jetbrains.kotlin:kotlin-stdlib")

implementation("org.jboss.resteasy:resteasy-guice")
implementation("org.jboss.resteasy:resteasy-jackson2-provider")
Expand Down
1 change: 1 addition & 0 deletions kashyyyk/build.gradle.kts
Expand Up @@ -5,6 +5,7 @@ plugins {
dependencies {
api(project(":naboo"))
api(project(":tatooine"))
api("org.jetbrains.kotlin:kotlin-stdlib")

implementation(project(":bespin"))
implementation(project(":kamino"))
Expand Down
2 changes: 2 additions & 0 deletions naboo/build.gradle.kts
Expand Up @@ -3,6 +3,8 @@ plugins {
}

dependencies {
api("org.jetbrains.kotlin:kotlin-stdlib")

implementation("org.apache.solr:solr-solrj")
implementation("org.apache.zookeeper:zookeeper-jute")

Expand Down
1 change: 1 addition & 0 deletions tatooine/build.gradle.kts
Expand Up @@ -4,6 +4,7 @@ plugins {

dependencies {
api("com.github.racc:typesafeconfig-guice")
api("org.jetbrains.kotlin:kotlin-stdlib")

implementation("org.apache.zookeeper:zookeeper")

Expand Down

0 comments on commit 40e6501

Please sign in to comment.