Skip to content

Commit 6e6d916

Browse files
committed
Update build.gradle
1 parent 4ece270 commit 6e6d916

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

library/build.gradle

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,20 @@ dependencies {
2323
compile fileTree(dir: 'libs', include: ['*.jar'])
2424
}
2525

26+
// build a jar with source files
2627
task sourcesJar(type: Jar) {
2728
from android.sourceSets.main.java.srcDirs
2829
classifier = 'sources'
2930
}
30-
3131
artifacts {
3232
archives sourcesJar
3333
}
34+
35+
// uncomment to build a jar file in addition to the default aar file
36+
//android.libraryVariants.all { variant ->
37+
// def name = variant.buildType.name
38+
// def task = project.tasks.create "jar${name.capitalize()}", Jar
39+
// task.dependsOn variant.javaCompile
40+
// task.from variant.javaCompile.destinationDir
41+
// artifacts.add('archives', task);
42+
//}

0 commit comments

Comments
 (0)