Skip to content
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
34 changes: 14 additions & 20 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {
id("com.diffplug.spotless") version "8.4.0"
id("com.github.ben-manes.versions") version "0.54.0"
id("io.freefair.lombok") version "9.2.0"
id("com.gradleup.nmcp.aggregation").version("1.4.4")
id("com.gradleup.nmcp").version("1.4.4")
kotlin("jvm") version "2.3.20"
}

Expand All @@ -24,6 +24,10 @@ kotlin {
jvmToolchain(8)
}

repositories {
mavenCentral()
}

spotless {
java {
importOrder("java", "javax", "org.stellar")
Expand All @@ -36,10 +40,6 @@ spotless {
}
}

repositories {
mavenCentral()
}

dependencies {
val okhttpVersion = "4.12.0"

Expand Down Expand Up @@ -78,12 +78,12 @@ tasks {
dependsOn(testClasses)
}

val sourcesJar by creating(Jar::class) {
val sourcesJar by registering(Jar::class) {
archiveClassifier = "sources"
from(sourceSets.main.get().allSource)
}

val uberJar by creating(Jar::class) {
val uberJar by registering(Jar::class) {
// https://docs.gradle.org/current/userguide/working_with_files.html#sec:creating_uber_jar_exampl
archiveClassifier = "uber"
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
Expand All @@ -107,7 +107,7 @@ tasks {
}
}

val javadocJar by creating(Jar::class) {
val javadocJar by registering(Jar::class) {
archiveClassifier = "javadoc"
dependsOn(javadoc)
from(javadoc.get().destinationDir) // It needs to be placed after the javadoc task, otherwise it cannot read the path we set.
Expand Down Expand Up @@ -139,6 +139,10 @@ tasks {
dependsOn(jacocoTestReport)
}

assemble {
dependsOn(sourcesJar, uberJar, javadocJar)
}

compileJava {
options.encoding = "UTF-8"
}
Expand All @@ -148,13 +152,6 @@ tasks {
}
}

artifacts {
archives(tasks.jar)
archives(tasks["uberJar"])
archives(tasks["javadocJar"])
archives(tasks["sourcesJar"])
}

publishing {
publications {
create<MavenPublication>("mavenJava") {
Expand Down Expand Up @@ -213,16 +210,13 @@ signing {
sign(publishing.publications["mavenJava"])
}

nmcpAggregation {
centralPortal {
nmcp {
publishAllPublicationsToCentralPortal {
username = System.getenv("SONATYPE_USERNAME")
password = System.getenv("SONATYPE_PASSWORD")
// publish manually from the portal
publishingType = "USER_MANAGED"
// or if you want to publish automatically
// publishingType = "AUTOMATIC"
}

// Publish all projects that apply the 'maven-publish' plugin
publishAllProjectsProbablyBreakingProjectIsolation()
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 3 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#Thu Sep 14 18:53:02 CST 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
50 changes: 32 additions & 18 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 22 additions & 18 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading