9
9
plugins {
10
10
// Apply the java-library plugin for API and implementation separation.
11
11
id ' java-library'
12
+ id " maven-publish"
13
+ id " signing"
14
+ id " io.github.gradle-nexus.publish-plugin" version " 1.3.0"
12
15
}
13
16
14
17
repositories {
@@ -19,6 +22,14 @@ repositories {
19
22
}
20
23
}
21
24
25
+ allprojects {
26
+ group = ' com.launchdarkly'
27
+ version = " ${ version} "
28
+ archivesBaseName = ' launchdarkly-java-server-sdk-otel'
29
+ sourceCompatibility = 1.8
30
+ targetCompatibility = 1.8
31
+ }
32
+
22
33
dependencies {
23
34
// Use JUnit test framework.
24
35
testImplementation ' junit:junit:4.13.2'
@@ -28,3 +39,47 @@ dependencies {
28
39
implementation " com.launchdarkly:launchdarkly-java-server-sdk:7.4.0-SNAPSHOT"
29
40
implementation " io.opentelemetry:opentelemetry-api:1.2.0"
30
41
}
42
+
43
+ publishing {
44
+ publications {
45
+ mavenJava(MavenPublication ) {
46
+ from(components[" java" ])
47
+
48
+ pom {
49
+ name. set(" LaunchDarkly Java Server Otel Integration" )
50
+ url. set(" https://github.com/launchdarkly/java-core" )
51
+ licenses {
52
+ license {
53
+ name. set(" The Apache License, Version 2.0" )
54
+ url. set(" http://www.apache.org/licenses/LICENSE-2.0.txt" )
55
+ }
56
+ }
57
+ developers {
58
+ developer {
59
+ name. set(" LaunchDarkly SDK Team" )
60
+
61
+ }
62
+ }
63
+ scm {
64
+ connection. set(" scm:git:git://github.com/launchdarkly/java-core.git" )
65
+ developerConnection
. set(
" scm:git:ssh:[email protected] :launchdarkly/java-core.git" )
66
+ url. set(" https://github.com/launchdarkly/java-core" )
67
+ }
68
+ }
69
+ }
70
+ }
71
+ }
72
+
73
+ nexusPublishing {
74
+ clientTimeout = java.time.Duration . ofMinutes(2 ) // we've seen extremely long delays in creating repositories
75
+ repositories {
76
+ sonatype {
77
+ username = ossrhUsername
78
+ password = ossrhPassword
79
+ }
80
+ }
81
+ }
82
+
83
+ signing {
84
+ sign(publishing. publications[" mavenJava" ])
85
+ }
0 commit comments