diff --git a/.github/workflows/master-build.yml b/.github/workflows/master-build.yml index 6b00e2c78ea..11b41bd71d4 100644 --- a/.github/workflows/master-build.yml +++ b/.github/workflows/master-build.yml @@ -36,7 +36,7 @@ jobs: - uses: burrunan/gradle-cache-action@v1.6 with: remote-build-cache-proxy-enabled: false - arguments: build --stacktrace ${{ matrix.coverage && ':opentelemetry-all:jacocoTestReport' || '' }} + arguments: build --stacktrace ${{ matrix.coverage && 'jacocoTestReport' || '' }} properties: | testAdditionalJavaVersions=${{ matrix.testAdditionalJavaVersions }} org.gradle.java.installations.paths=${{ steps.setup-java-8.outputs.path }},${{ steps.setup-java-11.outputs.path }} diff --git a/.github/workflows/pr-build.yml b/.github/workflows/pr-build.yml index dd3523d30b7..911da54c1d4 100644 --- a/.github/workflows/pr-build.yml +++ b/.github/workflows/pr-build.yml @@ -36,7 +36,7 @@ jobs: - uses: burrunan/gradle-cache-action@v1.6 with: remote-build-cache-proxy-enabled: false - arguments: build --stacktrace ${{ matrix.coverage && ':opentelemetry-all:jacocoTestReport' || '' }} + arguments: build --stacktrace ${{ matrix.coverage && 'jacocoTestReport' || '' }} properties: | testAdditionalJavaVersions=${{ matrix.testAdditionalJavaVersions }} org.gradle.java.installations.paths=${{ steps.setup-java-8.outputs.path }},${{ steps.setup-java-11.outputs.path }} diff --git a/api/all/build.gradle b/api/all/build.gradle index 5eb65585124..92e66e12d40 100644 --- a/api/all/build.gradle +++ b/api/all/build.gradle @@ -8,12 +8,13 @@ plugins { description = 'OpenTelemetry API' ext.moduleName = "io.opentelemetry.api" +archivesBaseName = "opentelemetry-api" dependencies { - api project(':opentelemetry-context'), - project(':opentelemetry-api-baggage'), - project(':opentelemetry-api-common'), - project(':opentelemetry-api-trace') + api project(':api:context'), + project(':api:baggage'), + project(':api:common'), + project(':api:trace') annotationProcessor libraries.auto_value diff --git a/api/baggage/build.gradle b/api/baggage/build.gradle index 20c2fcea1db..769ddb45317 100644 --- a/api/baggage/build.gradle +++ b/api/baggage/build.gradle @@ -10,8 +10,8 @@ description = 'OpenTelemetry API' ext.moduleName = "io.opentelemetry.api" dependencies { - api project(':opentelemetry-context'), - project(':opentelemetry-api-common') + api project(':api:context'), + project(':api:common') annotationProcessor libraries.auto_value diff --git a/api/build.gradle b/api/build.gradle new file mode 100644 index 00000000000..5b43e6fae6a --- /dev/null +++ b/api/build.gradle @@ -0,0 +1,7 @@ +subprojects { + // Workaround https://github.com/gradle/gradle/issues/847 + group = "io.opentelemetry.api" + plugins.withId("java") { + archivesBaseName = "opentelemetry-api-${project.name}" + } +} diff --git a/api/context/build.gradle b/api/context/build.gradle index a7db4ebb636..008699610f4 100644 --- a/api/context/build.gradle +++ b/api/context/build.gradle @@ -9,6 +9,7 @@ plugins { description = "OpenTelemetry Context (Incubator)" ext.moduleName = "io.opentelemetry.context" +archivesBaseName = "opentelemetry-context" testSets { grpcInOtelTest diff --git a/api/metrics/build.gradle b/api/metrics/build.gradle index 73bbfae1063..fad8ae5e177 100644 --- a/api/metrics/build.gradle +++ b/api/metrics/build.gradle @@ -10,8 +10,8 @@ description = 'OpenTelemetry API' ext.moduleName = "io.opentelemetry.api.metrics" dependencies { - api project(':opentelemetry-context'), - project(':opentelemetry-api-common') + api project(':api:context'), + project(':api:common') annotationProcessor libraries.auto_value diff --git a/api/trace/build.gradle b/api/trace/build.gradle index 143d519e921..dcb2b666ef9 100644 --- a/api/trace/build.gradle +++ b/api/trace/build.gradle @@ -10,8 +10,8 @@ description = 'OpenTelemetry API' ext.moduleName = "io.opentelemetry.api.trace" dependencies { - api project(':opentelemetry-context'), - project(':opentelemetry-api-common') + api project(':api:context'), + project(':api:common') annotationProcessor libraries.auto_value diff --git a/bom/build.gradle b/bom/build.gradle index 6bf9c8f0854..43a33df8d87 100644 --- a/bom/build.gradle +++ b/bom/build.gradle @@ -6,15 +6,18 @@ plugins { description = 'OpenTelemetry Bill of Materials' group = "io.opentelemetry" -dependencies { - constraints { - parent.childProjects.sort { "$it.value" } - .collect { it.value } - .findAll { it.name != project.name } - .findAll { !it.name.endsWith('-metrics') } - .each { project -> - api project - println project - } +afterEvaluate { + dependencies { + constraints { + rootProject.subprojects.sort { "$it.archivesBaseName" } + .collect { it } + .findAll { it.name != project.name } + .findAll { !it.name.endsWith('metrics') } + .each { project -> + project.plugins.withId("maven-publish") { + api project + } + } + } } -} +} \ No newline at end of file diff --git a/build.gradle b/build.gradle index 5b7f2ed3b1b..ff1bca97e2c 100644 --- a/build.gradle +++ b/build.gradle @@ -50,6 +50,8 @@ subprojects { plugins.apply('com.diffplug.spotless') plugins.apply('net.ltgt.errorprone') + archivesBaseName = "opentelemetry-${project.name}" + repositories { mavenCentral() jcenter() @@ -432,10 +434,13 @@ subprojects { publishing { publications { mavenPublication(MavenPublication) { - version project.name.endsWith('-metrics') ? "${version}".replaceFirst(/^(\d+)\.(\d+).(\d+)/) { _, major, minor, patch -> + version project.name.endsWith('metrics') ? "${version}".replaceFirst(/^(\d+)\.(\d+).(\d+)/) { _, major, minor, patch -> "${major}.${minor}.${patch}-alpha" } : version - groupId group + groupId "io.opentelemetry" + afterEvaluate { + artifactId = archivesBaseName + } plugins.withId("java-platform") { from(components["javaPlatform"]) diff --git a/exporters/build.gradle b/exporters/build.gradle new file mode 100644 index 00000000000..513260d56ef --- /dev/null +++ b/exporters/build.gradle @@ -0,0 +1,7 @@ +subprojects { + // https://github.com/gradle/gradle/issues/847 + group = "io.opentelemetry.exporters" + plugins.withId("java") { + archivesBaseName = "opentelemetry-exporter-${project.name}" + } +} diff --git a/exporters/jaeger-thrift/build.gradle b/exporters/jaeger-thrift/build.gradle index 6a86275b4ed..5945ef2876e 100644 --- a/exporters/jaeger-thrift/build.gradle +++ b/exporters/jaeger-thrift/build.gradle @@ -9,16 +9,16 @@ description = 'OpenTelemetry - Jaeger Thrift Exporter' ext.moduleName = "io.opentelemetry.exporter.jaeger.thrift" dependencies { - api project(':opentelemetry-sdk') + api project(':sdk:all') - implementation project(':opentelemetry-sdk'), + implementation project(':sdk:all'), libraries.jaeger_client testImplementation 'com.fasterxml.jackson.core:jackson-databind', libraries.testcontainers, libraries.okhttp - testImplementation project(':opentelemetry-sdk-testing') + testImplementation project(':sdk:testing') signature libraries.android_signature } diff --git a/exporters/jaeger/build.gradle b/exporters/jaeger/build.gradle index 362a8b2fa2c..62604f5babc 100644 --- a/exporters/jaeger/build.gradle +++ b/exporters/jaeger/build.gradle @@ -10,11 +10,11 @@ description = 'OpenTelemetry - Jaeger Exporter' ext.moduleName = "io.opentelemetry.exporter.jaeger" dependencies { - api project(':opentelemetry-sdk'), + api project(':sdk:all'), libraries.grpc_api - implementation project(':opentelemetry-sdk-extension-otproto'), - project(':opentelemetry-sdk'), + implementation project(':sdk-extensions:otproto'), + project(':sdk:all'), libraries.grpc_protobuf, libraries.grpc_stub, libraries.protobuf, @@ -25,7 +25,7 @@ dependencies { libraries.testcontainers, libraries.okhttp - testImplementation project(':opentelemetry-sdk-testing') + testImplementation project(':sdk:testing') // Protobuf plugin seems to erroneously use the non-classpath configurations for resolving // dependencies. diff --git a/exporters/logging/build.gradle b/exporters/logging/build.gradle index fd8bd779fa1..9d46eef4884 100644 --- a/exporters/logging/build.gradle +++ b/exporters/logging/build.gradle @@ -9,9 +9,9 @@ description = 'OpenTelemetry - Logging Exporter' ext.moduleName = "io.opentelemetry.exporter.logging" dependencies { - api project(':opentelemetry-sdk') + api project(':sdk:all') - testImplementation project(':opentelemetry-sdk-testing') + testImplementation project(':sdk:testing') signature libraries.android_signature } diff --git a/exporters/otlp/all/build.gradle b/exporters/otlp/all/build.gradle index 39fa6251ec0..a976f405c33 100644 --- a/exporters/otlp/all/build.gradle +++ b/exporters/otlp/all/build.gradle @@ -8,7 +8,8 @@ plugins { description = 'OpenTelemetry Protocol Exporters' ext.moduleName = "io.opentelemetry.exporter.otlp" +archivesBaseName = "opentelemetry-exporter-otlp" dependencies { - api project(':opentelemetry-exporter-otlp-trace') + api project(':exporters:otlp:trace') } diff --git a/exporters/otlp/build.gradle b/exporters/otlp/build.gradle new file mode 100644 index 00000000000..9c2c2138b1e --- /dev/null +++ b/exporters/otlp/build.gradle @@ -0,0 +1,5 @@ +subprojects { + plugins.withId("java") { + archivesBaseName = "opentelemetry-exporter-otlp-${project.name}" + } +} diff --git a/exporters/otlp/metrics/build.gradle b/exporters/otlp/metrics/build.gradle index cb4aa7fa3f3..e2f7d82613f 100644 --- a/exporters/otlp/metrics/build.gradle +++ b/exporters/otlp/metrics/build.gradle @@ -13,15 +13,15 @@ version = "${version}".replaceFirst(/^(\d+)\.(\d+).(\d+)/) { _, major, minor, pa } dependencies { - api project(':opentelemetry-sdk') + api project(':sdk:all') - implementation project(':opentelemetry-sdk-extension-otproto'), + implementation project(':sdk-extensions:otproto'), libraries.grpc_api, libraries.grpc_protobuf, libraries.grpc_stub, libraries.protobuf - testImplementation project(':opentelemetry-sdk-testing') + testImplementation project(':sdk:testing') testImplementation "io.grpc:grpc-testing:${grpcVersion}" testRuntime "io.grpc:grpc-netty-shaded:${grpcVersion}" diff --git a/exporters/otlp/trace/build.gradle b/exporters/otlp/trace/build.gradle index 76e5a933d2f..3e4f09caf1d 100644 --- a/exporters/otlp/trace/build.gradle +++ b/exporters/otlp/trace/build.gradle @@ -10,22 +10,22 @@ description = 'OpenTelemetry Protocol Trace Exporter' ext.moduleName = "io.opentelemetry.exporter.otlp.trace" dependencies { - api project(':opentelemetry-sdk') + api project(':sdk:all') - implementation project(':opentelemetry-sdk-extension-otproto'), + implementation project(':sdk-extensions:otproto'), libraries.grpc_api, libraries.grpc_protobuf, libraries.grpc_stub, libraries.protobuf - testImplementation project(':opentelemetry-sdk-testing'), + testImplementation project(':sdk:testing'), 'com.linecorp.armeria:armeria-grpc', 'com.linecorp.armeria:armeria-junit5', "io.grpc:grpc-testing:${grpcVersion}" testRuntime "io.grpc:grpc-netty-shaded:${grpcVersion}" - jmh project(':opentelemetry-sdk-testing') + jmh project(':sdk:testing') signature libraries.android_signature } diff --git a/exporters/prometheus/build.gradle b/exporters/prometheus/build.gradle index b1c9f7adda9..bd2e69372ed 100644 --- a/exporters/prometheus/build.gradle +++ b/exporters/prometheus/build.gradle @@ -9,7 +9,7 @@ description = 'OpenTelemetry Prometheus Exporter' ext.moduleName = "io.opentelemetry.exporter.prometheus" dependencies { - api project(':opentelemetry-sdk') + api project(':sdk:all') implementation libraries.prometheus_client diff --git a/exporters/zipkin/build.gradle b/exporters/zipkin/build.gradle index 474e53041b2..b9152cf4709 100644 --- a/exporters/zipkin/build.gradle +++ b/exporters/zipkin/build.gradle @@ -11,14 +11,14 @@ ext.moduleName = "io.opentelemetry.exporter.zipkin" dependencies { compileOnly libraries.auto_value - api project(':opentelemetry-sdk') + api project(':sdk:all') annotationProcessor libraries.auto_value implementation libraries.zipkin_reporter, libraries.zipkin_okhttp - testImplementation project(':opentelemetry-sdk-testing') + testImplementation project(':sdk:testing') testImplementation libraries.guava, libraries.zipkin_junit diff --git a/extensions/annotations/build.gradle b/extensions/annotations/build.gradle index f0c2b0abb9a..0aa7126a8b3 100644 --- a/extensions/annotations/build.gradle +++ b/extensions/annotations/build.gradle @@ -9,5 +9,5 @@ description = 'OpenTelemetry Extension Annotations' ext.moduleName = "io.opentelemetry.extension.annotations" dependencies { - api project(':opentelemetry-api') + api project(':api:all') } diff --git a/extensions/build.gradle b/extensions/build.gradle new file mode 100644 index 00000000000..9bf2feb890a --- /dev/null +++ b/extensions/build.gradle @@ -0,0 +1,5 @@ +subprojects { + plugins.withId("java") { + archivesBaseName = "opentelemetry-extension-${project.name}" + } +} diff --git a/extensions/kotlin/build.gradle b/extensions/kotlin/build.gradle index fe7df746398..cc76152f8ed 100644 --- a/extensions/kotlin/build.gradle +++ b/extensions/kotlin/build.gradle @@ -13,12 +13,12 @@ ext.moduleName = "io.opentelemetry.extension.kotlin" dependencies { implementation(platform("org.jetbrains.kotlin:kotlin-bom")) - api project(':opentelemetry-api') + api project(':api:all') api("org.jetbrains.kotlin:kotlin-stdlib-common") api("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.1") - testImplementation project(':opentelemetry-sdk-testing') + testImplementation project(':sdk:testing') testImplementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8") signature libraries.android_signature diff --git a/extensions/trace-propagators/build.gradle b/extensions/trace-propagators/build.gradle index 5039df88f0e..d49656b001c 100644 --- a/extensions/trace-propagators/build.gradle +++ b/extensions/trace-propagators/build.gradle @@ -10,7 +10,7 @@ description = 'OpenTelemetry Extension : Trace Propagators' ext.moduleName = "io.opentelemetry.extension.trace.propagation" dependencies { - api project(':opentelemetry-api') + api project(':api:all') testImplementation libraries.jaeger_client, libraries.guava diff --git a/integration-tests/build.gradle b/integration-tests/build.gradle index e9c352040f8..ededac4db4e 100644 --- a/integration-tests/build.gradle +++ b/integration-tests/build.gradle @@ -14,8 +14,8 @@ task fatJar(type: Jar) { } dependencies { - implementation project(':opentelemetry-sdk'), - project(':opentelemetry-exporter-jaeger'), + implementation project(':sdk:all'), + project(':exporters:jaeger'), libraries.grpc_protobuf, libraries.protobuf, "io.grpc:grpc-netty-shaded:${grpcVersion}" diff --git a/integration-tests/tracecontext/build.gradle b/integration-tests/tracecontext/build.gradle index 2364904597b..34fde1abf72 100644 --- a/integration-tests/tracecontext/build.gradle +++ b/integration-tests/tracecontext/build.gradle @@ -17,8 +17,8 @@ task fatJar(type: Jar) { } dependencies { - implementation project(':opentelemetry-sdk'), - project(':opentelemetry-extension-trace-propagators'), + implementation project(':sdk:all'), + project(':extensions:trace-propagators'), libraries.okhttp, libraries.slf4jsimple, "com.sparkjava:spark-core:2.9.3", diff --git a/opencensus-shim/build.gradle b/opencensus-shim/build.gradle index 1567348a49d..0c984748e07 100644 --- a/opencensus-shim/build.gradle +++ b/opencensus-shim/build.gradle @@ -7,13 +7,13 @@ description = 'OpenTelemetry OpenCensus Shim' ext.moduleName = "io.opentelemetry.opencensusshim" dependencies { - api project(':opentelemetry-api'), - project(':opentelemetry-sdk'), + api project(':api:all'), + project(':sdk:all'), libraries.opencensus_api, libraries.opencensus_impl_core, libraries.opencensus_metric_exporter - testImplementation project(':opentelemetry-sdk'), + testImplementation project(':sdk:all'), libraries.junit, libraries.assertj, libraries.slf4jsimple, diff --git a/opentracing-shim/build.gradle b/opentracing-shim/build.gradle index 078d971eed7..3beae39ecd9 100644 --- a/opentracing-shim/build.gradle +++ b/opentracing-shim/build.gradle @@ -7,10 +7,10 @@ description = 'OpenTelemetry OpenTracing Bridge' ext.moduleName = "io.opentelemetry.opentracingshim" dependencies { - api project(':opentelemetry-api'), + api project(':api:all'), libraries.opentracing - testImplementation project(':opentelemetry-sdk-testing'), + testImplementation project(':sdk:testing'), libraries.junit, libraries.assertj, libraries.slf4jsimple diff --git a/perf-harness/build.gradle b/perf-harness/build.gradle index d25b0877968..8d21ca5ce7b 100644 --- a/perf-harness/build.gradle +++ b/perf-harness/build.gradle @@ -6,11 +6,11 @@ description = 'Performance Testing Harness' ext.moduleName = "io.opentelemetry.perf-harness" dependencies { - compile project(':opentelemetry-api'), - project(":opentelemetry-sdk"), - project(":opentelemetry-sdk-testing"), - project(":opentelemetry-exporter-otlp-trace"), - project(":opentelemetry-exporter-logging") + compile project(':api:all'), + project(":sdk:all"), + project(":sdk:testing"), + project(":exporters:otlp:trace"), + project(":exporters:logging") compile("io.grpc:grpc-netty-shaded") compile("eu.rekawek.toxiproxy:toxiproxy-java:2.1.4") diff --git a/sdk-extensions/async-processor/build.gradle b/sdk-extensions/async-processor/build.gradle index ed7f9c12828..be953654171 100644 --- a/sdk-extensions/async-processor/build.gradle +++ b/sdk-extensions/async-processor/build.gradle @@ -9,8 +9,8 @@ description = 'OpenTelemetry SDK Extension: Async SpanProcessor' ext.moduleName = "io.opentelemetry.sdk.extension.trace.export" dependencies { - api project(':opentelemetry-api'), - project(':opentelemetry-sdk') + api project(':api:all'), + project(':sdk:all') implementation libraries.guava, libraries.disruptor diff --git a/sdk-extensions/aws/build.gradle b/sdk-extensions/aws/build.gradle index d1183b2ef44..6af25b1b56c 100644 --- a/sdk-extensions/aws/build.gradle +++ b/sdk-extensions/aws/build.gradle @@ -10,8 +10,8 @@ description = 'OpenTelemetry SDK AWS Instrumentation Support' ext.moduleName = "io.opentelemetry.sdk.extension.trace.aws" dependencies { - api project(':opentelemetry-api'), - project(':opentelemetry-sdk') + api project(':api:all'), + project(':sdk:all') implementation 'com.fasterxml.jackson.core:jackson-core' implementation 'com.fasterxml.jackson.core:jackson-databind' diff --git a/sdk-extensions/jaeger-remote-sampler/build.gradle b/sdk-extensions/jaeger-remote-sampler/build.gradle index 6d71f18f162..2cf41e37c30 100644 --- a/sdk-extensions/jaeger-remote-sampler/build.gradle +++ b/sdk-extensions/jaeger-remote-sampler/build.gradle @@ -10,10 +10,10 @@ description = 'OpenTelemetry - Jaeger Remote sampler' ext.moduleName = "io.opentelemetry.sdk.extension.trace.jaeger" dependencies { - api project(':opentelemetry-sdk') + api project(':sdk:all') - implementation project(':opentelemetry-sdk-extension-otproto'), - project(':opentelemetry-sdk'), + implementation project(':sdk-extensions:otproto'), + project(':sdk:all'), libraries.grpc_api, libraries.grpc_protobuf, libraries.grpc_stub, diff --git a/sdk-extensions/jfr-events/build.gradle b/sdk-extensions/jfr-events/build.gradle index 0fef93a068e..5a1bd17ac11 100644 --- a/sdk-extensions/jfr-events/build.gradle +++ b/sdk-extensions/jfr-events/build.gradle @@ -6,8 +6,8 @@ description = 'OpenTelemetry SDK Extension JFR' ext.moduleName = 'io.opentelemetry.sdk.extension.jfr' dependencies { - implementation project(':opentelemetry-api'), - project(':opentelemetry-sdk') + implementation project(':api:all'), + project(':sdk:all') } tasks.withType(JavaCompile) { diff --git a/sdk-extensions/logging/build.gradle b/sdk-extensions/logging/build.gradle index 254a11fda67..3ffa1f4d5c7 100644 --- a/sdk-extensions/logging/build.gradle +++ b/sdk-extensions/logging/build.gradle @@ -9,7 +9,7 @@ description = 'OpenTelemetry Contrib Logging Support' ext.moduleName = "io.opentelemetry.sdk.extension.logging" dependencies { - api project(':opentelemetry-sdk') + api project(':sdk:all') implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind' testImplementation libraries.awaitility diff --git a/sdk-extensions/otproto/build.gradle b/sdk-extensions/otproto/build.gradle index e025abf2203..450f63dc83f 100644 --- a/sdk-extensions/otproto/build.gradle +++ b/sdk-extensions/otproto/build.gradle @@ -9,13 +9,13 @@ description = 'OpenTelemetry Protocol Exporter' ext.moduleName = "io.opentelemetry.exporters.otprotocol" dependencies { - api project(':opentelemetry-api'), - project(':opentelemetry-proto'), - project(':opentelemetry-sdk') + api project(':api:all'), + project(':proto'), + project(':sdk:all') implementation libraries.protobuf - testImplementation project(':opentelemetry-sdk-testing') + testImplementation project(':sdk:testing') testImplementation "io.grpc:grpc-testing:${grpcVersion}" testRuntime "io.grpc:grpc-netty-shaded:${grpcVersion}" diff --git a/sdk-extensions/resources/build.gradle b/sdk-extensions/resources/build.gradle index 14cedf7dd6a..68eb5714f2d 100644 --- a/sdk-extensions/resources/build.gradle +++ b/sdk-extensions/resources/build.gradle @@ -9,7 +9,7 @@ description = 'OpenTelemetry SDK Resource Providers' ext.moduleName = "io.opentelemetry.sdk.extension.resources" dependencies { - api project(':opentelemetry-sdk-common') + api project(':sdk:common') testImplementation libraries.junit_pioneer diff --git a/sdk-extensions/tracing-incubator/build.gradle b/sdk-extensions/tracing-incubator/build.gradle index 9a316edcaeb..10ee8260510 100644 --- a/sdk-extensions/tracing-incubator/build.gradle +++ b/sdk-extensions/tracing-incubator/build.gradle @@ -11,12 +11,12 @@ description = 'OpenTelemetry SDK Tracing Incubator' ext.moduleName = "io.opentelemetry.sdk.extension.trace.incubator" dependencies { - api project(':opentelemetry-api'), - project(':opentelemetry-sdk') + api project(':api:all'), + project(':sdk:all') annotationProcessor libraries.auto_value - testImplementation project(':opentelemetry-sdk-testing'), + testImplementation project(':sdk:testing'), libraries.guava_testlib signature libraries.android_signature diff --git a/sdk-extensions/zpages/build.gradle b/sdk-extensions/zpages/build.gradle index 0ee49a2e241..3f5879bedc8 100644 --- a/sdk-extensions/zpages/build.gradle +++ b/sdk-extensions/zpages/build.gradle @@ -10,8 +10,8 @@ description = 'OpenTelemetry - zPages' ext.moduleName = "io.opentelemetry.sdk.extension.zpages" dependencies { - implementation project(':opentelemetry-api'), - project(':opentelemetry-sdk') + implementation project(':api:all'), + project(':sdk:all') testImplementation libraries.guava diff --git a/sdk/all/build.gradle b/sdk/all/build.gradle index ec85480c9da..fb581761c55 100644 --- a/sdk/all/build.gradle +++ b/sdk/all/build.gradle @@ -9,35 +9,36 @@ plugins { description = 'OpenTelemetry SDK' ext.moduleName = "io.opentelemetry.sdk" ext.propertiesDir = "build/generated/properties/io/opentelemetry/sdk" +archivesBaseName = "opentelemetry-sdk" dependencies { - api project(':opentelemetry-api'), - project(':opentelemetry-sdk-common'), - project(':opentelemetry-sdk-metrics'), - project(':opentelemetry-sdk-trace') + api project(':api:all'), + project(':sdk:common'), + project(':sdk:metrics'), + project(':sdk:trace') annotationProcessor libraries.auto_value testAnnotationProcessor libraries.auto_value testCompileOnly libraries.auto_value_annotation - testImplementation project(':opentelemetry-sdk-testing') + testImplementation project(':sdk:testing') testImplementation libraries.junit_pioneer - jmh(project(':opentelemetry-sdk-testing')) { + jmh(project(':sdk:testing')) { // JMH doesn't handle dependencies that are duplicated between the main and jmh // configurations properly, but luckily here it's simple enough to just exclude transitive // dependencies. transitive = false } - jmh(project(':opentelemetry-exporter-otlp-trace')) { + jmh(project(':exporters:otlp:trace')) { // The opentelemetry-exporter-otlp-trace depends on this project itself. So don't pull in // the transitive dependencies. transitive = false } // explicitly adding the opentelemetry-exporter-otlp dependencies - jmh(project(':opentelemetry-sdk-extension-otproto')) { transitive = false } - jmh(project(':opentelemetry-proto')) + jmh(project(':sdk-extensions:otproto')) { transitive = false } + jmh(project(':proto')) jmh("io.grpc:grpc-api") jmh("io.grpc:grpc-netty-shaded") jmh("org.testcontainers:testcontainers:1.15.0") // testContainer for OTLP collector diff --git a/sdk/build.gradle b/sdk/build.gradle new file mode 100644 index 00000000000..f4ee4ee810f --- /dev/null +++ b/sdk/build.gradle @@ -0,0 +1,7 @@ +subprojects { + // Workaround https://github.com/gradle/gradle/issues/847 + group = "io.opentelemetry.sdk" + plugins.withId("java") { + archivesBaseName = "opentelemetry-sdk-${project.name}" + } +} diff --git a/sdk/common/build.gradle b/sdk/common/build.gradle index f779555ac53..fb7641a23f0 100644 --- a/sdk/common/build.gradle +++ b/sdk/common/build.gradle @@ -10,14 +10,14 @@ ext.moduleName = "io.opentelemetry.sdk.common" ext.propertiesDir = "build/generated/properties/io/opentelemetry/sdk/common" dependencies { - api project(':opentelemetry-api') + api project(':api:all') annotationProcessor libraries.auto_value testAnnotationProcessor libraries.auto_value testCompileOnly libraries.auto_value_annotation - testImplementation project(':opentelemetry-sdk-testing') + testImplementation project(':sdk:testing') testImplementation libraries.junit_pioneer, libraries.guava_testlib diff --git a/sdk/metrics/build.gradle b/sdk/metrics/build.gradle index 30f6062e60e..c521a2d8745 100644 --- a/sdk/metrics/build.gradle +++ b/sdk/metrics/build.gradle @@ -11,18 +11,18 @@ ext.moduleName = "io.opentelemetry.sdk.metrics" ext.propertiesDir = "build/generated/properties/io/opentelemetry/sdk/metrics" dependencies { - api project(':opentelemetry-api-metrics'), - project(':opentelemetry-sdk-common') + api project(':api:metrics'), + project(':sdk:common') annotationProcessor libraries.auto_value testAnnotationProcessor libraries.auto_value testCompileOnly libraries.auto_value_annotation - testCompile project(path: ':opentelemetry-sdk-common', configuration: 'testClasses') + testCompile project(path: ':sdk:common', configuration: 'testClasses') testImplementation libraries.guava - testImplementation project(':opentelemetry-sdk-testing') + testImplementation project(':sdk:testing') testImplementation libraries.junit_pioneer signature libraries.android_signature diff --git a/sdk/testing/build.gradle b/sdk/testing/build.gradle index 276d8486c33..652b052f114 100644 --- a/sdk/testing/build.gradle +++ b/sdk/testing/build.gradle @@ -7,8 +7,8 @@ description = 'OpenTelemetry SDK Testing utilities' ext.moduleName = 'io.opentelemetry.sdk.testing' dependencies { - api project(':opentelemetry-api') - api project(':opentelemetry-sdk') + api project(':api:all') + api project(':sdk:all') compileOnly libraries.assertj compileOnly libraries.junit diff --git a/sdk/trace/build.gradle b/sdk/trace/build.gradle index e831fb646bd..fc2117420eb 100644 --- a/sdk/trace/build.gradle +++ b/sdk/trace/build.gradle @@ -11,20 +11,20 @@ ext.moduleName = "io.opentelemetry.sdk.trace" ext.propertiesDir = "build/generated/properties/io/opentelemetry/sdk/trace" dependencies { - api project(':opentelemetry-api-trace'), - project(':opentelemetry-sdk-common') + api project(':api:trace'), + project(':sdk:common') - implementation project(':opentelemetry-api-metrics') + implementation project(':api:metrics') annotationProcessor libraries.auto_value testAnnotationProcessor libraries.auto_value testCompileOnly libraries.auto_value_annotation - testCompile project(path: ':opentelemetry-sdk-common', configuration: 'testClasses') + testCompile project(path: ':sdk:common', configuration: 'testClasses') testImplementation libraries.guava - testImplementation project(':opentelemetry-sdk-testing') + testImplementation project(':sdk:testing') testImplementation libraries.junit_pioneer signature libraries.android_signature diff --git a/settings.gradle b/settings.gradle index 9fb600a8b65..3d5cdde177e 100644 --- a/settings.gradle +++ b/settings.gradle @@ -26,63 +26,44 @@ plugins { } rootProject.name = "opentelemetry-java" -include ":opentelemetry-all", - ":opentelemetry-api", - ":opentelemetry-api-baggage", - ":opentelemetry-api-common", - ":opentelemetry-api-trace", - ":opentelemetry-api-metrics", - ":opentelemetry-context", - ":opentelemetry-extension-annotations", - ":opentelemetry-extension-kotlin", - ":opentelemetry-extension-trace-propagators", - ":opentelemetry-exporter-jaeger", - ":opentelemetry-exporter-jaeger-thrift", - ":opentelemetry-exporter-logging", - ":opentelemetry-exporter-otlp", - ":opentelemetry-exporter-otlp-metrics", - ":opentelemetry-exporter-otlp-trace", - ":opentelemetry-exporter-prometheus", - ":opentelemetry-exporter-zipkin", - ":opentelemetry-integration-tests", - ":opentelemetry-integration-tests-tracecontext", - ":opentelemetry-opencensus-shim", - ":opentelemetry-opentracing-shim", - ":opentelemetry-proto", - ":opentelemetry-sdk-common", - ":opentelemetry-sdk-metrics", - ":opentelemetry-sdk-trace", - ":opentelemetry-sdk", - ":opentelemetry-sdk-extension-async-processor", - ":opentelemetry-sdk-extension-aws", - ":opentelemetry-sdk-extension-logging", - ":opentelemetry-sdk-extension-otproto", - ":opentelemetry-sdk-extension-resources", - ":opentelemetry-sdk-extension-tracing-incubator", - ":opentelemetry-sdk-extension-jaeger-remote-sampler", - ":opentelemetry-sdk-extension-jfr-events", - ":opentelemetry-sdk-extension-zpages", - ":opentelemetry-sdk-testing", - ":opentelemetry-bom", - ":opentelemetry-perf-harness" - -rootProject.children.each { - it.projectDir = "$rootDir/" + it.name - .replace("opentelemetry-api-", "api/") - .replace("opentelemetry-integration-tests-", "integration-tests/") - .replace("opentelemetry-exporter-otlp-", "exporters/otlp/") - .replace("opentelemetry-exporter-", "exporters/") - .replace("opentelemetry-extension-", "extensions/") - .replace("opentelemetry-sdk-extension-", "sdk-extensions/") - .replace("opentelemetry-sdk-", "sdk/") - .replace("logging-", "logging/") - .replace("opentelemetry-", "") as File -} - -project(":opentelemetry-api").projectDir = "$rootDir/api/all" as File -project(":opentelemetry-context").projectDir = "$rootDir/api/context" as File -project(":opentelemetry-exporter-otlp").projectDir = "$rootDir/exporters/otlp/all" as File -project(":opentelemetry-sdk").projectDir = "$rootDir/sdk/all" as File +include ":api:all", + ":api:context", + ":api:baggage", + ":api:common", + ":api:trace", + ":api:metrics", + ":bom", + ":extensions:annotations", + ":extensions:kotlin", + ":extensions:trace-propagators", + ":exporters:jaeger", + ":exporters:jaeger-thrift", + ":exporters:logging", + ":exporters:otlp:all", + ":exporters:otlp:metrics", + ":exporters:otlp:trace", + ":exporters:prometheus", + ":exporters:zipkin", + ":integration-tests", + ":integration-tests:tracecontext", + ":opencensus-shim", + ":opentracing-shim", + ":perf-harness", + ":proto", + ":sdk:all", + ":sdk:common", + ":sdk:metrics", + ":sdk:testing", + ":sdk:trace", + ":sdk-extensions:async-processor", + ":sdk-extensions:aws", + ":sdk-extensions:logging", + ":sdk-extensions:otproto", + ":sdk-extensions:resources", + ":sdk-extensions:tracing-incubator", + ":sdk-extensions:jaeger-remote-sampler", + ":sdk-extensions:jfr-events", + ":sdk-extensions:zpages" def isCI = System.getenv("CI") != null gradleEnterprise {