Configure kotlin directly in only project that uses it and enable testLatestDeps (#3081)

This commit is contained in:
Anuraag Agrawal 2021-05-26 09:58:52 +09:00 committed by GitHub
parent d755654c29
commit 5f373b3062
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 14 additions and 16 deletions

View File

@ -19,8 +19,6 @@ ext {
logback : "1.2.3",
bytebuddy : "1.10.18", // Also explicitly specified in buildSrc
scala : "2.11.12",
kotlin : "1.4.0",
coroutines : "1.3.0",
springboot : "2.3.1.RELEASE",
junit5 : "5.7.1",
checkerFramework : "3.6.1",
@ -100,8 +98,6 @@ ext {
"org.slf4j:jul-to-slf4j:${versions.slf4j}",
],
scala : "org.scala-lang:scala-library:${versions.scala}",
kotlin : "org.jetbrains.kotlin:kotlin-stdlib:${versions.kotlin}",
coroutines : "org.jetbrains.kotlinx:kotlinx-coroutines-core:${versions.coroutines}",
junitApi : "org.junit.jupiter:junit-jupiter-api:${versions.junit5}",
assertj : "org.assertj:assertj-core:${versions.assertj}",
awaitility : "org.awaitility:awaitility:${versions.awaitility}",

View File

@ -1,8 +0,0 @@
// Enable testing kotlin code in groovy spock tests.
apply plugin: 'org.jetbrains.kotlin.jvm'
tasks.named('compileTestGroovy').configure {
//Note: look like it should be `classpath += files(sourceSets.test.kotlin.classesDirectory)`
//instead, but kotlin plugin doesn't support it (yet?)
classpath += files(compileTestKotlin.destinationDir)
}

View File

@ -8,7 +8,6 @@ buildscript {
dependencies {
classpath "net.bytebuddy:byte-buddy-gradle-plugin:${versions.bytebuddy}"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}"
}
}
plugins {

View File

@ -1,5 +1,8 @@
plugins {
id 'org.jetbrains.kotlin.jvm'
}
apply from: "$rootDir/gradle/instrumentation.gradle"
apply from: "$rootDir/gradle/test-with-kotlin.gradle"
muzzle {
pass {
@ -18,6 +21,13 @@ dependencies {
compileOnly deps.opentelemetryKotlin
testImplementation deps.opentelemetryKotlin
testImplementation deps.kotlin
testImplementation deps.coroutines
testImplementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
// Use first version with flow support since we have tests for it.
testLibrary "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.0"
}
tasks.named('compileTestGroovy').configure {
//Note: look like it should be `classpath += files(sourceSets.test.kotlin.classesDirectory)`
//instead, but kotlin plugin doesn't support it (yet?)
classpath += files(compileTestKotlin.destinationDir)
}

View File

@ -7,6 +7,7 @@ pluginManagement {
id "io.github.gradle-nexus.publish-plugin" version "1.0.0"
id "me.champeau.jmh" version "0.6.4"
id "net.ltgt.errorprone" version "1.3.0"
id 'org.jetbrains.kotlin.jvm' version '1.5.10'
id 'org.unbroken-dome.test-sets' version '4.0.0'
id "nebula.release" version "15.3.0"
id 'org.gradle.test-retry' version '1.2.0'