diff --git a/README.md b/README.md index 7764c5d..1d4dba1 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Hummingbird requires a minimum of Java 8. Hummingbird is hosted in Maven Central and can be added as a dependency with the following: ``` -implementation('com.sparrowwallet:hummingbird:1.7.2') +implementation('com.sparrowwallet:hummingbird:1.7.3') ``` ## Usage diff --git a/build.gradle b/build.gradle index d44c221..9a21024 100644 --- a/build.gradle +++ b/build.gradle @@ -1,22 +1,13 @@ -buildscript { - repositories { - jcenter() - } - dependencies { - classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1' - } -} - plugins { id 'java-library' - id 'io.codearte.nexus-staging' version '0.22.0' + id 'maven-publish' + id "signing" + id "io.github.gradle-nexus.publish-plugin" version "1.3.0" } -apply plugin: 'com.bmuschko.nexus' - archivesBaseName = 'hummingbird' group 'com.sparrowwallet' -version '1.7.2' +version '1.7.3' repositories { mavenCentral() @@ -27,57 +18,62 @@ dependencies { testCompile group: 'junit', name: 'junit', version: '4.12' } +java { + withJavadocJar() + withSourcesJar() +} + jar { manifest { attributes 'Automatic-Module-Name' : 'com.sparrowwallet.hummingbird' } } -modifyPom { - project { - name 'hummingbird' - description 'Java implementation of Uniform Resources (UR)' - url 'https://github.com/sparrowwallet/hummingbird' - inceptionYear '2020' +publishing { + publications { + mavenJava(MavenPublication) { + from(components.java) - scm { - url 'https://github.com/sparrowwallet/hummingbird' - connection 'scm:https://github.com/sparrowwallet/hummingbird.git' - developerConnection 'scm:git@github.com:sparrowwallet/hummingbird.git' - } - - licenses { - license { - name 'The Apache Software License, Version 2.0' - url 'http://www.apache.org/licenses/LICENSE-2.0.txt' - distribution 'repo' - } - } - - developers { - developer { - id 'craigraw' - name 'Craig Raw' - email 'mail@sparrowwallet.com' + pom { + name.set("hummingbird") + description.set("Java implementation of Uniform Resources (UR)") + url.set("https://github.com/sparrowwallet/hummingbird") + licenses { + license { + name.set("The Apache Software License, Version 2.0") + url.set("http://www.apache.org/licenses/LICENSE-2.0.txt") + } + } + developers { + developer { + id.set("craigraw") + name.set("Craig Raw") + email.set("mail@sparrowwallet.com") + } + } + scm { + connection.set("scm:https://github.com/sparrowwallet/hummingbird.git") + developerConnection.set("scm:git@github.com:sparrowwallet/hummingbird.git") + url.set("https://github.com/sparrowwallet/hummingbird") + } } } } } -extraArchive { - sources = true - tests = true - javadoc = true +nexusPublishing { + packageGroup = "com.sparrowwallet.hummingbird" + repositories { + sonatype { + stagingProfileId = "a63b4b5e2bff9" + username = project.findProperty("nexusUsername") + password = project.findProperty("nexusPassword") + } + } } -nexus { - sign = true - repositoryUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/' - snapshotRepositoryUrl = 'https://oss.sonatype.org/content/repositories/snapshots/' +signing { + sign publishing.publications.mavenJava } -nexusStaging { - -} - -/* See https://www.albertgao.xyz/2018/01/18/how-to-publish-artifact-to-maven-central-via-gradle/ */ \ No newline at end of file +/* ./gradlew publishToSonatype closeAndReleaseStagingRepository */ \ No newline at end of file