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 +}