build: compile against Android 37.2 - #1453
Merged
Merged
Conversation
Dependabot's haze 2.0.0-beta03 bump (#1443) fails at configuration: Dependency 'dev.chrisbanes.haze:haze-blur-materials-android:2.0.0-beta03' requires libraries and applications that depend on it to compile against version 37.2 or later of the Android APIs. :apps:flipcash:shared:persistence:db is currently compiled against android-37.0. The catalog holds compileSdk as an integer and every consumer calls `.toInt()`, so there was nowhere to put a minor version. AGP 9.4.0 takes one through a spec block instead: compileSdk { version = release(37) { minorApiLevel = 2 } } That form is the only one available on both `CommonExtension` and `KotlinMultiplatformAndroidLibraryExtension` — the KMP extension has no `compileSdkMinor` property — so all twelve sites use it. Nine of those sites are KMP modules that hardcoded `compileSdk = 37` rather than reading the catalog, which is why this is a twelve-site change instead of a one-line one. They now read `android-compileSdk` and `android-compileSdkMinor` like everything else. `Build.VERSION.SDK_INT` still reports 37; only `SDK_INT_FULL` carries the minor, so no runtime behaviour changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dependabot's haze 2.0.0-beta03 bump (#1443) fails at configuration:
The catalog holds
compileSdkas an integer and every consumer calls.toInt(), so there was nowhere to put a minor version. AGP 9.4.0 takes one through a spec block instead:compileSdk { version = release(37) { minorApiLevel = 2 } }That form is the only one available on both
CommonExtensionandKotlinMultiplatformAndroidLibraryExtension— the KMP extension has nocompileSdkMinorproperty — so all twelve sites use it.Nine of those sites are KMP modules that hardcoded
compileSdk = 37rather than reading the catalog, which is why this is a twelve-site change instead of a one-line one. They now readandroid-compileSdkandandroid-compileSdkMinorlike everything else.Build.VERSION.SDK_INTstill reports 37; onlySDK_INT_FULLcarries the minor, so no runtime behaviour changes.CI needs SDK Platform 37.2. The workflow has no explicit platform install step, and
android.builder.sdkDownloadis unset (defaults on), so AGP downloads it the same way it obtains 37.0 today.Unblocks #1443.