Bläddra i källkod

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
Lucas Fernandes Nogueira 1 år sedan
förälder
incheckning
3cca5c2be8

+ 6 - 0
.changes/android-warning.md

@@ -0,0 +1,6 @@
+---
+"tauri-cli": patch:changes
+"@tauri-apps/cli": patch:changes
+---
+
+Migrate to new Android buildFeatures.buildConfig format.

+ 3 - 0
core/tauri/mobile/android/build.gradle.kts

@@ -31,6 +31,9 @@ android {
     kotlinOptions {
         jvmTarget = "1.8"
     }
+    buildFeatures {
+        buildConfig = true
+    }
 }
 
 dependencies {

+ 3 - 0
tooling/cli/templates/mobile/android/app/build.gradle.kts

@@ -50,6 +50,9 @@ android {
     kotlinOptions {
         jvmTarget = "1.8"
     }
+    buildFeatures {
+        buildConfig = true
+    }
 }
 
 rust {

+ 1 - 1
tooling/cli/templates/mobile/android/buildSrc/build.gradle.kts

@@ -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")
 }
 

+ 0 - 1
tooling/cli/templates/mobile/android/gradle.properties

@@ -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