|
|
@ -11,7 +11,6 @@ task sourcesJar(type: Jar) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
task javadoc(type: Javadoc) { |
|
|
|
task javadoc(type: Javadoc) { |
|
|
|
options.encoding = "utf-8" |
|
|
|
|
|
|
|
source = android.sourceSets.main.java.srcDirs |
|
|
|
source = android.sourceSets.main.java.srcDirs |
|
|
|
classpath += configurations.compile |
|
|
|
classpath += configurations.compile |
|
|
|
classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) |
|
|
|
classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) |
|
|
@ -41,8 +40,7 @@ javadoc { |
|
|
|
// 位置: 类 xxxx |
|
|
|
// 位置: 类 xxxx |
|
|
|
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 = '' |
|
|
@ -56,8 +54,7 @@ android.libraryVariants.all { variant -> |
|
|
|
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 |
|
|
|
} |
|
|
|
} |
|
|
@ -93,6 +90,15 @@ def pomConfig = { |
|
|
|
email DEVELOPER_EMAIL |
|
|
|
email DEVELOPER_EMAIL |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
"dependencies " { |
|
|
|
|
|
|
|
// dependency { |
|
|
|
|
|
|
|
// groupId "com.alibaba" |
|
|
|
|
|
|
|
// artifactId "fastjson" |
|
|
|
|
|
|
|
// "version " "1.2.6" |
|
|
|
|
|
|
|
// //同dependencies |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
publishing { |
|
|
|
publishing { |
|
|
|