Skip to content

Commit

Permalink
Fix publication problem (#1580)
Browse files Browse the repository at this point in the history
### Description

Fix publication problem
  • Loading branch information
lijamie98 authored Nov 21, 2024
2 parents 1f1b928 + e3a6f85 commit 95a72db
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 77 deletions.
155 changes: 79 additions & 76 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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<MavenPublishPlugin>()
apply<MavenPublishPlugin>()

configure<JavaPluginExtension> {
withJavadocJar()
withSourcesJar()
}
configure<JavaPluginExtension> {
withJavadocJar()
withSourcesJar()
}

configure<PublishingExtension> {
publications {
val main by
creating(MavenPublication::class) {
from(components["java"])
groupId = "org.stellar.anchor-sdk"
configure<PublishingExtension> {
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("[email protected]")
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("[email protected]")
}
developer {
id.set("JakeUrban")
name.set("Jake Urban")
email.set("[email protected]")
}
developer {
id.set("marcelosalloum")
name.set("Marcelo Salloum")
email.set("[email protected]")
}
}
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("[email protected]")
}
developer {
id.set("marcelosalloum")
name.set("Marcelo Salloum")
email.set("[email protected]")
}
}
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<SigningPlugin>()
configure<SigningExtension> { sign(publishing.publications) }
apply<SigningPlugin>()
configure<SigningExtension> {
useGpgCmd()
sign(publishing.publications)
}
}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 95a72db

Please sign in to comment.