From e6381b3d073cda95db94df89aa5e2f98f1f11e8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Kwiecin=CC=81ski?= Date: Sat, 27 Feb 2021 12:08:36 +0100 Subject: [PATCH 1/3] Cleanup workflows --- .github/workflows/publish_release.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish_release.yml b/.github/workflows/publish_release.yml index 64e41f6..8697a90 100644 --- a/.github/workflows/publish_release.yml +++ b/.github/workflows/publish_release.yml @@ -15,9 +15,7 @@ env: jobs: build: - runs-on: ubuntu-latest - steps: - uses: actions/checkout@v2 with: @@ -26,16 +24,18 @@ jobs: uses: actions/setup-java@v1 with: java-version: 15 + - name: Cache .gradle + uses: burrunan/gradle-cache-action@v1 - name: Unwrap GPG key env: GPG_KEY_CONTENTS: ${{ secrets.GPG_KEY_CONTENTS }} SIGNING_SECRET_KEY_RING_FILE: ${{ secrets.SIGNING_SECRET_KEY_RING_FILE }} run: sudo bash -c "echo '$GPG_KEY_CONTENTS' | base64 -d > '$SIGNING_SECRET_KEY_RING_FILE'" - name: Build app with Gradle - run: ./gradlew build + run: ./gradlew assemble + - name: Publish to Maven Central + run: ./gradlew publishMavenJavaPublicationToMavenCentralRepository - name: Publish to Github Package Registry run: ./gradlew publishMavenJavaPublicationToGithubRepository - name: Publish CLI to Github Package Registry run: ./gradlew publishShadowPublicationToGithubRepository - - name: Publish to Maven Central - run: ./gradlew publishMavenJavaPublicationToMavenCentralRepository From 982397afcdd454a523ca617248cd3d795182face Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Kwiecin=CC=81ski?= Date: Sat, 27 Feb 2021 12:17:32 +0100 Subject: [PATCH 2/3] Add javadoc publishing --- buildSrc/src/main/kotlin/PublishingPlugin.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/buildSrc/src/main/kotlin/PublishingPlugin.kt b/buildSrc/src/main/kotlin/PublishingPlugin.kt index f825dfc..d923bac 100644 --- a/buildSrc/src/main/kotlin/PublishingPlugin.kt +++ b/buildSrc/src/main/kotlin/PublishingPlugin.kt @@ -14,6 +14,7 @@ class PublishingPlugin : Plugin { extensions.configure { withSourcesJar() + withJavadocJar() } extensions.configure { with(repositories) { From 150d6ec6cd945a3a56227006c25627ef252c5e3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Kwiecin=CC=81ski?= Date: Sat, 27 Feb 2021 12:29:03 +0100 Subject: [PATCH 3/3] Provide additional pom information --- buildSrc/src/main/kotlin/PublishingPlugin.kt | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/buildSrc/src/main/kotlin/PublishingPlugin.kt b/buildSrc/src/main/kotlin/PublishingPlugin.kt index d923bac..320ee41 100644 --- a/buildSrc/src/main/kotlin/PublishingPlugin.kt +++ b/buildSrc/src/main/kotlin/PublishingPlugin.kt @@ -46,8 +46,23 @@ class PublishingPlugin : Plugin { } } with(publications) { - register("mavenJava", MavenPublication::class.java) { - it.from(components.getByName("java")) + register("mavenJava", MavenPublication::class.java) { publication -> + publication.from(components.getByName("java")) + publication.pom { pom -> + pom.description.set("A tool that scans sources for all resolved lisks to public trackers") + pom.url.set("https://github.com/usefulness/issuechecker") + pom.licenses { licenses -> + licenses.license { license -> + license.name.set("MIT") + license.url.set("https://github.com/usefulness/issuechecker/blob/master/LICENSE") + } + } + pom.scm { scm -> + scm.connection.set("scm:git:github.com/usefulness/issuechecker.git") + scm.developerConnection.set("scm:git:ssh://github.com/usefulness/issuechecker.git") + scm.url.set("https://github.com/usefulness/issuechecker/tree/master") + } + } } } }