Skip to content

Commit d029b17

Browse files
authored
fix pom and signature on inferred spans (#150)
1 parent f7ab62d commit d029b17

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

inferred-spans/build.gradle.kts

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
plugins {
22
`java-library`
3+
id("signing")
34
}
45

6+
description = rootProject.description + " inferred-spans"
7+
58
dependencies {
69
annotationProcessor(libs.autoservice.processor)
710
compileOnly(libs.autoservice.annotations)
@@ -48,7 +51,9 @@ tasks.withType<Test>().all {
4851
publishing {
4952
publications {
5053
create<MavenPublication>("maven") {
54+
5155
from(components["java"])
56+
5257
versionMapping {
5358
usage("java-api") {
5459
fromResolutionOf("runtimeClasspath")
@@ -57,6 +62,39 @@ publishing {
5762
fromResolutionResult()
5863
}
5964
}
65+
66+
pom {
67+
name.set(project.description)
68+
description.set(project.description)
69+
url.set("https://github.com/elastic/elastic-otel-java")
70+
licenses {
71+
license {
72+
name.set("The Apache License, Version 2.0")
73+
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
74+
}
75+
}
76+
developers {
77+
developer {
78+
name.set("Elastic Inc.")
79+
url.set("https://www.elastic.co")
80+
}
81+
}
82+
scm {
83+
connection.set("scm:git:[email protected]:elastic/elastic-otel-java.git")
84+
developerConnection.set("scm:git:[email protected]:elastic/elastic-otel-java.git")
85+
url.set("https://github.com/elastic/elastic-otel-java")
86+
}
87+
}
6088
}
6189
}
6290
}
91+
92+
signing {
93+
setRequired({
94+
// only sign in CI
95+
System.getenv("CI") == "true"
96+
})
97+
// use in-memory ascii-armored key in environment variables
98+
useInMemoryPgpKeys(System.getenv("KEY_ID_SECRET"), System.getenv("SECRING_ASC"), System.getenv("KEYPASS_SECRET"))
99+
sign(publishing.publications["maven"])
100+
}

0 commit comments

Comments
 (0)