Skip to content

Commit bc29ec9

Browse files
committed
添加依赖库配置
1 parent e64ea60 commit bc29ec9

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

library/build.gradle

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,29 @@ android {
1717
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
1818
}
1919
}
20+
}
21+
22+
// build a jar with source files
23+
task sourcesJar(type: Jar) {
24+
from android.sourceSets.main.java.srcDirs
25+
classifier = 'sources'
26+
}
27+
28+
task javadoc(type: Javadoc) {
29+
failOnError false
30+
source = android.sourceSets.main.java.sourceFiles
31+
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
32+
classpath += configurations.compile
33+
}
34+
35+
// build a jar with javadoc
36+
task javadocJar(type: Jar, dependsOn: javadoc) {
37+
classifier = 'javadoc'
38+
from javadoc.destinationDir
39+
}
2040

41+
artifacts {
42+
archives sourcesJar
43+
archives javadocJar
2144
}
2245

0 commit comments

Comments
 (0)