Skip to content

Commit

Permalink
feat: force support of jvm 8, but build in jvm 21 for gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
duruer committed Dec 4, 2024
1 parent 2946b3d commit ec93c92
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 10 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: 8
java-version: 21

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

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 Down Expand Up @@ -175,14 +178,22 @@ publishing {
}

deployer {
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")))
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")))
}
}
}

Expand All @@ -201,4 +212,12 @@ signing {
} else {
logger.warn("Signing is not configured. Skipping signing tasks.")
}
}
}

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 ec93c92

Please sign in to comment.