Skip to content

Commit 0e720e8

Browse files
authored
reduce warnings inside flutter.groovy file (#152073)
In the context of [issue #146036](flutter/flutter#146036), the flutter.groovy file, considering [issue #147122](flutter/flutter#147122), currently has only two of the buildDir instances replaced. The other two instances have issues that require more investigation.
1 parent a3bbb24 commit 0e720e8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/flutter_tools/gradle/src/main/groovy/flutter.groovy

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ class FlutterPlugin implements Plugin<Project> {
332332
// -> Kotlin migration, we should remove this complexity and perform the checks inside
333333
// of the main Flutter Gradle Plugin.
334334
// See https://github.com/flutter/flutter/issues/121541#issuecomment-1920363687.
335-
final Boolean shouldSkipDependencyChecks = project.hasProperty("skipDependencyChecks") && project.getProperty("skipDependencyChecks");
335+
final Boolean shouldSkipDependencyChecks = project.hasProperty("skipDependencyChecks") && project.getProperty("skipDependencyChecks")
336336
if (!shouldSkipDependencyChecks) {
337337
try {
338338
final String dependencyCheckerPluginPath = Paths.get(flutterRoot.absolutePath,
@@ -1272,7 +1272,7 @@ class FlutterPlugin implements Plugin<Project> {
12721272
trackWidgetCreation(trackWidgetCreationValue)
12731273
targetPlatformValues = targetPlatforms
12741274
sourceDir(getFlutterSourceDirectory())
1275-
intermediateDir(project.file("${project.buildDir}/$INTERMEDIATES_DIR/flutter/${variant.name}/"))
1275+
intermediateDir(project.file(project.layout.buildDirectory.dir("$INTERMEDIATES_DIR/flutter/${variant.name}/")))
12761276
frontendServerStarterPath(frontendServerStarterPathValue)
12771277
extraFrontEndOptions(extraFrontEndOptionsValue)
12781278
extraGenSnapshotOptions(extraGenSnapshotOptionsValue)
@@ -1287,7 +1287,7 @@ class FlutterPlugin implements Plugin<Project> {
12871287
validateDeferredComponents(validateDeferredComponentsValue)
12881288
flavor(flavorValue)
12891289
}
1290-
File libJar = project.file("${project.buildDir}/$INTERMEDIATES_DIR/flutter/${variant.name}/libs.jar")
1290+
File libJar = project.file(project.layout.buildDirectory.dir("$INTERMEDIATES_DIR/flutter/${variant.name}/libs.jar"))
12911291
Task packJniLibsTask = project.tasks.create(name: "packJniLibs${FLUTTER_BUILD_PREFIX}${variant.name.capitalize()}", type: Jar) {
12921292
destinationDirectory = libJar.parentFile
12931293
archiveFileName = libJar.name

0 commit comments

Comments
 (0)