Skip to content

Commit

Permalink
Publish java agent to maven central (#285)
Browse files Browse the repository at this point in the history
* Publish java agent to maven central

* fix circleci build failure

* rename job in circleci

* use updated version of publish-maven-central-plugin plugin
  • Loading branch information
ravisingal authored Mar 12, 2021
1 parent 635e012 commit 13f384e
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 12 deletions.
10 changes: 6 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
- setup_build_environment
- run: make muzzle

release-bintray-publish:
release-maven-publish:
executor: gradle_docker
steps:
- setup_build_environment
Expand Down Expand Up @@ -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
Expand All @@ -119,7 +121,7 @@ workflows:
- release-github-publish:
context: hypertrace-publishing
requires:
- release-bintray-publish
- release-maven-publish
filters:
branches:
ignore: /.*/
Expand Down
11 changes: 7 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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
}
Expand Down Expand Up @@ -51,9 +53,10 @@ subprojects {
}
}

pluginManager.withPlugin("org.hypertrace.publish-plugin") {
configure<org.hypertrace.gradle.publishing.HypertracePublishExtension> {
license.set(org.hypertrace.gradle.publishing.License.APACHE_2_0)
pluginManager.withPlugin("org.hypertrace.publish-maven-central-plugin") {
configure<org.hypertrace.gradle.publishing.HypertracePublishMavenCentralExtension> {
repoName.set("javaagent")
license.set(APACHE_2_0)
}
}

Expand Down
2 changes: 1 addition & 1 deletion filter-api/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
`java-library`
id("org.hypertrace.publish-plugin")
id("org.hypertrace.publish-maven-central-plugin")
}

val versions: Map<String, String> by extra
Expand Down
2 changes: 1 addition & 1 deletion javaagent-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* <p>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}.
* <p>see {@link io.opentelemetry.javaagent.instrumentation.api.CallDepthThreadLocalMap}.
*/
public class HypertraceCallDepthThreadLocalMap {
private static final ClassValue<HypertraceCallDepthThreadLocalMap.ThreadLocalDepth> TLS =
Expand Down
2 changes: 1 addition & 1 deletion javaagent/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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<String, String> by extra
Expand Down

0 comments on commit 13f384e

Please sign in to comment.