Skip to content

Commit 13f384e

Browse files
authored
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
1 parent 635e012 commit 13f384e

File tree

6 files changed

+17
-12
lines changed

6 files changed

+17
-12
lines changed

.circleci/config.yml

+6-4
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
- setup_build_environment
6464
- run: make muzzle
6565

66-
release-bintray-publish:
66+
release-maven-publish:
6767
executor: gradle_docker
6868
steps:
6969
- setup_build_environment
@@ -106,8 +106,10 @@ workflows:
106106
filters:
107107
tags:
108108
only: /.*/
109-
- release-bintray-publish:
110-
context: hypertrace-publishing
109+
- release-maven-publish:
110+
context:
111+
- hypertrace-publishing
112+
- maven-central-publish
111113
requires:
112114
- build
113115
- muzzle
@@ -119,7 +121,7 @@ workflows:
119121
- release-github-publish:
120122
context: hypertrace-publishing
121123
requires:
122-
- release-bintray-publish
124+
- release-maven-publish
123125
filters:
124126
branches:
125127
ignore: /.*/

build.gradle.kts

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
import org.hypertrace.gradle.publishing.License.APACHE_2_0;
2+
13
plugins {
24
`java-library`
35
id("com.diffplug.spotless") version "5.2.0" apply false
4-
id("org.hypertrace.publish-plugin") version "0.3.3" apply false
6+
id("org.hypertrace.publish-maven-central-plugin") version "0.4.1" apply false
57
id("org.hypertrace.ci-utils-plugin") version "0.1.4"
68
id("org.gradle.test-retry") version "1.2.0" apply false
79
}
@@ -51,9 +53,10 @@ subprojects {
5153
}
5254
}
5355

54-
pluginManager.withPlugin("org.hypertrace.publish-plugin") {
55-
configure<org.hypertrace.gradle.publishing.HypertracePublishExtension> {
56-
license.set(org.hypertrace.gradle.publishing.License.APACHE_2_0)
56+
pluginManager.withPlugin("org.hypertrace.publish-maven-central-plugin") {
57+
configure<org.hypertrace.gradle.publishing.HypertracePublishMavenCentralExtension> {
58+
repoName.set("javaagent")
59+
license.set(APACHE_2_0)
5760
}
5861
}
5962

filter-api/build.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
`java-library`
3-
id("org.hypertrace.publish-plugin")
3+
id("org.hypertrace.publish-maven-central-plugin")
44
}
55

66
val versions: Map<String, String> by extra

javaagent-core/build.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ plugins {
44
`java-library`
55
idea
66
id("com.google.protobuf") version "0.8.13"
7-
id("org.hypertrace.publish-plugin")
7+
id("org.hypertrace.publish-maven-central-plugin")
88
}
99

1010
protobuf {

javaagent-core/src/main/java/org/hypertrace/agent/core/instrumentation/HypertraceCallDepthThreadLocalMap.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* <p>The copy is needed because in some cases Hypertrace instrumentation wants to use the same
2424
* class as a key to the map.
2525
*
26-
* @see {@link io.opentelemetry.javaagent.instrumentation.api.CallDepthThreadLocalMap}.
26+
* <p>see {@link io.opentelemetry.javaagent.instrumentation.api.CallDepthThreadLocalMap}.
2727
*/
2828
public class HypertraceCallDepthThreadLocalMap {
2929
private static final ClassValue<HypertraceCallDepthThreadLocalMap.ThreadLocalDepth> TLS =

javaagent/build.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
plugins {
22
`java-library`
33
id("com.github.johnrengelman.shadow") version "6.0.0"
4-
id("org.hypertrace.publish-plugin")
4+
id("org.hypertrace.publish-maven-central-plugin")
55
}
66

77
val versions: Map<String, String> by extra

0 commit comments

Comments
 (0)