Skip to content

Commit 3d129e4

Browse files
committed
fix: scala/kotlin smoke test compilation
1 parent fe253ee commit 3d129e4

File tree

10 files changed

+67
-5
lines changed

10 files changed

+67
-5
lines changed

dd-smoke-tests/iast-propagation/build.gradle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
2+
13
plugins {
24
id 'com.gradleup.shadow'
35
id 'java'
@@ -44,3 +46,7 @@ tasks.withType(ScalaCompile).configureEach {
4446
// * https://github.com/gradle/gradle/issues/19456
4547
configureCompiler(it, 8)
4648
}
49+
50+
tasks.withType(KotlinCompile).configureEach {
51+
compilerOptions.jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_1_8
52+
}

dd-smoke-tests/java9-modules/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jar {
1111
}
1212

1313
tasks.withType(JavaCompile).configureEach { JavaCompile jc ->
14-
configureCompiler(jc, 11, JavaVersion.VERSION_1_8)
14+
configureCompiler(jc, 11, JavaVersion.VERSION_1_9, "Need Java module support")
1515
// read up classpath lazily to avoid early locking of gradle settings
1616
jc.options.compilerArgumentProviders.add(new CommandLineArgumentProvider() {
1717
@Override

dd-smoke-tests/kafka-3/application/src/main/java/datadog/smoketest/kafka/iast/IastController.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ public class IastController {
3434

3535
public IastController(
3636
@Qualifier("iastStringTemplate")
37-
final ReplyingKafkaTemplate<String, String, String> stringTemplate,
37+
final ReplyingKafkaTemplate<String, String, String> stringTemplate,
3838
@Qualifier("iastByteArrayTemplate")
39-
final ReplyingKafkaTemplate<byte[], byte[], String> byteArrayTemplate,
39+
final ReplyingKafkaTemplate<byte[], byte[], String> byteArrayTemplate,
4040
@Qualifier("iastByteBufferTemplate")
41-
final ReplyingKafkaTemplate<ByteBuffer, ByteBuffer, String> byteBufferTemplate,
41+
final ReplyingKafkaTemplate<ByteBuffer, ByteBuffer, String> byteBufferTemplate,
4242
@Qualifier("iastJsonTemplate")
43-
final ReplyingKafkaTemplate<IastMessage, IastMessage, String> jsonTemplate) {
43+
final ReplyingKafkaTemplate<IastMessage, IastMessage, String> jsonTemplate) {
4444
this.stringTemplate = stringTemplate;
4545
this.byteArrayTemplate = byteArrayTemplate;
4646
this.byteBufferTemplate = byteBufferTemplate;

dd-smoke-tests/play-2.4/build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,14 @@ tasks.named("compileTestGroovy").configure {
7979
}
8080
}
8181

82+
tasks.withType(ScalaCompile).configureEach {
83+
// Despite the compatibility matrix, scala compiler doesn't properly
84+
// ger the right compiler flags with JDK11 toolchain. Using 8 works.
85+
// * https://docs.scala-lang.org/overviews/jdk-compatibility/overview.html
86+
// * https://github.com/gradle/gradle/issues/19456
87+
configureCompiler(it, 8)
88+
}
89+
8290
tasks.withType(AbstractCopyTask).each {
8391
// Don't know why the play plugin tries to copy the logback.xml file twice, but only accept it once
8492
it.configure {

dd-smoke-tests/play-2.5/build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,14 @@ tasks.named("compileTestGroovy").configure {
8181
}
8282
}
8383

84+
tasks.withType(ScalaCompile).configureEach {
85+
// Despite the compatibility matrix, scala compiler doesn't properly
86+
// ger the right compiler flags with JDK11 toolchain. Using 8 works.
87+
// * https://docs.scala-lang.org/overviews/jdk-compatibility/overview.html
88+
// * https://github.com/gradle/gradle/issues/19456
89+
configureCompiler(it, 8)
90+
}
91+
8492
tasks.withType(AbstractCopyTask).each {
8593
// Don't know why the play plugin tries to copy the logback.xml file twice, but only accept it once
8694
it.configure {

dd-smoke-tests/play-2.6/build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,14 @@ tasks.named('compileTestGroovy').configure {
8181
}
8282
}
8383

84+
tasks.withType(ScalaCompile).configureEach {
85+
// Despite the compatibility matrix, scala compiler doesn't properly
86+
// ger the right compiler flags with JDK11 toolchain. Using 8 works.
87+
// * https://docs.scala-lang.org/overviews/jdk-compatibility/overview.html
88+
// * https://github.com/gradle/gradle/issues/19456
89+
configureCompiler(it, 8)
90+
}
91+
8492
tasks.withType(AbstractCopyTask).each {
8593
// Don't know why the play plugin tries to copy the logback.xml file twice, but only accept it once
8694
it.configure {

dd-smoke-tests/play-2.7/build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,14 @@ tasks.named('compileTestGroovy').configure {
8181
}
8282
}
8383

84+
tasks.withType(ScalaCompile).configureEach {
85+
// Despite the compatibility matrix, scala compiler doesn't properly
86+
// ger the right compiler flags with JDK11 toolchain. Using 8 works.
87+
// * https://docs.scala-lang.org/overviews/jdk-compatibility/overview.html
88+
// * https://github.com/gradle/gradle/issues/19456
89+
configureCompiler(it, 8)
90+
}
91+
8492
tasks.withType(AbstractCopyTask).each {
8593
// Don't know why the play plugin tries to copy the logback.xml file twice, but only accept it once
8694
it.configure {

dd-smoke-tests/play-2.8-otel/build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,14 @@ tasks.named('compileTestGroovy').configure {
7777
}
7878
}
7979

80+
tasks.withType(ScalaCompile).configureEach {
81+
// Despite the compatibility matrix, scala compiler doesn't properly
82+
// ger the right compiler flags with JDK11 toolchain. Using 8 works.
83+
// * https://docs.scala-lang.org/overviews/jdk-compatibility/overview.html
84+
// * https://github.com/gradle/gradle/issues/19456
85+
configureCompiler(it, 8)
86+
}
87+
8088
tasks.withType(AbstractCopyTask).each {
8189
// Don't know why the play plugin tries to copy the logback.xml file twice, but only accept it once
8290
it.configure {

dd-smoke-tests/play-2.8-split-routes/build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,14 @@ tasks.named('compileTestGroovy').configure {
7777
}
7878
}
7979

80+
tasks.withType(ScalaCompile).configureEach {
81+
// Despite the compatibility matrix, scala compiler doesn't properly
82+
// ger the right compiler flags with JDK11 toolchain. Using 8 works.
83+
// * https://docs.scala-lang.org/overviews/jdk-compatibility/overview.html
84+
// * https://github.com/gradle/gradle/issues/19456
85+
configureCompiler(it, 8)
86+
}
87+
8088
tasks.withType(AbstractCopyTask).each {
8189
// Don't know why the play plugin tries to copy the logback.xml file twice, but only accept it once
8290
it.configure {

dd-smoke-tests/play-2.8/build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,14 @@ tasks.named('compileTestGroovy').configure {
8080
}
8181
}
8282

83+
tasks.withType(ScalaCompile).configureEach {
84+
// Despite the compatibility matrix, scala compiler doesn't properly
85+
// ger the right compiler flags with JDK11 toolchain. Using 8 works.
86+
// * https://docs.scala-lang.org/overviews/jdk-compatibility/overview.html
87+
// * https://github.com/gradle/gradle/issues/19456
88+
configureCompiler(it, 8)
89+
}
90+
8391
tasks.withType(AbstractCopyTask).each {
8492
// Don't know why the play plugin tries to copy the logback.xml file twice, but only accept it once
8593
it.configure {

0 commit comments

Comments
 (0)