Help out Intellij
MODIFY
buildSrc/src/main/kotlin/otel.javaagent-instrumentation.gradle.kts
buildSrc/src/main/kotlin/otel.javaagent-instrumentation.gradle.kts
@@ -8,3 +8,9 @@ plugins {
extra["mavenGroupId"] = "io.opentelemetry.javaagent.instrumentation"
base.archivesName.set(projectDir.parentFile.name)
+
+dependencies {
+ // this only exists to make Intellij happy since it doesn't (currently at least) understand our
+ // inclusion of this artifact inside of :instrumentation-api
+ compileOnly(project(":instrumentation-api-caching"))
+}

MODIFY
buildSrc/src/main/kotlin/otel.library-instrumentation.gradle.kts
buildSrc/src/main/kotlin/otel.library-instrumentation.gradle.kts
@@ -9,3 +9,9 @@ plugins {
extra["mavenGroupId"] = "io.opentelemetry.instrumentation"
base.archivesName.set(projectDir.parentFile.name)
+
+dependencies {
+ // this only exists to make Intellij happy since it doesn't (currently at least) understand our
+ // inclusion of this artifact inside of :instrumentation-api
+ compileOnly(project(":instrumentation-api-caching"))
+}

MODIFY
instrumentation/build.gradle.kts
instrumentation/build.gradle.kts
@@ -29,6 +29,10 @@ dependencies {
compileOnly(project(":javaagent-instrumentation-api"))
implementation(project(":javaagent-tooling"))
implementation(project(":javaagent-extension-api"))
+
+ // this only exists to make Intellij happy since it doesn't (currently at least) understand our
+ // inclusion of this artifact inside of :instrumentation-api
+ compileOnly(project(":instrumentation-api-caching"))
}
configurations {

MODIFY
instrumentation/spring/spring-boot-autoconfigure/build.gradle.kts
instrumentation/spring/spring-boot-autoconfigure/build.gradle.kts
@@ -52,6 +52,10 @@ dependencies {
testImplementation("io.grpc:grpc-api:1.30.2")
testImplementation("io.grpc:grpc-netty-shaded:1.30.2")
testImplementation(project(":instrumentation-api-annotation-support"))
+
+ // this only exists to make Intellij happy since it doesn't (currently at least) understand our
+ // inclusion of this artifact inside of :instrumentation-api
+ compileOnly(project(":instrumentation-api-caching"))
}
tasks.compileTestJava {

MODIFY
javaagent-bootstrap/build.gradle.kts
javaagent-bootstrap/build.gradle.kts
@@ -12,4 +12,8 @@ dependencies {
testImplementation(project(":testing-common"))
testImplementation("org.mockito:mockito-core")
testImplementation("org.assertj:assertj-core")
+
+ // this only exists to make Intellij happy since it doesn't (currently at least) understand our
+ // inclusion of this artifact inside of :instrumentation-api
+ compileOnly(project(":instrumentation-api-caching"))
}

MODIFY
javaagent-extension-api/build.gradle.kts
javaagent-extension-api/build.gradle.kts
@@ -15,4 +15,8 @@ dependencies {
// metrics are unstable, do not expose as api
implementation("io.opentelemetry:opentelemetry-sdk-metrics")
+
+ // this only exists to make Intellij happy since it doesn't (currently at least) understand our
+ // inclusion of this artifact inside of :instrumentation-api
+ compileOnly(project(":instrumentation-api-caching"))
}

MODIFY
javaagent-instrumentation-api/build.gradle.kts
javaagent-instrumentation-api/build.gradle.kts
@@ -18,4 +18,8 @@ dependencies {
testImplementation("org.mockito:mockito-core")
testImplementation("org.mockito:mockito-junit-jupiter")
testImplementation("org.assertj:assertj-core")
+
+ // this only exists to make Intellij happy since it doesn't (currently at least) understand our
+ // inclusion of this artifact inside of :instrumentation-api
+ compileOnly(project(":instrumentation-api-caching"))
}

MODIFY
javaagent-tooling/build.gradle.kts
javaagent-tooling/build.gradle.kts
@@ -38,6 +38,10 @@ dependencies {
testImplementation("org.assertj:assertj-core")
testImplementation("org.mockito:mockito-core")
testImplementation("org.mockito:mockito-junit-jupiter")
+
+ // this only exists to make Intellij happy since it doesn't (currently at least) understand our
+ // inclusion of this artifact inside of :instrumentation-api
+ compileOnly(project(":instrumentation-api-caching"))
}
// Here we only include autoconfigure but don"t include OTLP exporters to ensure they are only in

Help out Intellij (#3595)