Skip to content

Commit

Permalink
Added maven uploadArchives build task and related tasks and configura…
Browse files Browse the repository at this point in the history
…tion.
  • Loading branch information
Jarrad Lee committed Apr 14, 2017
1 parent f555526 commit 8b48696
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 13 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1,6 +1,7 @@
# Gradle
.gradle/
build/
/gradle.properties

# Eclipse
.classpath
Expand Down
53 changes: 42 additions & 11 deletions build.gradle
Expand Up @@ -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'
Expand All @@ -48,6 +79,6 @@ task buildPom {
}
}
}
}.writeTo("$buildDir/pom.xml")
}
}
}
4 changes: 2 additions & 2 deletions 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

0 comments on commit 8b48696

Please sign in to comment.