Skip to content

Commit 3cca5c2

Browse files
authored
chore(cli): update to new buildConfig format (#9924)
* chore(cli): update to new buildConfig format the existing usage has been deprecated and will be removed on gradle plugin v9, as Android Studio warns * add config to our lib too
1 parent 916a26c commit 3cca5c2

File tree

5 files changed

+13
-2
lines changed

5 files changed

+13
-2
lines changed

.changes/android-warning.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"tauri-cli": patch:changes
3+
"@tauri-apps/cli": patch:changes
4+
---
5+
6+
Migrate to new Android buildFeatures.buildConfig format.

core/tauri/mobile/android/build.gradle.kts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ android {
3131
kotlinOptions {
3232
jvmTarget = "1.8"
3333
}
34+
buildFeatures {
35+
buildConfig = true
36+
}
3437
}
3538

3639
dependencies {

tooling/cli/templates/mobile/android/app/build.gradle.kts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ android {
5050
kotlinOptions {
5151
jvmTarget = "1.8"
5252
}
53+
buildFeatures {
54+
buildConfig = true
55+
}
5356
}
5457

5558
rust {

tooling/cli/templates/mobile/android/buildSrc/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ repositories {
1818

1919
dependencies {
2020
compileOnly(gradleApi())
21-
implementation("com.android.tools.build:gradle:8.0.0")
21+
implementation("com.android.tools.build:gradle:8.3.2")
2222
}
2323

tooling/cli/templates/mobile/android/gradle.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,4 @@ kotlin.code.style=official
2121
# resources declared in the library itself and none from the library's dependencies,
2222
# thereby reducing the size of the R class for that library
2323
android.nonTransitiveRClass=true
24-
android.defaults.buildfeatures.buildconfig=true
2524
android.nonFinalResIds=false

0 commit comments

Comments
 (0)