File tree Expand file tree Collapse file tree 2 files changed +35
-1
lines changed
Expand file tree Collapse file tree 2 files changed +35
-1
lines changed Original file line number Diff line number Diff line change @@ -122,4 +122,23 @@ task copyFiles(type: Copy) {
122122 filter(ReplaceTokens , tokens : [' cloudinary://123456789:abcdefg@hijklmnop' : System . getenv(' CLOUDINARY_URL' )])
123123}
124124
125- preBuild. dependsOn(copyFiles)
125+
126+ task sourcesJar (type : Jar ) {
127+ from android. sourceSets. main. java. srcDirs
128+ classifier = ' sources'
129+ }
130+ task javadoc (type : Javadoc ) {
131+ source = android. sourceSets. main. java. srcDirs
132+ classpath + = project. files(android. getBootClasspath(). join(File . pathSeparator))
133+ android. libraryVariants. all{var -> classpath + = var. javaCompiler. classpath}
134+
135+ }
136+ task javadocJar (type : Jar , dependsOn : javadoc) {
137+ classifier = ' javadoc'
138+ from javadoc. destinationDir
139+ }
140+ artifacts {
141+ archives javadocJar
142+ archives sourcesJar
143+ }
144+ preBuild. dependsOn(copyFiles)
Original file line number Diff line number Diff line change @@ -9,4 +9,19 @@ tasks.withType(JavaCompile) {
99test {
1010 testLogging. showStandardStreams = true
1111 testLogging. exceptionFormat = ' full'
12+ }
13+
14+ task sourcesJar (type : Jar , dependsOn : classes) {
15+ classifier = ' sources'
16+ from sourceSets. main. allSource
17+ }
18+
19+ task javadocJar (type : Jar , dependsOn : javadoc) {
20+ classifier = ' javadoc'
21+ from javadoc. destinationDir
22+ }
23+
24+ artifacts {
25+ archives sourcesJar
26+ archives javadocJar
1227}
You can’t perform that action at this time.
0 commit comments