Skip to content

Commit

Permalink
FIX javaCompileProvider (#393)
Browse files Browse the repository at this point in the history
FIX for #315
  • Loading branch information
Fabsolute authored and kmagiera committed Sep 21, 2019
1 parent 80e1cdf commit 453d7e4
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,16 @@ afterEvaluate { project ->
}

android.libraryVariants.all { variant ->
def compileTask
if (variant.hasProperty('javaCompileProvider')){
compileTask = variant.javaCompileProvider.get()
}else{
compileTask = variant.javaCompile
}

def name = variant.name.capitalize()
task "jar${name}"(type: Jar, dependsOn: variant.javaCompileProvider.get()) {
from variant.javaCompileProvider.get().destinationDir
task "jar${name}"(type: Jar, dependsOn: compileTask) {
from compileTask.destinationDir
}
}

Expand Down

0 comments on commit 453d7e4

Please sign in to comment.