Skip to content

Commit 5dc0d1a

Browse files
committed
Migrate from deprecated gradle functions
buildDir is deprecated, using layout.buildDirectory.dir (https://docs.gradle.org/current/userguide/upgrading_version_8.html#project_builddir) using dir.map to create subdirectory (https://discuss.gradle.org/t/how-to-set-a-deep-directory-with-project-getlayout-getbuilddirectory/49132) Adding buildir to .gitignore
1 parent 2db3f03 commit 5dc0d1a

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

android/.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,7 @@ key.properties
1313

1414
# Remove AGP temp files
1515
/.idea/
16-
/build/
16+
/build/
17+
18+
# Gradle build files
19+
/app/build/

android/build.gradle

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

8-
rootProject.buildDir = '../build'
8+
rootProject.layout.buildDirectory.dir('../build')
99
subprojects {
10-
project.buildDir = "${rootProject.buildDir}/${project.name}"
10+
project.layout.buildDirectory.map {it.dir("${project.name}")}
1111
project.evaluationDependsOn(':app')
1212
}
1313

1414
tasks.register("clean", Delete) {
15-
delete rootProject.buildDir
15+
delete rootProject.layout.buildDirectory
1616
}

0 commit comments

Comments
 (0)