We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4ea64a0 + 982478d commit 3d3ed56Copy full SHA for 3d3ed56
build.gradle
@@ -11,7 +11,7 @@ subprojects {
11
repositories {
12
mavenCentral()
13
}
14
-
+
15
group = GROUP
16
version = VERSION_NAME
17
@@ -21,3 +21,17 @@ ext {
21
compileSdkVersion = 22
22
buildToolsVersion = '22.0.0'
23
24
25
+subprojects {
26
+ afterEvaluate {
27
+ android.libraryVariants.all { variant ->
28
+ def task = project.tasks.create "jar${variant.name.capitalize()}", Jar
29
+ task.description = "Create jar artifact for ${variant.name}"
30
+ task.dependsOn variant.javaCompile
31
+ task.from variant.javaCompile.destinationDir
32
+ task.destinationDir = project.file("${project.buildDir}/outputs/jar")
33
+ task.archiveName = "${project.name}-${variant.baseName}.jar"
34
+ artifacts.add('archives', task);
35
+ }
36
37
+}
0 commit comments