Skip to content

Commit 4ae96cf

Browse files
[release/v2.13.x] Compile opentelemetry-runtime-telemetry-java17 in Java 8 (#13402)
Co-authored-by: Jean Bisutti <[email protected]>
1 parent a57cfb0 commit 4ae96cf

File tree

1 file changed

+13
-0
lines changed
  • instrumentation/runtime-telemetry/runtime-telemetry-java17/library

1 file changed

+13
-0
lines changed

instrumentation/runtime-telemetry/runtime-telemetry-java17/library/build.gradle.kts

+13
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,17 @@ tasks {
5757
dependsOn(testPS)
5858
dependsOn(testSerial)
5959
}
60+
61+
tasks {
62+
compileJava {
63+
// We compile this module for java 8 because it is used as a dependency in spring-boot-autoconfigure.
64+
// If this module is compiled for java 17 then gradle can figure out based on the metadata that
65+
// spring-boot-autoconfigure has a dependency that requires 17 and fails the build when it is used
66+
// in a project that targets an earlier java version.
67+
// https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/13384
68+
sourceCompatibility = "1.8"
69+
targetCompatibility = "1.8"
70+
options.release.set(null as Int?)
71+
}
72+
}
6073
}

0 commit comments

Comments
 (0)