Upgrading to Skip 1.9 and the Android Gradle Plugin 9.2 #698
Replies: 2 comments 1 reply
-
|
FYI, if you're generating Baseline profiles for your Skip Android app, the latest stable Baseline Gradle Plugin 1.4.x is not compatible with AGP 9.2 unless you set If you have an plugins {
- id("com.android.test") version "8.13.2"
- id("org.jetbrains.kotlin.android") version "2.3.0"
- id("androidx.baselineprofile") version "1.4.1"
+ id("com.android.test") version "9.2.0"
+ id("androidx.baselineprofile") version "1.5.0-alpha06"
} |
Beta Was this translation helpful? Give feedback.
-
|
This is a great improvement, Thanks for the detailed migration guide, it helps a lot. That said, I want to raise a versioning concern: this update introduces breaking changes that require manual edits to existing project files. By semantic versioning convention, breaking changes belong in a major version bump (2.0), not a minor one (1.9). A minor version should be safe to adopt without breaking existing projects. I understand the AGP 9 upgrade was likely unavoidable due to the Java 26 incompatibility, but the impact on consumers is the same regardless of the underlying reason. For changes of this magnitude, bumping to 2.0 would set clearer expectations, developers and tools that respect semver would know to treat the upgrade with more caution, and it would signal that migration steps are required. Hopefully something to consider for future releases of this scale. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Skip 1.9.1 upgrades its default version of the Android Gradle Plugin (AGP) from 8 to 9. This upgrade is necessary to support building apps using Java 26, which will break due to https://issuetracker.google.com/issues/486844145 with the error:
Caution
Unfortunately, the upgrade from AGP 8 to 9 is a major upgrade (see https://developer.android.com/build/releases/agp-9-0-0-release-notes) that will cause pre-existing Skip app projects to fail to build unless some changes are made. Fortunately, these issues can be easily rectified by making a couple edits to your project's
Android/build.gradle.ktsfile.Issue 1: Remove the
libs.plugins.kotlin.androidpluginhttps://developer.android.com/build/migrate-to-built-in-kotlin#migration-steps-remove-kotlin-android-plugin
Solution: simply remove the
alias(libs.plugins.kotlin.android)line altogether.Issue 2: Change
proguard-android.txttoproguard-android-optimize.txtSolution: Change the
getDefaultProguardFile("proguard-android.txt"),section of theproguardFiles()call togetDefaultProguardFile("proguard-android-optimize.txt").When encountering these errors, clicking on the error in Xcode should jump straight to the offending lines in the
build.gradle.ktsfile, so these fixes should be fairly quick to apply. Alternatively, running the commandsskip upgrade(to ensure you have skip 1.9.1) thenskip verify --fixfrom the root of your Skip app project should perform the necessary surgery on the files for you.We understand that this sort of project breakage can be confusing and frustrating. We aim to minimize the disruption for existing Skip projects whenever we update dependencies, but since an app's
Android/build.gradle.ktsis generated once by Skip and is expected to be customized on a per-project basis, there wasn't any automated update that we could perform safely on these files.P.S. The implementation for this migration is split across three different PRs: #697, skiptools/skipstone#253, and skiptools/skip-unit#19
Beta Was this translation helpful? Give feedback.
All reactions