Skip to content

Commit b6bf372

Browse files
committed
Releasing both JAR and AAR for library project
1 parent d99ac60 commit b6bf372

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

library/build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,12 @@ android {
2222
}
2323
}
2424

25+
android.libraryVariants.all { variant ->
26+
def name = variant.buildType.name
27+
def task = project.tasks.create "jar${name.capitalize()}", Jar
28+
task.dependsOn variant.javaCompile
29+
task.from variant.javaCompile.destinationDir
30+
artifacts.add('archives', task);
31+
}
32+
2533
apply from: '../maven_push.gradle'

0 commit comments

Comments
 (0)