Fix obsolete usages in build.gradle (#1168)

Summary:
Remove warning `'variant.getJavaCompile()' is obsolete and has been replaced with 'variant.getJavaCompileProvider()'.`

## Changelog

- swithed from `variant.getJavaCompile()` to `variant.getJavaCompileProvider()`
Pull Request resolved: https://github.com/facebook/flipper/pull/1168

Test Plan: n/a

Reviewed By: passy

Differential Revision: D21618883

Pulled By: cekkaewnumchai

fbshipit-source-id: 522fe5847b074836cc36a9e1b9a0487b044cf555
This commit is contained in:
João Alves
2020-05-18 07:04:32 -07:00
committed by Facebook GitHub Bot
parent 436159eb22
commit 52274b7659

View File

@@ -139,8 +139,10 @@ afterEvaluate { project ->
android.libraryVariants.all { variant -> android.libraryVariants.all { variant ->
def name = variant.name.capitalize() def name = variant.name.capitalize()
task "jar${name}"(type: Jar, dependsOn: variant.javaCompile) { def javaCompileTask = variant.javaCompileProvider.get()
from variant.javaCompile.destinationDir
task "jar${name}"(type: Jar, dependsOn: javaCompileTask) {
from javaCompileTask.destinationDir
} }
} }