diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index c442ad6..e45f8b6 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -9,6 +9,8 @@ on: env: MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} + ORG_GRADLE_PROJECT_signingKey: ${{ secrets.OSSRH_GPG_SECRET_KEY }} + ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} jobs: deploy: diff --git a/build.gradle.kts b/build.gradle.kts index b64eed2..4998283 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -3,6 +3,7 @@ plugins { id("com.google.protobuf") version "0.9.2" apply false `maven-publish` id("org.jlleitschuh.gradle.ktlint") version "11.3.1" + signing } group = "io.github.mscheong01" @@ -115,3 +116,12 @@ tasks.create("updateVersion") { } } } + +if (project.hasProperty("releaseVersion")) { + signing { + val signingKey: String? by project + val signingPassword: String? by project + useInMemoryPgpKeys(signingKey, signingPassword) + sign(publishing.publications) + } +} diff --git a/core/build.gradle.kts b/core/build.gradle.kts index 633523c..923fb2d 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -11,6 +11,7 @@ dependencies { java { withSourcesJar() + withJavadocJar() } publishing { diff --git a/example/build.gradle.kts b/example/build.gradle.kts index 0624693..14e8e35 100644 --- a/example/build.gradle.kts +++ b/example/build.gradle.kts @@ -28,7 +28,6 @@ dependencies { } protobuf { - protoc { artifact = "com.google.protobuf:protoc:${rootProject.ext["protobufVersion"]}" } diff --git a/generator/build.gradle.kts b/generator/build.gradle.kts index 6881d38..d16421c 100644 --- a/generator/build.gradle.kts +++ b/generator/build.gradle.kts @@ -4,6 +4,10 @@ plugins { application } +java { + withJavadocJar() +} + application { mainClass.set("io.github.mscheong01.krotodc.MainExecutor") }