Skip to content

Commit

Permalink
FIX javaCompileProvider (software-mansion#393)
Browse files Browse the repository at this point in the history
FIX for software-mansion#315

(cherry picked from commit 453d7e4)
  • Loading branch information
Fabsolute authored and Jordan McCord committed Oct 21, 2019
1 parent 7e55ef5 commit c00f126
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 c00f126

Please sign in to comment.