From f3c36404215c8f2c0ab325ab9c88ea85f21e5f97 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Tue, 16 Feb 2021 23:34:47 +0600 Subject: [PATCH] update publishing scripts --- bot/pubconf.kpsb | 2 +- bot/publish.gradle | 27 +++++++++++++++++++-------- plugin/pubconf.kpsb | 2 +- plugin/publish.gradle | 27 +++++++++++++++++++-------- 4 files changed, 40 insertions(+), 18 deletions(-) diff --git a/bot/pubconf.kpsb b/bot/pubconf.kpsb index d463863..aac6132 100644 --- a/bot/pubconf.kpsb +++ b/bot/pubconf.kpsb @@ -1 +1 @@ -{"bintrayConfig":{"repo":"PlaguBot","packageName":"${project.name}","packageVcs":"https://github.com/InsanusMokrassar/PlaguBot","autoPublish":true,"overridePublish":true},"licenses":[{"id":"Apache-2.0","title":"Apache Software License 2.0","url":"https://github.com/InsanusMokrassar/PlaguBot/LICENSE"}],"mavenConfig":{"name":"PlaguBot ${project.name}","description":"","url":"https://github.com/InsanusMokrassar/PlaguBot","vcsUrl":"ssh://git@github.com/InsanusMokrassar/PlaguBot.git","developers":[{"id":"InsanusMokrassar","name":"Aleksei Ovsiannikov","eMail":"ovsyannikov.alexey95@gmail.com"}]},"type":"JVM"} \ No newline at end of file +{"bintrayConfig":{"repo":"PlaguBot","packageName":"${project.name}","packageVcs":"https://github.com/InsanusMokrassar/PlaguBot","autoPublish":true,"overridePublish":true},"licenses":[{"id":"Apache-2.0","title":"Apache Software License 2.0","url":"https://github.com/InsanusMokrassar/PlaguBot/LICENSE"}],"mavenConfig":{"name":"PlaguBot Bot","description":"Base PlaguBot project","url":"https://github.com/InsanusMokrassar/PlaguBot","vcsUrl":"ssh://git@github.com/InsanusMokrassar/PlaguBot.git","includeGpgSigning":true,"publishToMavenCentral":true,"developers":[{"id":"InsanusMokrassar","name":"Aleksei Ovsiannikov","eMail":"ovsyannikov.alexey95@gmail.com"}]},"type":"JVM"} \ No newline at end of file diff --git a/bot/publish.gradle b/bot/publish.gradle index 30acc17..8bc041f 100644 --- a/bot/publish.gradle +++ b/bot/publish.gradle @@ -1,9 +1,6 @@ apply plugin: 'maven-publish' +apply plugin: 'signing' -task sourcesJar(type: Jar) { - from sourceSets.main.allSource - classifier = 'sources' -} task javadocJar(type: Jar) { from javadoc @@ -15,14 +12,13 @@ publishing { maven(MavenPublication) { from components.java - artifact sourcesJar artifact javadocJar pom { resolveStrategy = Closure.DELEGATE_FIRST - description = "" - name = "PlaguBot ${project.name}" + description = "Base PlaguBot project" + name = "PlaguBot Bot" url = "https://github.com/InsanusMokrassar/PlaguBot" scm { @@ -59,8 +55,23 @@ publishing { password = project.hasProperty('BINTRAY_KEY') ? project.property('BINTRAY_KEY') : System.getenv('BINTRAY_KEY') } } + + maven { + name = "sonatype" + url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/") + credentials { + username = project.hasProperty('SONATYPE_USER') ? project.property('SONATYPE_USER') : System.getenv('SONATYPE_USER') + password = project.hasProperty('SONATYPE_PASSWORD') ? project.property('SONATYPE_PASSWORD') : System.getenv('SONATYPE_PASSWORD') + } + } + } } } -} \ No newline at end of file +} + +signing { + useGpgCmd() + sign publishing.publications +} diff --git a/plugin/pubconf.kpsb b/plugin/pubconf.kpsb index d463863..433c2f0 100644 --- a/plugin/pubconf.kpsb +++ b/plugin/pubconf.kpsb @@ -1 +1 @@ -{"bintrayConfig":{"repo":"PlaguBot","packageName":"${project.name}","packageVcs":"https://github.com/InsanusMokrassar/PlaguBot","autoPublish":true,"overridePublish":true},"licenses":[{"id":"Apache-2.0","title":"Apache Software License 2.0","url":"https://github.com/InsanusMokrassar/PlaguBot/LICENSE"}],"mavenConfig":{"name":"PlaguBot ${project.name}","description":"","url":"https://github.com/InsanusMokrassar/PlaguBot","vcsUrl":"ssh://git@github.com/InsanusMokrassar/PlaguBot.git","developers":[{"id":"InsanusMokrassar","name":"Aleksei Ovsiannikov","eMail":"ovsyannikov.alexey95@gmail.com"}]},"type":"JVM"} \ No newline at end of file +{"bintrayConfig":{"repo":"PlaguBot","packageName":"${project.name}","packageVcs":"https://github.com/InsanusMokrassar/PlaguBot","autoPublish":true,"overridePublish":true},"licenses":[{"id":"Apache-2.0","title":"Apache Software License 2.0","url":"https://github.com/InsanusMokrassar/PlaguBot/LICENSE"}],"mavenConfig":{"name":"PlaguBot Plugin","description":"Base dependency for whole PlaguBot project","url":"https://github.com/InsanusMokrassar/PlaguBot","vcsUrl":"ssh://git@github.com/InsanusMokrassar/PlaguBot.git","includeGpgSigning":true,"publishToMavenCentral":true,"developers":[{"id":"InsanusMokrassar","name":"Aleksei Ovsiannikov","eMail":"ovsyannikov.alexey95@gmail.com"}]},"type":"JVM"} \ No newline at end of file diff --git a/plugin/publish.gradle b/plugin/publish.gradle index 30acc17..624cde7 100644 --- a/plugin/publish.gradle +++ b/plugin/publish.gradle @@ -1,9 +1,6 @@ apply plugin: 'maven-publish' +apply plugin: 'signing' -task sourcesJar(type: Jar) { - from sourceSets.main.allSource - classifier = 'sources' -} task javadocJar(type: Jar) { from javadoc @@ -15,14 +12,13 @@ publishing { maven(MavenPublication) { from components.java - artifact sourcesJar artifact javadocJar pom { resolveStrategy = Closure.DELEGATE_FIRST - description = "" - name = "PlaguBot ${project.name}" + description = "Base dependency for whole PlaguBot project" + name = "PlaguBot Plugin" url = "https://github.com/InsanusMokrassar/PlaguBot" scm { @@ -59,8 +55,23 @@ publishing { password = project.hasProperty('BINTRAY_KEY') ? project.property('BINTRAY_KEY') : System.getenv('BINTRAY_KEY') } } + + maven { + name = "sonatype" + url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/") + credentials { + username = project.hasProperty('SONATYPE_USER') ? project.property('SONATYPE_USER') : System.getenv('SONATYPE_USER') + password = project.hasProperty('SONATYPE_PASSWORD') ? project.property('SONATYPE_PASSWORD') : System.getenv('SONATYPE_PASSWORD') + } + } + } } } -} \ No newline at end of file +} + +signing { + useGpgCmd() + sign publishing.publications +}