[release/v2.13.x] Compile opentelemetry-runtime-telemetry-java17 in Java 8 (#13402)

Co-authored-by: Jean Bisutti <jean.bisutti@gmail.com>
This commit is contained in:
otelbot[bot] 2025-02-26 22:40:18 +00:00 committed by GitHub
parent a57cfb0234
commit 4ae96cf5f3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 13 additions and 0 deletions

View File

@ -57,4 +57,17 @@ tasks {
dependsOn(testPS)
dependsOn(testSerial)
}
tasks {
compileJava {
// We compile this module for java 8 because it is used as a dependency in spring-boot-autoconfigure.
// If this module is compiled for java 17 then gradle can figure out based on the metadata that
// spring-boot-autoconfigure has a dependency that requires 17 and fails the build when it is used
// in a project that targets an earlier java version.
// https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/13384
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
options.release.set(null as Int?)
}
}
}