From 02833ecee168e2a415739be20c8be7f435168551 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Thu, 18 Feb 2021 00:44:25 +0600 Subject: [PATCH] update publication scripts --- maven publish.kpsb | 2 +- publish.gradle | 28 +++++++++++++++++++++++++++- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/maven publish.kpsb b/maven publish.kpsb index 662ce74..f82c833 100644 --- a/maven publish.kpsb +++ b/maven publish.kpsb @@ -1 +1 @@ -{"licenses":[],"mavenConfig":{"name":"${project.name}","description":"${project.name}","url":"https://github.com/InsanusMokrassar/CaptchaPlaguBotPlugin","vcsUrl":"https://github.com/InsanusMokrassar/CaptchaPlaguBotPlugin.git","developers":[]},"type":"JVM"} \ No newline at end of file +{"licenses":[{"id":"Apache-2.0","title":"Apache Software License 2.0","url":"https://github.com/InsanusMokrassar/CaptchaPlaguBotPlugin/blob/master/LICENSE"}],"mavenConfig":{"name":"${project.name}","description":"${project.name}","url":"https://github.com/InsanusMokrassar/CaptchaPlaguBotPlugin","vcsUrl":"https://github.com/InsanusMokrassar/CaptchaPlaguBotPlugin.git","includeGpgSigning":true,"publishToMavenCentral":true,"developers":[{"id":"InsanusMokrassar","name":"Ovsiannikov Aleksei","eMail":"ovsyannikov.alexey95@gmail.com"}]},"type":"JVM"} \ No newline at end of file diff --git a/publish.gradle b/publish.gradle index d3b0b33..2b0669b 100644 --- a/publish.gradle +++ b/publish.gradle @@ -1,4 +1,5 @@ apply plugin: 'maven-publish' +apply plugin: 'signing' task javadocJar(type: Jar) { @@ -32,13 +33,38 @@ publishing { developers { + developer { + id = "InsanusMokrassar" + name = "Ovsiannikov Aleksei" + email = "ovsyannikov.alexey95@gmail.com" + } + } licenses { + license { + name = "Apache Software License 2.0" + url = "https://github.com/InsanusMokrassar/CaptchaPlaguBotPlugin/blob/master/LICENSE" + } + + } + } + repositories { + 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') + } } } - } } } + +signing { + useGpgCmd() + sign publishing.publications +}