Skip to content

ci: updating gradle publishing #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions lib/java-server-sdk-otel/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
plugins {
// Apply the java-library plugin for API and implementation separation.
id 'java-library'
id "maven-publish"
id "signing"
id "io.github.gradle-nexus.publish-plugin" version "1.3.0"
}

repositories {
Expand All @@ -19,6 +22,14 @@ repositories {
}
}

allprojects {
group = 'com.launchdarkly'
version = "${version}"
archivesBaseName = 'launchdarkly-java-server-sdk-otel'
sourceCompatibility = 1.8
targetCompatibility = 1.8
}

dependencies {
// Use JUnit test framework.
testImplementation 'junit:junit:4.13.2'
Expand All @@ -28,3 +39,47 @@ dependencies {
implementation "com.launchdarkly:launchdarkly-java-server-sdk:7.4.0-SNAPSHOT"
implementation "io.opentelemetry:opentelemetry-api:1.2.0"
}

publishing {
publications {
mavenJava(MavenPublication) {
from(components["java"])

pom {
name.set("LaunchDarkly Java Server Otel Integration")
url.set("https://github.com/launchdarkly/java-core")
licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
developers {
developer {
name.set("LaunchDarkly SDK Team")
email.set("sdks@launchdarkly.com")
}
}
scm {
connection.set("scm:git:git://github.com/launchdarkly/java-core.git")
developerConnection.set("scm:git:ssh:git@github.com:launchdarkly/java-core.git")
url.set("https://github.com/launchdarkly/java-core")
}
}
}
}
}

nexusPublishing {
clientTimeout = java.time.Duration.ofMinutes(2) // we've seen extremely long delays in creating repositories
repositories {
sonatype {
username = ossrhUsername
password = ossrhPassword
}
}
}

signing {
sign(publishing.publications["mavenJava"])
}
4 changes: 4 additions & 0 deletions lib/java-server-sdk-otel/gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
version=0.1.0
# The following empty ossrh properties are used by LaunchDarkly's internal integration testing framework
# and should not be needed for typical development purposes (including by third-party developers).
ossrhUsername=
ossrhPassword=
2 changes: 1 addition & 1 deletion lib/java-server-sdk-otel/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
* in the user manual at https://docs.gradle.org/8.0.2/userguide/multi_project_builds.html
*/

rootProject.name = 'java-server-sdk-otel'
rootProject.name = 'launchdarkly-java-server-sdk-otel'
include('lib')