-
Notifications
You must be signed in to change notification settings - Fork 228
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
72 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
// https://github.com/chenenyu/gradle-bintray-plugin | ||
apply plugin: 'maven-publish' | ||
apply plugin: 'com.jfrog.bintray' | ||
apply plugin: 'maven' | ||
apply plugin: 'signing' | ||
|
||
if (!project.ext.has('GROUP') || !project.ext.has('ARTIFACT') || !project.ext.has('VERSION')) { | ||
throw new MissingPropertyException("Extra properties['GROUP', 'ARTIFACT', 'VERSION'] are required.") | ||
|
@@ -53,58 +52,62 @@ task javadocJar(type: Jar, dependsOn: javadoc) { | |
archiveClassifier.set('javadoc') | ||
} | ||
|
||
project.afterEvaluate { | ||
publishing { | ||
publications { | ||
release(MavenPublication) { | ||
groupId project.ext.GROUP | ||
artifactId project.ext.ARTIFACT | ||
version project.ext.VERSION | ||
artifacts { | ||
if (isJavaModule) { | ||
archives jar | ||
} | ||
archives javadocJar | ||
archives sourcesJar | ||
} | ||
|
||
artifact sourcesJar | ||
artifact javadocJar | ||
if (isAndroidModule) { | ||
from components.release | ||
} else if (isJavaModule) { | ||
from components.java | ||
} | ||
signing { | ||
sign configurations.archives | ||
} | ||
|
||
// pom { | ||
// if (isAndroidModule) { | ||
// packaging 'aar' | ||
// } else if (isJavaModule) { | ||
// packaging 'jar' | ||
// } | ||
// } | ||
uploadArchives { | ||
repositories { | ||
mavenDeployer { | ||
beforeDeployment { MavenDeployment deployment -> | ||
signing.signPom(deployment) | ||
} | ||
} | ||
} | ||
|
||
Properties properties = new Properties() | ||
if (project.rootProject.file('local.properties').exists()) { | ||
properties.load(project.rootProject.file('local.properties').newDataInputStream()) | ||
} | ||
bintray { | ||
user = properties.containsKey('BINTRAY_USER') ? properties.get('BINTRAY_USER') : "" | ||
key = properties.containsKey('BINTRAY_API_KEY') ? properties.get('BINTRAY_API_KEY') : "" | ||
publications = ['release'] | ||
publish = project.ext.has('PUBLISH') ? project.ext.PUBLISH : true | ||
override = project.ext.has('OVERRIDE') ? project.ext.OVERRIDE : false | ||
dryRun = project.ext.has('DRYRUN') ? project.ext.DRYRUN : false | ||
pkg { | ||
repo = project.ext.has('BINTRAY_REPO') ? project.ext.BINTRAY_REPO : 'maven' | ||
name = project.ext.has('BINTRAY_NAME') ? project.ext.BINTRAY_NAME : project.ext.ARTIFACT | ||
licenses = project.ext.has('LICENSES') ? project.ext.LICENSES : ['Apache-2.0'] | ||
vcsUrl = project.ext.has('VCS_URL') ? project.ext.VCS_URL : '' | ||
if (project.ext.has('USER_ORG')) { | ||
userOrg = project.ext.USER_ORG | ||
repository(url: "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") { | ||
authentication(userName: ossrhUsername, password: ossrhPassword) | ||
} | ||
snapshotRepository(url: "https://s01.oss.sonatype.org/content/repositories/snapshots/") { | ||
authentication(userName: ossrhUsername, password: ossrhPassword) | ||
} | ||
publicDownloadNumbers = true | ||
|
||
version { | ||
name = project.ext.VERSION | ||
vcsTag = project.ext.VERSION | ||
pom.project { | ||
if (isAndroidModule) { | ||
packaging 'aar' | ||
} else if (isJavaModule) { | ||
packaging 'jar' | ||
} | ||
groupId project.ext.GROUP | ||
artifactId project.ext.ARTIFACT | ||
version project.ext.VERSION | ||
name "${project.ext.GROUP}:${project.ext.ARTIFACT}" | ||
description 'Awesome android router library.' | ||
url 'https://github.com/chenenyu/Router' | ||
scm { | ||
url 'https://github.com/chenenyu/Router' | ||
connection 'scm:[email protected]:chenenyu/Router.git' | ||
developerConnection 'scm:[email protected]:chenenyu/Router.git' | ||
} | ||
licenses { | ||
license { | ||
name 'The Apache Software License, Version 2.0' | ||
url 'http://www.apache.org/licenses/LICENSE-2.0.txt' | ||
} | ||
} | ||
developers { | ||
developer { | ||
id 'chenenyu' | ||
name 'chenenyu' | ||
email '[email protected]' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
# annotation | ||
./gradlew clean pRPTML -p annotation | ||
./gradlew bintrayUpload -p annotation | ||
./gradlew clean -p annotation | ||
./gradlew uploadArchives -p annotation | ||
|
||
# compiler | ||
./gradlew clean pRPTML -p compiler | ||
./gradlew bintrayUpload -p compiler | ||
./gradlew clean -p compiler | ||
./gradlew uploadArchives -p compiler | ||
|
||
# router | ||
./gradlew clean pRPTML -p router | ||
./gradlew bintrayUpload -p router | ||
./gradlew clean -p router | ||
./gradlew uploadArchives -p router | ||
|
||
# gradle-plugin | ||
./gradlew clean pRPTML -p gradle-plugin | ||
./gradlew bintrayUpload -p gradle-plugin | ||
./gradlew clean -p gradle-plugin | ||
./gradlew uploadArchives -p gradle-plugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.