Skip to content

Fix using opentelemetry-spring-boot with java8 #10066

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Comment on lines +21 to +24
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very interesting, gradle being too smart for us...

cc @jeanbisutti @zeitlinger

// https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/9949
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
options.release.set(null as Int?)
}
}