From 06e5ad3fc06c095a661164c9321c3d5941d01de9 Mon Sep 17 00:00:00 2001 From: Alejandro Serrano Date: Sun, 25 Sep 2022 20:59:22 +0200 Subject: [PATCH] Prepare for publication, try again again again --- .github/workflows/release.yml | 4 +++- .../kotlin/buildsrc/conventions/kotlin-jvm.gradle.kts | 5 +++++ .../kotlin/buildsrc/conventions/maven-publish.gradle.kts | 9 +++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6d23fac..c38ac44 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,4 +24,6 @@ jobs: env: MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} - RELEASE_TAG: ${{ github.ref_name }} \ No newline at end of file + RELEASE_TAG: ${{ github.ref_name }} + ORG_GRADLE_PROJECT_signingKey: ${{ secrets.PGP_SECRET }} + ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.PGP_PASSPHRASE }} \ No newline at end of file diff --git a/buildSrc/src/main/kotlin/buildsrc/conventions/kotlin-jvm.gradle.kts b/buildSrc/src/main/kotlin/buildsrc/conventions/kotlin-jvm.gradle.kts index 0eaa374..860bfe3 100644 --- a/buildSrc/src/main/kotlin/buildsrc/conventions/kotlin-jvm.gradle.kts +++ b/buildSrc/src/main/kotlin/buildsrc/conventions/kotlin-jvm.gradle.kts @@ -26,3 +26,8 @@ tasks.test { tasks.withType().configureEach { kotlinOptions.jvmTarget = "1.8" } + +java { + withSourcesJar() + withJavadocJar() +} diff --git a/buildSrc/src/main/kotlin/buildsrc/conventions/maven-publish.gradle.kts b/buildSrc/src/main/kotlin/buildsrc/conventions/maven-publish.gradle.kts index 09f889f..959d940 100644 --- a/buildSrc/src/main/kotlin/buildsrc/conventions/maven-publish.gradle.kts +++ b/buildSrc/src/main/kotlin/buildsrc/conventions/maven-publish.gradle.kts @@ -4,6 +4,7 @@ import java.net.URI plugins { `maven-publish` + signing } publishing { @@ -12,6 +13,7 @@ publishing { pom { description.set("Little utilities for more pleasant immutable data in Kotlin") url.set("https://kopy.at") + name.set("KopyKat") licenses { license { name.set("The Apache License, Version 2.0") @@ -54,3 +56,10 @@ plugins.withType().configureEach { } } } + +signing { + val signingKey: String? by project + val signingPassword: String? by project + useInMemoryPgpKeys(signingKey, signingPassword) + sign(publishing.publications["maven"]) +}