# Native Kotlin & Jetpack Compose Closed Testing Playbook: R8 Full Mode, Baseline Profiles & API 36

> Ship idiomatic Kotlin 2.1+ and Jetpack Compose Material 3 App Bundles through Google Play's 12-tester, 14-day closed testing mandate with R8 full mode, Baseline Profiles, and In-App Updates.

- **Canonical URL**: https://staging.gootester.com/frameworks/kotlin-jetpack-compose
- **Config File**: app/build.gradle.kts & gradle/libs.versions.toml
- **Build Command**: `./gradlew :app:bundleRelease :app:assembleReleaseBaselineProfile --no-daemon`

```kotlin
android {
    namespace = "com.example.composeapp"
    compileSdk = 36
    defaultConfig {
        applicationId = "com.example.composeapp"
        minSdk = 26
        targetSdk = 36
        versionCode = 4
        versionName = "1.1.0"
    }
    buildTypes {
        release {
            isMinifyEnabled = true
            isShrinkResources = true
            signingConfig = signingConfigs.getByName("upload")
            proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
        }
    }
}
```

## Critical Play Console Gotchas
1. **Shipping Jetpack Compose release builds without R8 and Baseline Profiles**: Unminified Jetpack Compose builds interpret thousands of unoptimized composable lambdas via JIT on first launch, causing sluggish cold starts and 25%+ initial scroll frame jank on mid-range hardware. Enable isMinifyEnabled = true and bundle androidx.profileinstaller Baseline Profiles in release.
2. **Kotlin Serialization or Retrofit crashing under R8 full mode**: Android Gradle Plugin 8.0+ enables android.enableR8.fullMode=true by default, aggressively stripping generic type signatures and reflection constructors. Prefer kotlinx.serialization with explicit @Serializable annotations or add targeted -keepattributes Signature and model rules for Retrofit, Moshi, and Gson.
3. **Edge-to-edge overlapping Compose Scaffold content on API 35 and 36**: Calling enableEdgeToEdge()—alongside mandatory system behavior when targetSdk >= 35—draws UI directly behind status bars, camera cutouts, and gesture navigation bars. Always pass Scaffold innerPadding into screen containers and apply Modifier.imePadding() on bottom text inputs.
4. **Leaving Play Core legacy libraries instead of split Play Services**: The monolithic com.google.android.play:core dependency is deprecated and incompatible with Android 14/15+ broadcast receiver security flags, triggering immediate Play Console warnings. Migrate to modular com.google.android.play:app-update-ktx and review-ktx artifacts before starting closed testing.

## Optimizing Jetpack Compose Release Bundles for Real Tester Hardware

Native Kotlin and Jetpack Compose give solo Android developers direct access to Android 15 (API 35) and Android 16 (API 36) platform capabilities without cross-platform bridge overhead, yet Compose has a sharp performance cliff between debug builds and properly configured release App Bundles. Because Compose is distributed as unbundled library code rather than pre-compiled system framework views, the Android Runtime (ART) relies heavily on R8 whole-program optimization (`isMinifyEnabled = true`) and Ahead-of-Time (AOT) Baseline Profiles (`androidx.baselineprofile`) to compile hot composable trees on installation. Skipping R8 or Baseline Profiles routinely produces severe first-scroll frame jank on mid-range devices during closed testing.
Pair Kotlin 2.1's strong skipping mode in the Compose compiler Gradle plugin (`org.jetbrains.kotlin.plugin.compose`) with immutable UI state data classes so recomposition skips unchanged subtrees deterministically. When Google Play App Signing processes your `app-release.aab`, Cloud Profiles and bundled Baseline Profiles convert critical startup and navigation paths into native machine code before your closed testers even tap the launcher icon.
Verify your release build locally via `bundletool` before adding `testers@gootester.com` to your Closed Testing track's Google Groups list. Confirm that R8 full mode has not stripped `kotlinx.serialization` serializers, Room `Database` implementations, Hilt/Koin entry points, or Jetpack Navigation type-safe route graphs.

## Target SDK 35/36 Compliance: Edge-to-Edge, Predictive Back & FGS Types

Targeting `targetSdk = 35` or `targetSdk = 36` activates strict OS and Play Console enforcement across window insets, background work, and foreground service declarations. In Jetpack Compose, verify every top-level screen consumes `Scaffold` `PaddingValues` and applies `WindowInsets.safeDrawing` or `Modifier.navigationBarsPadding()` on modal `ModalBottomSheet` components; clipped primary CTA buttons at the bottom of onboarding flows are one of the top functional defects uncovered during 14-day human closed testing.
Additionally, Android 15/16 enforces strict runtime checks on Foreground Services (`android:foregroundServiceType` in `AndroidManifest.xml`). Declaring `dataSync`, `location`, `mediaPlayback`, or `connectedDevice` in your manifest without both requesting the matching `FOREGROUND_SERVICE_*` permission and submitting the mandatory Play Console Foreground Service video justification under App Content stalls your Closed Testing track review before a single tester can opt in. Prefer `WorkManager` expedited jobs (`setExpedited`) for short network syncs to eliminate FGS policy friction entirely.
During GOOtester Standard ($12) and Premium ($20) campaigns, separate automated physical-device ARM64 ADB QA runs inspect cold-start latency, `dumpsys gfxinfo` Compose frame rendering times, and `dumpsys meminfo` PSS memory usage on real Android hardware while keeping automated runs completely isolated from your 12, 15, or 25 human testers.

## Using In-App Updates & Feedback Hooks to Strengthen Production Access

Native Kotlin apps can integrate two tiny official Play libraries — `com.google.android.play:app-update-ktx` and a lightweight in-app feedback sheet — in under fifty lines of Compose code to dramatically elevate closed testing quality. Checking `appUpdateManager.appUpdateInfo` on `Lifecycle.Event.ON_RESUME` prompts your active closed testers to install `versionCode 2` and `versionCode 3` as soon as Google Play approves each mid-window `.aab`, guaranteeing rapid version convergence across your 12-to-25 tester cohort.
Remember that Google Play alone grants or denies Production Access based on holistic policy compliance, Android Vitals stability, tester retention across 14 consecutive days, and your answers to the three Production Access readiness prompts. Citing concrete Compose layout fixes, Baseline Profile jank reductions, and verified multi-release `versionCode` adoption gives reviewers verifiable technical substance rather than generic boilerplate.
Pair your Compose release builds with Jetpack Macrobenchmark or local Layout Inspector recomposition counters prior to cutting Day-5 and Day-10 `.aab` updates, ensuring adaptive window size classes (`WindowWidthSizeClass`) render cleanly across compact phones, foldables, and large-screen tablets.
