Skip to content

Commit

Permalink
backup build script.
Browse files Browse the repository at this point in the history
  • Loading branch information
zhi1ong committed Sep 12, 2018
1 parent 88cbeab commit e715c5b
Show file tree
Hide file tree
Showing 6 changed files with 113 additions and 8 deletions.
4 changes: 2 additions & 2 deletions arouter-annotation/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ compileJava {
targetCompatibility = '1.7'
}

apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle'
apply from: '../install.gradle'
apply from: '../bintray.gradle'
4 changes: 2 additions & 2 deletions arouter-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,5 @@ dependencies {
compile "com.android.support:support-v4:${SUPPORT_LIB_VERSION}"
}

apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle'
apply from: '../install.gradle'
apply from: '../bintray.gradle'
4 changes: 2 additions & 2 deletions arouter-compiler/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ dependencies {
compile 'com.alibaba:fastjson:1.2.48'
}

apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle'
apply from: '../install.gradle'
apply from: '../bintray.gradle'
4 changes: 2 additions & 2 deletions arouter-gradle-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ dependencies {
compile 'com.android.tools.build:gradle:2.1.3'
}

apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle'
apply from: '../install.gradle'
apply from: '../bintray.gradle'
61 changes: 61 additions & 0 deletions bintray.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
// backup of [https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle]

apply plugin: 'com.jfrog.bintray'

version = libraryVersion

if (project.hasProperty("android")) { // Android libraries
task sourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.srcDirs
}

task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}
} else { // Java libraries
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
}

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

artifacts {
archives javadocJar
archives sourcesJar
}

// Bintray
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())

bintray {
user = properties.getProperty("bintray.user")
key = properties.getProperty("bintray.apikey")

configurations = ['archives']
pkg {
repo = bintrayRepo
name = bintrayName
desc = libraryDescription
websiteUrl = siteUrl
vcsUrl = gitUrl
licenses = allLicenses
publish = true
publicDownloadNumbers = true
version {
desc = libraryDescription
gpg {
sign = true //Determines whether to GPG sign the files. The default is false
passphrase = properties.getProperty("bintray.gpg.password")
//Optional. The passphrase for GPG signing'
}
}
}
}
44 changes: 44 additions & 0 deletions install.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// backup of [https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle]

apply plugin: 'com.github.dcendents.android-maven'

group = publishedGroupId // Maven Group ID for the artifact

install {
repositories.mavenInstaller {
// This generates POM.xml with proper parameters
pom {
project {
packaging 'aar'
groupId publishedGroupId
artifactId artifact

// Add your description here
name libraryName
description libraryDescription
url siteUrl

// Set your license
licenses {
license {
name licenseName
url licenseUrl
}
}
developers {
developer {
id developerId
name developerName
email developerEmail
}
}
scm {
connection gitUrl
developerConnection gitUrl
url siteUrl

}
}
}
}
}

0 comments on commit e715c5b

Please sign in to comment.