Skip to content

Commit

Permalink
chore(gradle): clean up gradle scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
kt3k committed Nov 5, 2016
1 parent b14d533 commit 958350f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 14 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
id 'eclipse'
id 'net.saliman.cobertura' version '2.2.5'
id 'com.github.kt3k.coveralls' version '2.0.1'
id 'com.jfrog.bintray' version '0.5'
id 'com.jfrog.bintray' version '1.7'

}

Expand Down
16 changes: 4 additions & 12 deletions gradle/maven-and-signing.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,27 @@ apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'

def getRepoURL() {
return properties.'sonatype.url' || 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
def getSonatypeURL() {
return 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}


task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}


artifacts {
archives jar
archives jar

archives javadocJar
archives sourcesJar
}


// sign archives if signatory exists
if (signing.signatory) {

Expand All @@ -37,19 +34,16 @@ if (signing.signatory) {

}


uploadArchives {
repositories {
mavenDeployer {

// sign pom if signatory exists
if (signing.signatory) {
beforeDeployment {
signing.signPom(it)
}

repository(url: getRepoURL()) {

repository(url: sonatypeURL) {
authentication userName: properties['sonatype.username'], password: properties['sonatype.password']
}
}
Expand Down Expand Up @@ -85,7 +79,6 @@ uploadArchives {
}
}


def pomConfig = {
licenses {
license {
Expand All @@ -103,7 +96,6 @@ def pomConfig = {
}
}


publishing {
publications {
my(MavenPublication) {
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-3.1-bin.zip

0 comments on commit 958350f

Please sign in to comment.