From e3a6f85dd622d2d57e0929b5ff87d584587fca72 Mon Sep 17 00:00:00 2001 From: Jamie Li Date: Tue, 19 Nov 2024 16:27:00 -0800 Subject: [PATCH] Fix publication problem --- core/build.gradle.kts | 155 ++++++++++++----------- gradle/wrapper/gradle-wrapper.properties | 2 +- 2 files changed, 80 insertions(+), 77 deletions(-) diff --git a/core/build.gradle.kts b/core/build.gradle.kts index 1deefff34d..1503cd421f 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -1,100 +1,103 @@ plugins { - `java-library` - `maven-publish` - signing - id("org.jetbrains.kotlin.jvm") version "1.6.10" + `java-library` + `maven-publish` + signing + id("org.jetbrains.kotlin.jvm") version "1.6.10" } version = "1.0.22" dependencies { - compileOnly(libs.servlet.api) + compileOnly(libs.servlet.api) - compileOnly(libs.slf4j.api) - api(libs.lombok) + compileOnly(libs.slf4j.api) + api(libs.lombok) - annotationProcessor(libs.lombok) + annotationProcessor(libs.lombok) - compileOnly(libs.servlet.api) + compileOnly(libs.servlet.api) - implementation(libs.apache.commons.lang3) - implementation(libs.log4j.core) - implementation(libs.httpclient) - implementation(libs.google.gson) - implementation(libs.toml4j) - implementation(libs.okhttp3) - implementation(libs.commons.codec) - implementation(libs.jjwt) - implementation(libs.reactor.core) - implementation(libs.jakarta.xml.bind.api) - implementation(libs.java.stellar.sdk) + implementation(libs.apache.commons.lang3) + implementation(libs.log4j.core) + implementation(libs.httpclient) + implementation(libs.google.gson) + implementation(libs.toml4j) + implementation(libs.okhttp3) + implementation(libs.commons.codec) + implementation(libs.jjwt) + implementation(libs.reactor.core) + implementation(libs.jakarta.xml.bind.api) + implementation(libs.java.stellar.sdk) - testImplementation(libs.servlet.api) - testImplementation(libs.slf4j.api) + testImplementation(libs.servlet.api) + testImplementation(libs.slf4j.api) } publishing { - apply() + apply() - configure { - withJavadocJar() - withSourcesJar() - } + configure { + withJavadocJar() + withSourcesJar() + } - configure { - publications { - val main by - creating(MavenPublication::class) { - from(components["java"]) - groupId = "org.stellar.anchor-sdk" + configure { + publications { + val main by + creating(MavenPublication::class) { + from(components["java"]) + groupId = "org.stellar.anchor-sdk" - pom { - name.set("stellar-anchor-sdk") - description.set("Stellar Anchor SDK - Java") - url.set("https://www.github.com/stellar/java-stellar-anchor-sdk") - licenses { - license { - name.set("Apache 2.0") - url.set("https://github.com/stellar/java-stellar-anchor-sdk/blob/main/LICENSE") - } - } - developers { - developer { - id.set("lijamie98") - name.set("Jamie Li") - email.set("jamie@stellar.org") + pom { + name.set("stellar-anchor-sdk") + description.set("Stellar Anchor SDK - Java") + url.set("https://www.github.com/stellar/java-stellar-anchor-sdk") + licenses { + license { + name.set("Apache 2.0") + url.set("https://github.com/stellar/java-stellar-anchor-sdk/blob/main/LICENSE") + } + } + developers { + developer { + id.set("lijamie98") + name.set("Jamie Li") + email.set("jamie@stellar.org") + } + developer { + id.set("JakeUrban") + name.set("Jake Urban") + email.set("jake@stellar.org") + } + developer { + id.set("marcelosalloum") + name.set("Marcelo Salloum") + email.set("marcelo@stellar.org") + } + } + scm { + connection.set("scm:git:git://github.com/stellar/java-stellar-anchor-sdk") + developerConnection.set("scm:git:git://github.com/stellar/java-stellar-anchor-sdk") + url.set("https://github.com/stellar/java-stellar-anchor-sdk") + } } - developer { - id.set("JakeUrban") - name.set("Jake Urban") - email.set("jake@stellar.org") - } - developer { - id.set("marcelosalloum") - name.set("Marcelo Salloum") - email.set("marcelo@stellar.org") + } + } + repositories { + maven { + name = "OSSRH" + setUrl("https://oss.sonatype.org/service/local/staging/deploy/maven2") + credentials { + username = System.getenv("OSSRH_USER") ?: return@credentials + password = System.getenv("OSSRH_PASSWORD") ?: return@credentials } - } - scm { - connection.set("scm:git:git://github.com/stellar/java-stellar-anchor-sdk") - developerConnection.set("scm:git:git://github.com/stellar/java-stellar-anchor-sdk") - url.set("https://github.com/stellar/java-stellar-anchor-sdk") - } } - } - } - repositories { - maven { - name = "OSSRH" - setUrl("https://oss.sonatype.org/service/local/staging/deploy/maven2") - credentials { - username = System.getenv("OSSRH_USER") ?: return@credentials - password = System.getenv("OSSRH_PASSWORD") ?: return@credentials } - } } - } - apply() - configure { sign(publishing.publications) } + apply() + configure { + useGpgCmd() + sign(publishing.publications) + } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 774fae8767..ae04661ee7 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists