jcenter
This commit is contained in:
@ -7,7 +7,7 @@ buildscript {
|
|||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:2.2.2'
|
classpath 'com.android.tools.build:gradle:2.2.2'
|
||||||
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
|
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
|
||||||
|
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:3.1.1"
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
// in the individual module build.gradle files
|
// in the individual module build.gradle files
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
|
|
||||||
apply plugin: 'com.github.dcendents.android-maven'
|
//apply plugin: 'com.github.dcendents.android-maven'
|
||||||
|
//
|
||||||
group='com.github.AriaLyy'
|
//group='com.github.AriaLyy'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 23
|
compileSdkVersion 23
|
||||||
@ -27,58 +27,59 @@ dependencies {
|
|||||||
testCompile 'junit:junit:4.12'
|
testCompile 'junit:junit:4.12'
|
||||||
compile 'com.android.support:appcompat-v7:23.1.1'
|
compile 'com.android.support:appcompat-v7:23.1.1'
|
||||||
}
|
}
|
||||||
|
//apply from: 'jcenter.gradle'
|
||||||
|
|
||||||
// build a jar with source files
|
// build a jar with source files
|
||||||
task sourcesJar(type: Jar) {
|
//task sourcesJar(type: Jar) {
|
||||||
from android.sourceSets.main.java.srcDirs
|
// from android.sourceSets.main.java.srcDirs
|
||||||
classifier = 'sources'
|
// classifier = 'sources'
|
||||||
}
|
//}
|
||||||
|
//
|
||||||
task javadoc(type: Javadoc) {
|
//task javadoc(type: Javadoc) {
|
||||||
failOnError false
|
// failOnError false
|
||||||
source = android.sourceSets.main.java.sourceFiles
|
// source = android.sourceSets.main.java.sourceFiles
|
||||||
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
|
// classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
|
||||||
classpath += configurations.compile
|
// classpath += configurations.compile
|
||||||
}
|
//}
|
||||||
|
//
|
||||||
// build a jar with javadoc
|
//// build a jar with javadoc
|
||||||
task javadocJar(type: Jar, dependsOn: javadoc) {
|
//task javadocJar(type: Jar, dependsOn: javadoc) {
|
||||||
classifier = 'javadoc'
|
// classifier = 'javadoc'
|
||||||
from javadoc.destinationDir
|
// from javadoc.destinationDir
|
||||||
}
|
//}
|
||||||
|
//
|
||||||
android.libraryVariants.all { variant ->
|
//android.libraryVariants.all { variant ->
|
||||||
println variant.javaCompile.classpath.files
|
// println variant.javaCompile.classpath.files
|
||||||
if (variant.name == 'release') {
|
// if (variant.name == 'release') {
|
||||||
//我们只需 release 的 javadoc
|
// //我们只需 release 的 javadoc
|
||||||
task("generate${variant.name.capitalize()}Javadoc", type: Javadoc) {
|
// task("generate${variant.name.capitalize()}Javadoc", type: Javadoc) {
|
||||||
// title = ''
|
// // title = ''
|
||||||
// description = ''
|
// // description = ''
|
||||||
source = variant.javaCompile.source
|
// source = variant.javaCompile.source
|
||||||
classpath = files(variant.javaCompile.classpath.files, project.android.getBootClasspath())
|
// classpath = files(variant.javaCompile.classpath.files, project.android.getBootClasspath())
|
||||||
options {
|
// options {
|
||||||
encoding "utf-8"
|
// encoding "utf-8"
|
||||||
links "http://docs.oracle.com/javase/7/docs/api/"
|
// links "http://docs.oracle.com/javase/7/docs/api/"
|
||||||
linksOffline "http://d.android.com/reference", "${android.sdkDirectory}/docs/reference"
|
// linksOffline "http://d.android.com/reference", "${android.sdkDirectory}/docs/reference"
|
||||||
}
|
// }
|
||||||
exclude '**/BuildConfig.java'
|
// exclude '**/BuildConfig.java'
|
||||||
exclude '**/R.java'
|
// exclude '**/R.java'
|
||||||
}
|
// }
|
||||||
task("javadoc${variant.name.capitalize()}Jar", type: Jar,
|
// task("javadoc${variant.name.capitalize()}Jar", type: Jar,
|
||||||
dependsOn: "generate${variant.name.capitalize()}Javadoc") {
|
// dependsOn: "generate${variant.name.capitalize()}Javadoc") {
|
||||||
classifier = 'javadoc'
|
// classifier = 'javadoc'
|
||||||
from tasks.getByName("generate${variant.name.capitalize()}Javadoc").destinationDir
|
// from tasks.getByName("generate${variant.name.capitalize()}Javadoc").destinationDir
|
||||||
}
|
// }
|
||||||
artifacts {
|
// artifacts {
|
||||||
archives tasks.getByName("javadoc${variant.name.capitalize()}Jar")
|
// archives tasks.getByName("javadoc${variant.name.capitalize()}Jar")
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
//
|
||||||
artifacts {
|
//artifacts {
|
||||||
archives sourcesJar
|
// archives sourcesJar
|
||||||
archives javadocJar
|
// archives javadocJar
|
||||||
}
|
//}
|
||||||
|
|
||||||
//apply frome: 'build_source.gradle'
|
//apply frome: 'build_source.gradle'
|
||||||
//apply from: 'jcenter.gradle'
|
//apply from: 'jcenter.gradle'
|
@ -2,8 +2,9 @@ group = PROJ_GROUP
|
|||||||
version = PROJ_VERSION
|
version = PROJ_VERSION
|
||||||
project.archivesBaseName = PROJ_ARTIFACTID
|
project.archivesBaseName = PROJ_ARTIFACTID
|
||||||
apply plugin: 'com.jfrog.bintray'
|
apply plugin: 'com.jfrog.bintray'
|
||||||
apply plugin: "com.jfrog.artifactory"
|
apply plugin: 'com.github.dcendents.android-maven'
|
||||||
apply plugin: 'maven-publish'
|
//apply plugin: "com.jfrog.artifactory"
|
||||||
|
//apply plugin: 'maven-publish'
|
||||||
|
|
||||||
task sourcesJar(type: Jar) {
|
task sourcesJar(type: Jar) {
|
||||||
from android.sourceSets.main.java.srcDirs
|
from android.sourceSets.main.java.srcDirs
|
||||||
@ -72,59 +73,59 @@ artifacts {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def pomConfig = {
|
//def pomConfig = {
|
||||||
scm {
|
// scm {
|
||||||
connection PROJ_VCSURL
|
// connection PROJ_VCSURL
|
||||||
developerConnection PROJ_VCSURL
|
// developerConnection PROJ_VCSURL
|
||||||
url PROJ_WEBSITEURL
|
// url PROJ_WEBSITEURL
|
||||||
}
|
// }
|
||||||
licenses {
|
// licenses {
|
||||||
license {
|
// license {
|
||||||
name "The Apache Software License, Version 2.0"
|
// name "The Apache Software License, Version 2.0"
|
||||||
url "http://www.apache.org/licenses/LICENSE-2.0.txt"
|
// url "http://www.apache.org/licenses/LICENSE-2.0.txt"
|
||||||
distribution "repo"
|
// 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
|
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
}
|
// developers {
|
||||||
}
|
// developer {
|
||||||
|
// id DEVELOPER_ID
|
||||||
publishing {
|
// name DEVELOPER_NAME
|
||||||
publications {
|
// email DEVELOPER_EMAIL
|
||||||
mavenJava(MavenPublication) {
|
// }
|
||||||
artifactId PROJ_ARTIFACTID
|
// }
|
||||||
artifact javadocJar
|
// "dependencies " {
|
||||||
artifact sourcesJar
|
// // dependency {
|
||||||
|
// // groupId "com.alibaba"
|
||||||
pom {
|
// // artifactId "fastjson"
|
||||||
packaging 'aar'
|
// // "version " "1.2.6"
|
||||||
}
|
// // //同dependencies
|
||||||
pom.withXml {
|
// // }
|
||||||
def root = asNode()
|
// // }
|
||||||
root.appendNode('description', PROJ_DESCRIPTION)
|
// }
|
||||||
root.children().last() + pomConfig
|
//}
|
||||||
}
|
//
|
||||||
}
|
//publishing {
|
||||||
}
|
// publications {
|
||||||
}
|
// mavenJava(MavenPublication) {
|
||||||
|
// artifactId PROJ_ARTIFACTID
|
||||||
afterEvaluate {
|
// artifact javadocJar
|
||||||
publishing.publications.mavenJava.artifact(bundleRelease)
|
// 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")
|
||||||
|
Reference in New Issue
Block a user