Skip to content

Commit

Permalink
chore(cli): update to new buildConfig format (#9924)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
lucasfernog authored May 30, 2024
1 parent 916a26c commit 3cca5c2
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .changes/android-warning.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"tauri-cli": patch:changes
"@tauri-apps/cli": patch:changes
---

Migrate to new Android buildFeatures.buildConfig format.
3 changes: 3 additions & 0 deletions core/tauri/mobile/android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ android {
kotlinOptions {
jvmTarget = "1.8"
}
buildFeatures {
buildConfig = true
}
}

dependencies {
Expand Down
3 changes: 3 additions & 0 deletions tooling/cli/templates/mobile/android/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ android {
kotlinOptions {
jvmTarget = "1.8"
}
buildFeatures {
buildConfig = true
}
}

rust {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ repositories {

dependencies {
compileOnly(gradleApi())
implementation("com.android.tools.build:gradle:8.0.0")
implementation("com.android.tools.build:gradle:8.3.2")
}

1 change: 0 additions & 1 deletion tooling/cli/templates/mobile/android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,4 @@ kotlin.code.style=official
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true
android.defaults.buildfeatures.buildconfig=true
android.nonFinalResIds=false

0 comments on commit 3cca5c2

Please sign in to comment.