Skip to content

Commit

Permalink
Fix using opentelemetry-spring-boot with java8 (#10066)
Browse files Browse the repository at this point in the history
  • Loading branch information
laurit authored Dec 13, 2023
1 parent 172b2a4 commit ad16ba8
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,16 @@ dependencies {
otelJava {
minJavaVersionSupported.set(JavaVersion.VERSION_17)
}

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/9949
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
options.release.set(null as Int?)
}
}

0 comments on commit ad16ba8

Please sign in to comment.