From 13f384e4c0983853251a36c3ab77306c93d3a77c Mon Sep 17 00:00:00 2001 From: ravisingal <62086374+ravisingal@users.noreply.github.com> Date: Fri, 12 Mar 2021 19:33:09 +0530 Subject: [PATCH] Publish java agent to maven central (#285) * Publish java agent to maven central * fix circleci build failure * rename job in circleci * use updated version of publish-maven-central-plugin plugin --- .circleci/config.yml | 10 ++++++---- build.gradle.kts | 11 +++++++---- filter-api/build.gradle.kts | 2 +- javaagent-core/build.gradle.kts | 2 +- .../HypertraceCallDepthThreadLocalMap.java | 2 +- javaagent/build.gradle.kts | 2 +- 6 files changed, 17 insertions(+), 12 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a2941e360..7d03972b8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -63,7 +63,7 @@ jobs: - setup_build_environment - run: make muzzle - release-bintray-publish: + release-maven-publish: executor: gradle_docker steps: - setup_build_environment @@ -106,8 +106,10 @@ workflows: filters: tags: only: /.*/ - - release-bintray-publish: - context: hypertrace-publishing + - release-maven-publish: + context: + - hypertrace-publishing + - maven-central-publish requires: - build - muzzle @@ -119,7 +121,7 @@ workflows: - release-github-publish: context: hypertrace-publishing requires: - - release-bintray-publish + - release-maven-publish filters: branches: ignore: /.*/ diff --git a/build.gradle.kts b/build.gradle.kts index 773249d22..3508ba81e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,7 +1,9 @@ +import org.hypertrace.gradle.publishing.License.APACHE_2_0; + plugins { `java-library` id("com.diffplug.spotless") version "5.2.0" apply false - id("org.hypertrace.publish-plugin") version "0.3.3" apply false + id("org.hypertrace.publish-maven-central-plugin") version "0.4.1" apply false id("org.hypertrace.ci-utils-plugin") version "0.1.4" id("org.gradle.test-retry") version "1.2.0" apply false } @@ -51,9 +53,10 @@ subprojects { } } - pluginManager.withPlugin("org.hypertrace.publish-plugin") { - configure { - license.set(org.hypertrace.gradle.publishing.License.APACHE_2_0) + pluginManager.withPlugin("org.hypertrace.publish-maven-central-plugin") { + configure { + repoName.set("javaagent") + license.set(APACHE_2_0) } } diff --git a/filter-api/build.gradle.kts b/filter-api/build.gradle.kts index 488956763..d0c58a39b 100644 --- a/filter-api/build.gradle.kts +++ b/filter-api/build.gradle.kts @@ -1,6 +1,6 @@ plugins { `java-library` - id("org.hypertrace.publish-plugin") + id("org.hypertrace.publish-maven-central-plugin") } val versions: Map by extra diff --git a/javaagent-core/build.gradle.kts b/javaagent-core/build.gradle.kts index e85dfc507..9de342656 100644 --- a/javaagent-core/build.gradle.kts +++ b/javaagent-core/build.gradle.kts @@ -4,7 +4,7 @@ plugins { `java-library` idea id("com.google.protobuf") version "0.8.13" - id("org.hypertrace.publish-plugin") + id("org.hypertrace.publish-maven-central-plugin") } protobuf { diff --git a/javaagent-core/src/main/java/org/hypertrace/agent/core/instrumentation/HypertraceCallDepthThreadLocalMap.java b/javaagent-core/src/main/java/org/hypertrace/agent/core/instrumentation/HypertraceCallDepthThreadLocalMap.java index 76c560551..b207e13e0 100644 --- a/javaagent-core/src/main/java/org/hypertrace/agent/core/instrumentation/HypertraceCallDepthThreadLocalMap.java +++ b/javaagent-core/src/main/java/org/hypertrace/agent/core/instrumentation/HypertraceCallDepthThreadLocalMap.java @@ -23,7 +23,7 @@ *

The copy is needed because in some cases Hypertrace instrumentation wants to use the same * class as a key to the map. * - * @see {@link io.opentelemetry.javaagent.instrumentation.api.CallDepthThreadLocalMap}. + *

see {@link io.opentelemetry.javaagent.instrumentation.api.CallDepthThreadLocalMap}. */ public class HypertraceCallDepthThreadLocalMap { private static final ClassValue TLS = diff --git a/javaagent/build.gradle.kts b/javaagent/build.gradle.kts index fb0cebe7f..eeaffde0e 100644 --- a/javaagent/build.gradle.kts +++ b/javaagent/build.gradle.kts @@ -1,7 +1,7 @@ plugins { `java-library` id("com.github.johnrengelman.shadow") version "6.0.0" - id("org.hypertrace.publish-plugin") + id("org.hypertrace.publish-maven-central-plugin") } val versions: Map by extra