File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -48,3 +48,32 @@ dependencies {
4848 // compile 'com.orhanobut:logger:1.15@aar'
4949 compile ' com.github.zhaokaiqiang.klog:library:1.6.0'
5050}
51+
52+ // 指定编码
53+ tasks. withType(JavaCompile ) {
54+ options. encoding = " UTF-8"
55+ }
56+
57+ // 打包源码
58+ task sourcesJar (type : Jar ) {
59+ from android. sourceSets. main. java. srcDirs
60+ classifier = ' sources'
61+ }
62+
63+ task javadoc (type : Javadoc ) {
64+ failOnError false
65+ source = android. sourceSets. main. java. sourceFiles
66+ classpath + = project. files(android. getBootClasspath(). join(File . pathSeparator))
67+ classpath + = configurations. compile
68+ }
69+
70+ // 制作文档(Javadoc)
71+ task javadocJar (type : Jar , dependsOn : javadoc) {
72+ classifier = ' javadoc'
73+ from javadoc. destinationDir
74+ }
75+
76+ artifacts {
77+ archives sourcesJar
78+ archives javadocJar
79+ }
You can’t perform that action at this time.
0 commit comments