diff --git a/.gitignore b/.gitignore index 7977fed..d43ac93 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ # Gradle .gradle/ build/ +/gradle.properties # Eclipse .classpath diff --git a/build.gradle b/build.gradle index bb4bf2e..16ce5d1 100644 --- a/build.gradle +++ b/build.gradle @@ -22,21 +22,52 @@ dependencies { apply plugin: 'idea' apply plugin: 'maven' +apply plugin: 'signing' -task buildPom { - doLast { - pom { - project { - packaging 'pom' - url 'https://github.com/TeleSign/java_telesign' - organization { - name 'telesign' - } +task javadocJar(type: Jar, dependsOn: javadoc) { + classifier = 'javadoc' + from 'build/docs/javadoc' +} + +task sourcesJar(type: Jar) { + from sourceSets.main.allSource + classifier = 'sources' +} + +artifacts { + archives jar + archives javadocJar + archives sourcesJar +} + +signing { + sign configurations.archives +} + +uploadArchives { + repositories { + mavenDeployer { + beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } + + repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { + authentication(userName: sonatypeUsername, password: sonatypePassword) + } + + pom.project { + name 'TeleSign' + packaging 'jar' description 'The TeleSign Java SDK is a Java library that provides an interface to TeleSign Web ' + 'Services. TeleSign Web Services conform to the REST Web Service Design Model. Services are ' + 'exposed as URI-addressable resources through the set of RESTful procedures in our TeleSign ' + 'REST API.' - inceptionYear '2010' + url 'https://github.com/TeleSign/java_telesign' + + scm { + url 'scm:git@github.com:TeleSign/java_telesign.git' + connection 'scm:git@github.com:TeleSign/java_telesign.git' + developerConnection 'scm:git@github.com:TeleSign/java_telesign.git' + } + licenses { license { name 'MIT License' @@ -48,6 +79,6 @@ task buildPom { } } } - }.writeTo("$buildDir/pom.xml") + } } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index c67d3b9..9ebc15d 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Mon Mar 20 16:18:10 PDT 2017 +#Thu Apr 13 17:28:17 PDT 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-3.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-3.1-all.zip