|
|
|
@ -11,7 +11,6 @@ task sourcesJar(type: Jar) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
task javadoc(type: Javadoc) { |
|
|
|
|
options.encoding = "utf-8" |
|
|
|
|
source = android.sourceSets.main.java.srcDirs |
|
|
|
|
classpath += configurations.compile |
|
|
|
|
classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) |
|
|
|
@ -41,8 +40,7 @@ javadoc { |
|
|
|
|
// 位置: 类 xxxx |
|
|
|
|
android.libraryVariants.all { variant -> |
|
|
|
|
println variant.javaCompile.classpath.files |
|
|
|
|
if (variant.name == 'release') { |
|
|
|
|
//我们只需 release 的 javadoc |
|
|
|
|
if (variant.name == 'release') { //我们只需 release 的 javadoc |
|
|
|
|
task("generate${variant.name.capitalize()}Javadoc", type: Javadoc) { |
|
|
|
|
// title = '' |
|
|
|
|
// description = '' |
|
|
|
@ -56,8 +54,7 @@ android.libraryVariants.all { variant -> |
|
|
|
|
exclude '**/BuildConfig.java' |
|
|
|
|
exclude '**/R.java' |
|
|
|
|
} |
|
|
|
|
task("javadoc${variant.name.capitalize()}Jar", type: Jar, |
|
|
|
|
dependsOn: "generate${variant.name.capitalize()}Javadoc") { |
|
|
|
|
task("javadoc${variant.name.capitalize()}Jar", type: Jar, dependsOn: "generate${variant.name.capitalize()}Javadoc") { |
|
|
|
|
classifier = 'javadoc' |
|
|
|
|
from tasks.getByName("generate${variant.name.capitalize()}Javadoc").destinationDir |
|
|
|
|
} |
|
|
|
@ -93,6 +90,15 @@ def pomConfig = { |
|
|
|
|
email DEVELOPER_EMAIL |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
"dependencies " { |
|
|
|
|
// dependency { |
|
|
|
|
// groupId "com.alibaba" |
|
|
|
|
// artifactId "fastjson" |
|
|
|
|
// "version " "1.2.6" |
|
|
|
|
// //同dependencies |
|
|
|
|
// } |
|
|
|
|
// } |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
publishing { |
|
|
|
|