|
|
@ -1,10 +1,9 @@ |
|
|
|
group = PROJ_GROUP |
|
|
|
group = PROJ_GROUP_ID |
|
|
|
version = PROJ_VERSION |
|
|
|
version = PROJ_VERSION |
|
|
|
project.archivesBaseName = PROJ_ARTIFACTID |
|
|
|
project.archivesBaseName = PROJ_ARTIFACT_ID |
|
|
|
apply plugin: 'com.jfrog.bintray' |
|
|
|
apply plugin: 'com.jfrog.bintray' |
|
|
|
apply plugin: 'com.github.dcendents.android-maven' |
|
|
|
apply plugin: 'com.github.dcendents.android-maven' |
|
|
|
//apply plugin: "com.jfrog.artifactory" |
|
|
|
//输入:gradlew bintrayupload 执行 |
|
|
|
//apply plugin: 'maven-publish' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
task sourcesJar(type: Jar) { |
|
|
|
task sourcesJar(type: Jar) { |
|
|
|
from android.sourceSets.main.java.srcDirs |
|
|
|
from android.sourceSets.main.java.srcDirs |
|
|
@ -29,7 +28,7 @@ javadoc { |
|
|
|
author true |
|
|
|
author true |
|
|
|
version true |
|
|
|
version true |
|
|
|
links "http://docs.oracle.com/javase/7/docs/api" |
|
|
|
links "http://docs.oracle.com/javase/7/docs/api" |
|
|
|
title PROJ_ARTIFACTID |
|
|
|
title PROJ_ARTIFACT_ID |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -72,98 +71,68 @@ artifacts { |
|
|
|
archives sourcesJar |
|
|
|
archives sourcesJar |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//def pomConfig = { |
|
|
|
|
|
|
|
// scm { |
|
|
|
|
|
|
|
// connection PROJ_VCSURL |
|
|
|
|
|
|
|
// developerConnection PROJ_VCSURL |
|
|
|
|
|
|
|
// url PROJ_WEBSITEURL |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// licenses { |
|
|
|
|
|
|
|
// license { |
|
|
|
|
|
|
|
// name "The Apache Software License, Version 2.0" |
|
|
|
|
|
|
|
// url "http://www.apache.org/licenses/LICENSE-2.0.txt" |
|
|
|
|
|
|
|
// distribution "repo" |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// developers { |
|
|
|
|
|
|
|
// developer { |
|
|
|
|
|
|
|
// id DEVELOPER_ID |
|
|
|
|
|
|
|
// name DEVELOPER_NAME |
|
|
|
|
|
|
|
// email DEVELOPER_EMAIL |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// "dependencies " { |
|
|
|
|
|
|
|
// // dependency { |
|
|
|
|
|
|
|
// // groupId "com.alibaba" |
|
|
|
|
|
|
|
// // artifactId "fastjson" |
|
|
|
|
|
|
|
// // "version " "1.2.6" |
|
|
|
|
|
|
|
// // //同dependencies |
|
|
|
|
|
|
|
// // } |
|
|
|
|
|
|
|
// // } |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
//} |
|
|
|
|
|
|
|
// |
|
|
|
|
|
|
|
//publishing { |
|
|
|
|
|
|
|
// publications { |
|
|
|
|
|
|
|
// mavenJava(MavenPublication) { |
|
|
|
|
|
|
|
// artifactId PROJ_ARTIFACTID |
|
|
|
|
|
|
|
// artifact javadocJar |
|
|
|
|
|
|
|
// artifact sourcesJar |
|
|
|
|
|
|
|
// |
|
|
|
|
|
|
|
// pom { |
|
|
|
|
|
|
|
// packaging 'aar' |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// pom.withXml { |
|
|
|
|
|
|
|
// def root = asNode() |
|
|
|
|
|
|
|
// root.appendNode('description', PROJ_DESCRIPTION) |
|
|
|
|
|
|
|
// root.children().last() + pomConfig |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
//} |
|
|
|
|
|
|
|
// |
|
|
|
|
|
|
|
//afterEvaluate { |
|
|
|
|
|
|
|
// publishing.publications.mavenJava.artifact(bundleRelease) |
|
|
|
|
|
|
|
//} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bintray { |
|
|
|
bintray { |
|
|
|
user = hasProperty("bintrayUser") ? getProperty("bintrayUser") : getProperty("BINTRAY_USER") |
|
|
|
user = hasProperty("bintrayUser") ? getProperty("bintrayUser") : getProperty("BINTRAY_USER") |
|
|
|
key = hasProperty("bintrayKey") ? getProperty("bintrayKey") : getProperty("BINTRAY_KEY") |
|
|
|
key = hasProperty("bintrayKey") ? getProperty("bintrayKey") : getProperty("BINTRAY_KEY") |
|
|
|
|
|
|
|
|
|
|
|
configurations = ['archives'] |
|
|
|
configurations = ['archives'] |
|
|
|
publications = ['mavenJava'] |
|
|
|
publications = ['mavenJava'] |
|
|
|
publish = true |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pkg { |
|
|
|
pkg { |
|
|
|
repo = 'maven' |
|
|
|
repo = PROJ_REPE |
|
|
|
name = PROJ_NAME |
|
|
|
name = PROJ_NAME |
|
|
|
desc = PROJ_DESCRIPTION |
|
|
|
desc = PROJ_DESCRIPTION |
|
|
|
websiteUrl = PROJ_WEBSITEURL |
|
|
|
websiteUrl = PROJ_WEB_SITE_URL |
|
|
|
issueTrackerUrl = PROJ_ISSUETRACKERURL |
|
|
|
issueTrackerUrl = PROJ_ISSUE_TRACKER_URL |
|
|
|
vcsUrl = PROJ_VCSURL |
|
|
|
vcsUrl = PROJ_VCS_URL |
|
|
|
licenses = ['Apache-2.0'] |
|
|
|
publish = true |
|
|
|
publicDownloadNumbers = true |
|
|
|
publicDownloadNumbers = true |
|
|
|
|
|
|
|
licenses = LICENSES |
|
|
|
|
|
|
|
// 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' |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// } |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
artifactory { |
|
|
|
install { |
|
|
|
contextUrl = 'http://oss.jfrog.org/artifactory' |
|
|
|
repositories.mavenInstaller { |
|
|
|
resolve { |
|
|
|
// This generates POM.xml with proper parameters |
|
|
|
repository { |
|
|
|
pom { |
|
|
|
repoKey = 'libs-release' |
|
|
|
project { |
|
|
|
} |
|
|
|
packaging 'aar' |
|
|
|
} |
|
|
|
groupId PROJ_GROUP_ID |
|
|
|
publish { |
|
|
|
artifactId PROJ_ARTIFACT_ID |
|
|
|
repository { |
|
|
|
|
|
|
|
repoKey = 'oss-snapshot-local' //The Artifactory repository key to publish to |
|
|
|
// Add your description here |
|
|
|
username = bintray.user |
|
|
|
name PROJ_NAME |
|
|
|
password = bintray.key |
|
|
|
description PROJ_DESCRIPTION |
|
|
|
maven = true |
|
|
|
url PROJ_WEB_SITE_URL |
|
|
|
} |
|
|
|
|
|
|
|
defaults { |
|
|
|
// Set your license |
|
|
|
publications('mavenJava') |
|
|
|
licenses { |
|
|
|
publishArtifacts = true |
|
|
|
license { |
|
|
|
|
|
|
|
name LICENSE_NAME |
|
|
|
|
|
|
|
url LICENSE_URL |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
developers { |
|
|
|
|
|
|
|
developer { |
|
|
|
|
|
|
|
id DEVELOPER_ID |
|
|
|
|
|
|
|
name DEVELOPER_NAME |
|
|
|
|
|
|
|
email DEVELOPER_EMAIL |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
scm { |
|
|
|
|
|
|
|
connection PROJ_WEB_SITE_URL |
|
|
|
|
|
|
|
developerConnection PROJ_WEB_SITE_URL |
|
|
|
|
|
|
|
url PROJ_VCS_URL |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |