File tree Expand file tree Collapse file tree 3 files changed +22
-3
lines changed
Expand file tree Collapse file tree 3 files changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -17,8 +17,8 @@ subprojects {
1717 apply (from = " $rootDir /gradle/spotless.gradle" )
1818 pluginManager.withPlugin(" java-library" ) {
1919 configure<JavaPluginExtension > {
20- sourceCompatibility = JavaVersion .VERSION_11
21- targetCompatibility = JavaVersion .VERSION_11
20+ sourceCompatibility = JavaVersion .VERSION_1_8
21+ targetCompatibility = JavaVersion .VERSION_1_8
2222 }
2323
2424 repositories {
Original file line number Diff line number Diff line change @@ -38,6 +38,15 @@ dependencies {
3838 implementation(" io.opentelemetry.javaagent:opentelemetry-javaagent-extension-api" )
3939 implementation(" io.opentelemetry.instrumentation:opentelemetry-instrumentation-api" )
4040 implementation(" io.opentelemetry.javaagent:opentelemetry-javaagent-tooling" ) {
41+ constraints {
42+ implementation(" io.opentelemetry.javaagent:opentelemetry-javaagent-tooling-java9" ) {
43+ attributes {
44+ // this transitive dependency creates classes compatible with Java 9 and up, but is only referenced in safe ways for
45+ // java 8 by the javaagent-tooling dependency
46+ attribute(Attribute .of(" org.gradle.jvm.version" , Integer ::class .java), 9 as Integer )
47+ }
48+ }
49+ }
4150 exclude(" io.opentelemetry.javaagent" , " opentelemetry-javaagent-bootstrap" )
4251 }
4352
Original file line number Diff line number Diff line change @@ -20,7 +20,17 @@ dependencies {
2020 testFixturesApi(" com.squareup.okhttp3:logging-interceptor:4.9.0" )
2121 testFixturesImplementation(" io.opentelemetry:opentelemetry-exporter-logging" )
2222 testFixturesImplementation(" io.opentelemetry.javaagent:opentelemetry-javaagent-bootstrap" )
23- testFixturesImplementation(" io.opentelemetry.javaagent:opentelemetry-javaagent-tooling" )
23+ testFixturesImplementation(" io.opentelemetry.javaagent:opentelemetry-javaagent-tooling" ) {
24+ constraints {
25+ testFixturesImplementation(" io.opentelemetry.javaagent:opentelemetry-javaagent-tooling-java9" ) {
26+ attributes {
27+ // this transitive dependency creates classes compatible with Java 9 and up, but is only referenced in safe ways for
28+ // java 8 by the javaagent-tooling dependency
29+ attribute(Attribute .of(" org.gradle.jvm.version" , Integer ::class .java), 9 as Integer )
30+ }
31+ }
32+ }
33+ }
2434 testFixturesImplementation(" io.opentelemetry.javaagent:opentelemetry-javaagent-extension-api" )
2535 testFixturesImplementation(" io.opentelemetry.instrumentation:opentelemetry-instrumentation-api" )
2636 testFixturesImplementation(" ch.qos.logback:logback-classic:1.4.6" )
You can’t perform that action at this time.
0 commit comments