Simplify groovy/scala/kotlin compile dependency hack
MODIFY
dd-java-agent/instrumentation/java-concurrent/java-concurrent.gradle
dd-java-agent/instrumentation/java-concurrent/java-concurrent.gradle
apply from: "${rootDir}/gradle/java.gradle"
apply from: "${rootDir}/gradle/test-with-scala.gradle"
-apply from: "${rootDir}/gradle/test-with-kotlin.gradle"
apply plugin: 'org.unbroken-dome.test-sets'
@@ -16,8 +15,7 @@ testSets {
}
compileSlickTestGroovy {
- classpath = classpath.plus(files(compileSlickTestScala.destinationDir))
- dependsOn compileSlickTestScala
+ classpath += files(sourceSets.slickTest.scala.classesDirectory)
}
dependencies {

MODIFY
gradle/test-with-kotlin.gradle
gradle/test-with-kotlin.gradle
apply plugin: 'kotlin'
compileTestGroovy {
- classpath = classpath.plus(files(compileTestKotlin.destinationDir))
- dependsOn compileTestKotlin
+ //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)
}

MODIFY
gradle/test-with-scala.gradle
gradle/test-with-scala.gradle
@@ -13,6 +13,5 @@ configurations {
}
compileTestGroovy {
- classpath = classpath.plus(files(compileTestScala.destinationDir))
- dependsOn compileTestScala
+ classpath += files(sourceSets.test.scala.classesDirectory)
}

Simplify groovy/scala/kotlin compile dependency hack