llm, continue editing AGENTS based on findings when fixing more Android projects.

This commit is contained in:
me committed 2026-11-01 09:56:30 -07:00
1 parent 482d3072f5
commit d15b22ec26
1 file changed
+88 -16
+88 -16
View File
@@ -650,38 +650,54 @@
## Android / Flutter ## Android / Flutter
- Gradle 9.8.2
- AGP 9.5.0
- Kotlin 2.4.21
- Java JDK 17
- Flutter Plugin Loader 1.0.0
- compileSdk 37
- targetSDK 37
Regardless of whether AGP bundles Kotlin, we need to specify it to
avoid things like "Your project's Kotlin version (2.2.10) is lower
than Flutter's minimum supported version of 2.2.20. Please upgrade
your Kotlin version." This is exactly why we use these versions,
plus it helps document what's actually being used over guessing.
Android : paths are from the project root. Android : paths are from the project root.
Flutter : paths are under the folder `android`. Flutter : paths are under the folder `android`.
- gradle/wrapper/grade-wrapper.properties ### All Android Project Types
- Gradle 9.8.2
#### ./gradle/wrapper/grade-wrapper.properties
``` ```
...
distributionUrl=https\://services.gradle.org/distributions/gradle-9.8.2-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-9.8.2-bin.zip
``` ```
- settings.gradle.kts
- AGP 9.5.0, Kotlin 2.4.21, Flutter Plugin Loader 1.0.0 #### ./settings.gradle.kts
``` ```
id("com.android.application") version "9.5.0" apply false id("com.android.application") version "9.5.0" apply false
id("org.jetbrains.kotlin.android") version "2.4.21" apply false id("org.jetbrains.kotlin.android") version "2.4.21" apply false
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
``` ```
- app/build.gradle.kts
- Java JDK 17 #### ./app/build.gradle.kts
``` ```
compileOptions { compileOptions {
sourceCompatibility = JavaVersion.VERSION_17 sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17
} }
// AGP 9's bundled Kotlin - use the native DSL
kotlin { kotlin {
compilerOptions { compilerOptions {
jvmTarget.set(JvmTarget.JVM_17) jvmTarget.set(JvmTarget.JVM_17)
} }
} }
``` ```
- Also enable minify and shrink while in there.
Also enable minify and shrink while in there.
``` ```
buildTypes { buildTypes {
getByName("release") { getByName("release") {
@@ -696,11 +712,67 @@
} }
``` ```
Regardless of whether AGP bundles Kotlin, we need to specify it to ### Flutter Projects
avoid things like "Your project's Kotlin version (2.2.10) is lower
than Flutter's minimum supported version of 2.2.20. Please upgrade #### ./settings.gradle.kts
your Kotlin version." This is exactly why we use these versions,
plus it helps document what's actually being used over guessing. ```
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
```
### Native Kotlin Apps
These only apply to Android apps which are not Flutter, Kivy, etc.
#### Plugin Versions
##### ./gradle/libs.versions.toml
```
[versions]
agp = "9.5.0"
kotlin = "2.4.21"
coreKtx = "1.19.1"
junit = "4.13.2"
junitVersion = "1.3.0"
espressoCore = "3.7.0"
lifecycleRuntimeKtx = "2.11.0"
activityCompose = "1.13.0"
composeBom = "2026.09.00"
```
#### Kotlin Compose Fix
Also ensure Kotlin is coming from Compose and not Jetbrains.
##### ./gradle/libs.versions.toml
```
[plugins]
androidApplication = { id = "com.android.application", version.ref = "agp" }
#jetbrainsKotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlinCompose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
```
##### ./build.gradle.kts
```
plugins {
alias(libs.plugins.androidApplication) apply false
//alias(libs.plugins.jetbrainsKotlinAndroid) apply false
alias(libs.plugins.kotlinCompose) apply false
}
```
##### ./app/build.gradle.kts
```
plugins {
alias(libs.plugins.androidApplication)
//alias(libs.plugins.jetbrainsKotlinAndroid)
alias(libs.plugins.kotlinCompose)
}
```
backup: false backup: false
owner: "{{ user }}" owner: "{{ user }}"
group: "{{ user }}" group: "{{ user }}"