Skip to content

Commit 26fff8b

Browse files
author
Chris Brody
authored
Merge pull request #194 from cswagner/issues/120
Issues/120: Use javaCompileProvider in Android template
2 parents 996bd93 + 796b690 commit 26fff8b

File tree

24 files changed

+96
-48
lines changed

24 files changed

+96
-48
lines changed

templates/android.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,10 @@ afterEvaluate { project ->
128128
129129
android.libraryVariants.all { variant ->
130130
def name = variant.name.capitalize()
131-
task "jar\${name}"(type: Jar, dependsOn: variant.javaCompile) {
132-
from variant.javaCompile.destinationDir
131+
def javaCompileTask = variant.javaCompileProvider.get()
132+
133+
task "jar\${name}"(type: Jar, dependsOn: javaCompileTask) {
134+
from javaCompileTask.destinationDir
133135
}
134136
}
135137

tests/integration/cli/create/view/__snapshots__/cli-create-with-view.test.js.snap

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,10 @@ afterEvaluate { project ->
226226
227227
android.libraryVariants.all { variant ->
228228
def name = variant.name.capitalize()
229-
task \\"jar\${name}\\"(type: Jar, dependsOn: variant.javaCompile) {
230-
from variant.javaCompile.destinationDir
229+
def javaCompileTask = variant.javaCompileProvider.get()
230+
231+
task \\"jar\${name}\\"(type: Jar, dependsOn: javaCompileTask) {
232+
from javaCompileTask.destinationDir
231233
}
232234
}
233235

tests/integration/cli/create/with-defaults/__snapshots__/cli-create-with-defaults.test.js.snap

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,10 @@ afterEvaluate { project ->
226226
227227
android.libraryVariants.all { variant ->
228228
def name = variant.name.capitalize()
229-
task \\"jar\${name}\\"(type: Jar, dependsOn: variant.javaCompile) {
230-
from variant.javaCompile.destinationDir
229+
def javaCompileTask = variant.javaCompileProvider.get()
230+
231+
task \\"jar\${name}\\"(type: Jar, dependsOn: javaCompileTask) {
232+
from javaCompileTask.destinationDir
231233
}
232234
}
233235

tests/with-injection/create/view/with-defaults/__snapshots__/create-view-with-defaults.test.js.snap

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,8 +301,10 @@ afterEvaluate { project ->
301301
302302
android.libraryVariants.all { variant ->
303303
def name = variant.name.capitalize()
304-
task \\"jar\${name}\\"(type: Jar, dependsOn: variant.javaCompile) {
305-
from variant.javaCompile.destinationDir
304+
def javaCompileTask = variant.javaCompileProvider.get()
305+
306+
task \\"jar\${name}\\"(type: Jar, dependsOn: javaCompileTask) {
307+
from javaCompileTask.destinationDir
306308
}
307309
}
308310

tests/with-injection/create/view/with-example/with-defaults/__snapshots__/create-view-with-example-with-defaults.test.js.snap

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,8 +306,10 @@ afterEvaluate { project ->
306306
307307
android.libraryVariants.all { variant ->
308308
def name = variant.name.capitalize()
309-
task \\"jar\${name}\\"(type: Jar, dependsOn: variant.javaCompile) {
310-
from variant.javaCompile.destinationDir
309+
def javaCompileTask = variant.javaCompileProvider.get()
310+
311+
task \\"jar\${name}\\"(type: Jar, dependsOn: javaCompileTask) {
312+
from javaCompileTask.destinationDir
311313
}
312314
}
313315

tests/with-injection/create/view/with-example/with-options/__snapshots__/create-view-with-example-with-options.test.js.snap

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,8 +306,10 @@ afterEvaluate { project ->
306306
307307
android.libraryVariants.all { variant ->
308308
def name = variant.name.capitalize()
309-
task \\"jar\${name}\\"(type: Jar, dependsOn: variant.javaCompile) {
310-
from variant.javaCompile.destinationDir
309+
def javaCompileTask = variant.javaCompileProvider.get()
310+
311+
task \\"jar\${name}\\"(type: Jar, dependsOn: javaCompileTask) {
312+
from javaCompileTask.destinationDir
311313
}
312314
}
313315

tests/with-injection/create/view/with-options/for-android/__snapshots__/lib-view-android-config-options.test.js.snap

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,10 @@ afterEvaluate { project ->
270270
271271
android.libraryVariants.all { variant ->
272272
def name = variant.name.capitalize()
273-
task \\"jar\${name}\\"(type: Jar, dependsOn: variant.javaCompile) {
274-
from variant.javaCompile.destinationDir
273+
def javaCompileTask = variant.javaCompileProvider.get()
274+
275+
task \\"jar\${name}\\"(type: Jar, dependsOn: javaCompileTask) {
276+
from javaCompileTask.destinationDir
275277
}
276278
}
277279

tests/with-injection/create/with-defaults/__snapshots__/create-with-defaults.test.js.snap

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,8 +301,10 @@ afterEvaluate { project ->
301301
302302
android.libraryVariants.all { variant ->
303303
def name = variant.name.capitalize()
304-
task \\"jar\${name}\\"(type: Jar, dependsOn: variant.javaCompile) {
305-
from variant.javaCompile.destinationDir
304+
def javaCompileTask = variant.javaCompileProvider.get()
305+
306+
task \\"jar\${name}\\"(type: Jar, dependsOn: javaCompileTask) {
307+
from javaCompileTask.destinationDir
306308
}
307309
}
308310

tests/with-injection/create/with-example/with-defaults/__snapshots__/create-with-example-with-defaults.test.js.snap

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,8 +306,10 @@ afterEvaluate { project ->
306306
307307
android.libraryVariants.all { variant ->
308308
def name = variant.name.capitalize()
309-
task \\"jar\${name}\\"(type: Jar, dependsOn: variant.javaCompile) {
310-
from variant.javaCompile.destinationDir
309+
def javaCompileTask = variant.javaCompileProvider.get()
310+
311+
task \\"jar\${name}\\"(type: Jar, dependsOn: javaCompileTask) {
312+
from javaCompileTask.destinationDir
311313
}
312314
}
313315

tests/with-injection/create/with-example/with-missing-package-scripts/__snapshots__/recover-from-missing-package-scripts.test.js.snap

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,8 +306,10 @@ afterEvaluate { project ->
306306
307307
android.libraryVariants.all { variant ->
308308
def name = variant.name.capitalize()
309-
task \\"jar\${name}\\"(type: Jar, dependsOn: variant.javaCompile) {
310-
from variant.javaCompile.destinationDir
309+
def javaCompileTask = variant.javaCompileProvider.get()
310+
311+
task \\"jar\${name}\\"(type: Jar, dependsOn: javaCompileTask) {
312+
from javaCompileTask.destinationDir
311313
}
312314
}
313315

0 commit comments

Comments
 (0)