Skip to content

Commit cb92ae4

Browse files
committed
Refactor build.gradle to adjust buildDir paths and ensure evaluation dependencies
- Set `rootProject.buildDir` and configure `subprojects` to use consistent build paths. - Adjust evaluation dependencies to ensure `:app` is resolved correctly.
1 parent fb26dd1 commit cb92ae4

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

flutter/android/build.gradle

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,19 @@ allprojects {
55
}
66
}
77

8+
rootProject.buildDir = '../build'
89
subprojects {
9-
afterEvaluate { project ->
10+
project.buildDir = "${rootProject.buildDir}/${project.name}"
11+
project.evaluationDependsOn(':app')
12+
afterEvaluate { project ->
1013
if (project.hasProperty('android')) {
1114
project.android {
1215
if (namespace == null) {
1316
namespace project.group
1417
}
1518
}
1619
}
17-
}
18-
}
19-
20-
rootProject.buildDir = '../build'
21-
subprojects {
22-
project.buildDir = "${rootProject.buildDir}/${project.name}"
23-
project.evaluationDependsOn(':app')
20+
}
2421
}
2522

2623
tasks.register("clean", Delete) {

0 commit comments

Comments
 (0)