diff --git a/tasks/workstation/linux/software/ai/llm.yml b/tasks/workstation/linux/software/ai/llm.yml index 9df4641..e95aa7a 100644 --- a/tasks/workstation/linux/software/ai/llm.yml +++ b/tasks/workstation/linux/software/ai/llm.yml @@ -650,57 +650,129 @@ ## Android / Flutter - Android : paths are from the project root. - Flutter : paths are under the folder `android`. - - - gradle/wrapper/grade-wrapper.properties - - Gradle 9.8.2 - ``` - ... - 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 - ``` - id("com.android.application") version "9.5.0" 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 - ``` - compileOptions { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 - } - - // AGP 9's bundled Kotlin - use the native DSL - kotlin { - compilerOptions { - jvmTarget.set(JvmTarget.JVM_17) - } - } - ``` - - Also enable minify and shrink while in there. - ``` - buildTypes { - getByName("release") { - ... - isMinifyEnabled = true - isShrinkResources = true - proguardFiles( - getDefaultProguardFile("proguard-android-optimize.txt"), - "proguard-rules.pro" - ) - } - } - ``` + - 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. + Flutter : paths are under the folder `android`. + + ### All Android Project Types + + #### ./gradle/wrapper/grade-wrapper.properties + + ``` + distributionUrl=https\://services.gradle.org/distributions/gradle-9.8.2-bin.zip + ``` + + #### ./settings.gradle.kts + + ``` + id("com.android.application") version "9.5.0" apply false + id("org.jetbrains.kotlin.android") version "2.4.21" apply false + ``` + + #### ./app/build.gradle.kts + + ``` + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + kotlin { + compilerOptions { + jvmTarget.set(JvmTarget.JVM_17) + } + } + ``` + + Also enable minify and shrink while in there. + + ``` + buildTypes { + getByName("release") { + ... + isMinifyEnabled = true + isShrinkResources = true + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro" + ) + } + } + ``` + + ### Flutter Projects + + #### ./settings.gradle.kts + + ``` + 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 owner: "{{ user }}" group: "{{ user }}"