From 2e904a099b5ff5353d75283e79b530bb8cf8da3f Mon Sep 17 00:00:00 2001 From: Dan Fabulich Date: Thu, 3 Dec 2026 20:38:24 -0800 Subject: [PATCH] Compile library modules against compileSdk 37.1 Compose 1.13 (BOM 2026.12.00) requires compileSdk 37.1. Add an android-sdk-compilePlatform = "37.1" version catalog entry and set compileSdkMinor from it in every library module, but only when its major level matches android-sdk-compile, so overriding just android-sdk-compile (e.g., to 38) doesn't select a nonexistent android-38.1. android-sdk-compile stays an integer so existing consumers like targetSdk and app build.gradle.kts files keep working. The alias can't be android-sdk-compile-platform because a version catalog alias can't also be a prefix of another alias (libs.versions.android.sdk.compile would lose its get()). Also bump AGP to 9.3.3; Google lists AGP 9.3.1 as the minimum for compile SDK 37.1, and AGP 9.2.0 warns that it was only tested up to 37.0. This requires a skip release whose skip-build-plugin raises the app's compileSdk to 37.1; otherwise apps that set compileSdk = 37 fail checkDebugAarMetadata against these library modules. --- Sources/SkipUnit/Skip/skip.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Sources/SkipUnit/Skip/skip.yml b/Sources/SkipUnit/Skip/skip.yml index a92bebe..db8d3ee 100644 --- a/Sources/SkipUnit/Skip/skip.yml +++ b/Sources/SkipUnit/Skip/skip.yml @@ -44,11 +44,19 @@ settings: - 'version("jvm", "17")' - 'version("android-sdk-min", "28")' - 'version("android-sdk-compile", "37")' + # the full compile SDK platform version, including the minor API level (android-37.1); + # android-sdk-compile stays an integer so that integer-only consumers (like targetSdk and + # existing app build.gradle.kts files) keep working. The minor level is only applied when + # the major level matches android-sdk-compile, so overriding just android-sdk-compile + # (e.g., to 38) doesn't select a nonexistent android-38.1. The alias can't be named + # "android-sdk-compile-platform" because a version catalog alias can't also be the prefix + # of another alias (libs.versions.android.sdk.compile would lose its get()). + - 'version("android-sdk-compilePlatform", "37.1")' # keep android-gradle-plugin and kotlin versions in sync according to compatibility table at # https://developer.android.com/build/kotlin-support - - 'version("android-gradle-plugin", "9.2.0")' + - 'version("android-gradle-plugin", "9.3.3")' - 'plugin("android-library", "com.android.library").versionRef("android-gradle-plugin")' - 'plugin("android-application", "com.android.application").versionRef("android-gradle-plugin")' @@ -131,6 +139,8 @@ build: - block: 'android' contents: - 'compileSdk = libs.versions.android.sdk.compile.get().toInt()' + # must follow compileSdk, because setting compileSdk resets compileSdkMinor + - 'libs.versions.android.sdk.compilePlatform.get().split(".").let { if (it.size > 1 && it[0].toInt() == compileSdk) compileSdkMinor = it[1].toInt() }' - block: 'defaultConfig' contents: - 'minSdk = libs.versions.android.sdk.min.get().toInt()'