Skip to content

Commit

Permalink
Merge branch 'beta' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
DivineThreepwood committed Mar 23, 2022
2 parents 614e81f + f4a9506 commit 4bf2cb4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish-jars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ jobs:
java-version: '17'
distribution: 'adopt'
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
uses: gradle/wrapper-validation-action@v1
- name: Publish package
uses: gradle/gradle-build-action@937999e9cc2425eddc7fd62d1053baf041147db7
uses: gradle/gradle-build-action@v2
with:
arguments: publish
env:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import org.jetbrains.kotlin.gradle.plugin.statistics.ReportStatisticsToElasticSearch.url
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import java.util.Base64

Expand All @@ -14,8 +15,6 @@ plugins {
signing
}

val releaseVersion = !version.toString().endsWith("-SNAPSHOT")

repositories {
mavenLocal()

Expand All @@ -32,6 +31,8 @@ description = "Java Utility Lib"
group = "org.openbase"
version = "3.1.0"

val releaseVersion = !version.toString().endsWith("-SNAPSHOT")

java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = sourceCompatibility
Expand Down Expand Up @@ -122,9 +123,10 @@ publishing {
username = findProperty("MAVEN_CENTRAL_USERNAME")?.let { it as String? }
password = findProperty("MAVEN_CENTRAL_TOKEN")?.let { it as String? }
}
val releasesRepoUrl = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2")
val snapshotsRepoUrl = uri("https://oss.sonatype.org/content/repositories/snapshots")
url = if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl
val releasesRepoUrl = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
val snapshotsRepoUrl = uri("https://oss.sonatype.org/content/repositories/snapshots/")
url = if (releaseVersion) releasesRepoUrl else snapshotsRepoUrl
println("Selected repo to deploy: $url")
}
}
}
Expand All @@ -137,6 +139,7 @@ signing {
?.let { String(it) }
?:run {
// Signing skipped because of missing private key.
println("Signing skipped because of missing private key.")
return@signing
}

Expand All @@ -150,6 +153,7 @@ signing {
privateKey,
passphrase
)
println("Sign ${project.name}-${project.version}")
sign(publishing.publications["mavenJava"])
}

Expand Down

0 comments on commit 4bf2cb4

Please sign in to comment.