Skip to content

Commit

Permalink
Fix back to JVM 8 in release and use jreleaser instead of other deplo…
Browse files Browse the repository at this point in the history
…y tool
  • Loading branch information
duruer committed Dec 5, 2024
1 parent ec93c92 commit 6f11713
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
java-version: 8

- name: Build with Gradle
uses: gradle/actions/setup-gradle@v4
Expand Down
51 changes: 31 additions & 20 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

import com.github.jengelman.gradle.plugins.shadow.ShadowExtension
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
import java.util.*

val vertxVersion: String by project
Expand All @@ -20,7 +19,7 @@ plugins {
application
`maven-publish`
signing
id("io.deepmedia.tools.deployer") version "0.15.0"
id("org.jreleaser") version "1.15.0"
}

group = "dev.parsek"
Expand Down Expand Up @@ -177,26 +176,40 @@ publishing {
}
}

deployer {
if (System.getenv("OSSRH_USERNAME") != null && System.getenv("OSSRH_PASSWORD") != null) {
centralPortalSpec {
// Take these credentials from the Generate User Token page at https://central.sonatype.com/account
auth.user.set(secret(System.getenv("OSSRH_USERNAME")))
auth.password.set(secret(System.getenv("OSSRH_PASSWORD")))

// Signing is required
signing.key.set(
secret(
String(
Base64.getDecoder().decode(System.getenv("GPG_PRIVATE_KEY").replace("\n", ""))
)
)
)
signing.password.set(secret(System.getenv("GPG_PASSPHRASE")))
jreleaser {
deploy {
maven {
mavenCentral {
create("app") {
setActive("ALWAYS")
url.set("https://central.sonatype.com/api/v1/publisher")
stagingRepository("target/staging-deploy")
}
}
}
}
}

//deployer {
// if (System.getenv("OSSRH_USERNAME") != null && System.getenv("OSSRH_PASSWORD") != null) {
// centralPortalSpec {
// // Take these credentials from the Generate User Token page at https://central.sonatype.com/account
// auth.user.set(secret(System.getenv("OSSRH_USERNAME")))
// auth.password.set(secret(System.getenv("OSSRH_PASSWORD")))
//
// // Signing is required
// signing.key.set(
// secret(
// String(
// Base64.getDecoder().decode(System.getenv("GPG_PRIVATE_KEY").replace("\n", ""))
// )
// )
// )
// signing.password.set(secret(System.getenv("GPG_PASSPHRASE")))
// }
// }
//}

java {
withJavadocJar()
withSourcesJar()
Expand All @@ -217,7 +230,5 @@ signing {
kotlin {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_1_8)
apiVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_1_8)
languageVersion.set(KotlinVersion.KOTLIN_1_8)
}
}

0 comments on commit 6f11713

Please sign in to comment.