Build on compileSdk/targetSdk 37 (Android 17): AGP 9.1 + Gradle 9.3 + Kotlin 2.2 - #1754
Closed
rahul-lohra wants to merge 5 commits into
Closed
Build on compileSdk/targetSdk 37 (Android 17): AGP 9.1 + Gradle 9.3 + Kotlin 2.2#1754rahul-lohra wants to merge 5 commits into
rahul-lohra wants to merge 5 commits into
Conversation
Contributor
PR checklist ❌The following issues were detected:
What we check
|
Update stream log library to fix namespace issue Adjust sourc code changes for adopting kotlin 2.2 Build on sdk 37
rahul-lohra
force-pushed
the
feature/rahullohra/build-on-sdk-37
branch
from
July 28, 2026 08:36
5835587 to
b35031f
Compare
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.
Goal
Raise
compileSdk/targetSdkfrom 35 → 37 (Android 17). The installed platform is the stable, minor-versionedandroid-37.0, which the old toolchain (AGP 8.5.2) cannot even resolve (Failed to find Platform SDK … android-37). API 37 has a hard floor of AGP 9.1, and AGP 9 drops Kotlin 1.9 — so this is necessarily a full toolchain upgrade, not a one-line SDK bump.Note: this PR depends on the GetStream/stream-build-conventions-android#70 —
streamConventionsmust point at a published version that supports AGP 9 (currently0.13.2-SNAPSHOTin the catalog; pin to the released version before merge).Implementation
Toolchain Updates
compileSdk/targetSdkandroid.suppressUnsupportedCompileSdkorg.jetbrains.kotlin.plugin.compose)kotlinCompilerExtensionVersion)Dependency bumps forced by Gradle 9 / AGP 9
FileOrUriNotationConverterTestExtensionstreamConventions(build-conventions plugin)CommonExtensionstream-log-androidio.getstream.logas AGP 9 gives hard error if two different libraries share same namespaceBuild logic —
build-logic/convention/(AGP 9 DSL migration)CommonExtension<*,*,*,*,*,*>→ non-genericCommonExtensioneverywherebuildFeatures.compose,lint.abortOnError,productFlavorscontainer)KotlinAndroid.kt:kotlinOptions→compilerOptions(the old DSL is a hard error under-Werror)AndroidCompose.kt: apply the Compose plugin,stabilityConfigurationFiles, droppedkotlinCompilerExtensionVersionBuild scripts (Gradle 9 / AGP 9 API removals)
build.gradle.kts:kotlinOptions→compilerOptions;Project.exec { cp … }→File.copyTo(removed in Gradle 9)settings.gradle.kts: droppedremoveUnusedEntriesAfterDays(removed in Gradle 9)core+benchmark:managedDevices.devices→managedDevices.localDevicescore:buildDir→layout.buildDirectory;packaging.exclude()→resources.excludes.add();srcDir(Provider)→ concreteFiledemo-app:buildConfigFields?.put(now nullable in AGP 9);toLowerCase()→lowercase()Source Code Changes (Kotlin 2.2 strictness)
StreamVideoClient.kt:LruCache(maxSize = 100)→LruCache(100)(named args prohibited on Java functions)PermissionManager.kt: droppedinlineon stored constructorvals (inline property can't have a backing field)ForegroundServicePermissionManager.kt: hardcoded37→Build.VERSION_CODES.CINNAMON_BUN(constant now available at compileSdk 37)Public API
.apibaselines forcoreandui-compose(binary-compatibility-validator) to reflect Kotlin-2.2 signature changes.🎨 UI Changes
None
Testing
core,ui-core,ui-xml,ui-compose,filters-video,previewdata,demo-app(development/debug incl. Hilt KSP), all fourtutorials/*, andmetrics.testDebugUnitTest),apiCheck,spotlessCheck, and an on-device smoke test of the demo app on an Android 17 device/emulator — especially the incoming-call ringtone path touched by theCINNAMON_BUNchange.Library … nullmodel error. CLI/CI is unaffected.