Browse Source

Help out Intellij (#3595)

Trask Stalnaker 3 years ago
parent
commit
344e205720

+ 6 - 0
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"))
+}

+ 6 - 0
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"))
+}

+ 4 - 0
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 {

+ 4 - 0
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 {

+ 4 - 0
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"))
 }

+ 4 - 0
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"))
 }

+ 4 - 0
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"))
 }

+ 4 - 0
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