Skip to content

Build on compileSdk/targetSdk 37 (Android 17): AGP 9.1 + Gradle 9.3 + Kotlin 2.2 - #1756

Draft
rahul-lohra wants to merge 15 commits into
develop-v2from
v2/feature/rahullohra/build-on-sdk-37
Draft

Build on compileSdk/targetSdk 37 (Android 17): AGP 9.1 + Gradle 9.3 + Kotlin 2.2#1756
rahul-lohra wants to merge 15 commits into
develop-v2from
v2/feature/rahullohra/build-on-sdk-37

Conversation

@rahul-lohra

@rahul-lohra rahul-lohra commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Goal

Closes #AND-1342

Raise compileSdk/targetSdk from 35 → 37 (Android 17). The installed platform is the stable, minor-versioned android-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 — streamConventions must point at a published version that supports AGP 9 (currently 0.13.2-SNAPSHOT in the catalog; pin to the released version before merge).

Implementation

Toolchain Updates

Component From To Reason
compileSdk / targetSdk 35 37 Target Android 17
android.suppressUnsupportedCompileSdk 34 37 Match the new compileSdk
Android Gradle Plugin 8.10.1 9.1.1 Minimum for API 37 (9.0 caps at 36.1)
Gradle 8.8 9.3.1 Required by AGP 9.1

Dependency bumps forced by Gradle 9 / AGP 9

Dependency From To Reason
androidxComposeBom 2024.11.00 2025.08.01 AGP 9+ requirement
streamLog 1.3.2 1.3.4 Namespace was fixed
androidxMacroBenchmark 1.2.3 1.5.0-alpha07
androidxMacroBenchmark 1.2.3 1.5.0-alpha07
paparazzi 1.3.4 2.0.0-alpha05 No stable version yet
baseline-profile / benchmark 1.2.3 1.5.0-alpha07 Older versions can't resolve AGP 9's TestExtension
Hilt / Dagger 2.56.2 2.60.1 2.52's bytecode transform doesn't run under AGP 9
streamConventions (build-conventions plugin) 0.13.1 AGP-9-compatible build 0.13.1 calls block-DSLs removed from AGP 9's CommonExtension
stream-log-android 1.3.1 1.3.4 To fix shared namespace for io.getstream.log as AGP 9 gives hard error if two different libraries share same namespace

Dependent Stream Repositories

Dependency From To Reason
streamConventions 0.13.1 0.13.2-SNAPSHOT 0.13.1 calls block-DSLs removed from AGP 9's CommonExtension .We need support for Java 21 (the version will be updated soon)

Library Specific Updates

Paparazzi

  1. Re-record golden images: Paparazzi now depends on CompileSdk 37, which uses an updated layoutlib rendering engine. As a result, all Paparazzi golden images need to be re-recorded.
  2. Add a TrustManagerImpl TrustManagerImpl.java‎.

Robolectric

  1. Add a ‎robolectric.properties‎ file.

🎨 UI Changes

None

Testing

WIP

@rahul-lohra rahul-lohra self-assigned this Jul 29, 2026
@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

PR checklist ✅

All required conditions are satisfied:

  • Title length is OK (or ignored by label).
  • At least one pr: label exists.
  • Sections ### Goal, ### Implementation, and ### Testing are filled, or the PR is bot-authored.
  • An issue is linked (Linear ticket or GitHub issue), or the PR is bot-authored.

🎉 Great job! This PR is ready for review.

The metrics module uses the plain `io.getstream.video.android.application`
convention (not the `.compose` variant), so `configureAndroidCompose()`
never runs and the Compose BOM is not applied. Its compose flavors added
unversioned Compose artifacts (foundation, ui, ui-tooling) whose versions
come from the BOM, so resolution failed with:

  Could not find androidx.compose.foundation:foundation:

Add the BOM platform to each compose flavor's Implementation configuration
so the unversioned artifacts resolve.
@rahul-lohra rahul-lohra changed the title Build on compileSdk/targetSdk 37 (Android 17): AGP 9.1 + Gradle 9.3 + Kotlin 2.2 [AND-1342] Build on compileSdk/targetSdk 37 (Android 17): AGP 9.1 + Gradle 9.3 + Kotlin 2.2 Jul 29, 2026
@rahul-lohra rahul-lohra changed the title [AND-1342] Build on compileSdk/targetSdk 37 (Android 17): AGP 9.1 + Gradle 9.3 + Kotlin 2.2 Build on compileSdk/targetSdk 37 (Android 17): AGP 9.1 + Gradle 9.3 + Kotlin 2.2 Jul 29, 2026
Pointing the baseline-profile output/source dir at src/main made AGP 9's
prepareReleaseArtProfile recursively parse every file under it (res webp,
*.kt) as ART profile rules, failing with "Illegal token". Use the default
generated/baselineProfiles dir instead.
@rahul-lohra rahul-lohra added the pr:internal Internal or infra-only changes label Jul 30, 2026
jobs:
base-android-ci:
uses: GetStream/stream-build-conventions-android/.github/workflows/android-ci.yml@v0.13.1
uses: GetStream/stream-build-conventions-android/.github/workflows/android-ci.yml@feature/rahullohra/build-on-sdk-37
java-version: '21' # Paparazzi 2.0.0-alpha05 requires JDK 21.
distribution: temurin
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
jobs:
compare-sdk-sizes:
uses: GetStream/stream-build-conventions-android/.github/workflows/sdk-size-checks.yml@v0.13.1
uses: GetStream/stream-build-conventions-android/.github/workflows/sdk-size-checks.yml.yml@feature/rahullohra/build-on-sdk-37
@sonarqubecloud

sonarqubecloud Bot commented Aug 5, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
25.0% Coverage on New Code (required ≥ 80%)
C Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:internal Internal or infra-only changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants