Skip to content

Add :sample:android-app standalone Android application module#180

Merged
kirich1409 merged 4 commits intomainfrom
feat/sample-android-app
Apr 30, 2026
Merged

Add :sample:android-app standalone Android application module#180
kirich1409 merged 4 commits intomainfrom
feat/sample-android-app

Conversation

@kirich1409
Copy link
Copy Markdown
Contributor

Summary

  • Adds :sample:android-app (com.android.application) as a standalone Android sample app
  • Wires DataStoreConfigValueProvider via defaultLocalProvider(context) from :featured-platform
  • Shows FeatureFlagsDebugScreen on demand via button in SampleApp
  • Populates :sample's androidMain AndroidManifest.xml and MainActivity so the KMP module's existing Android target also works

How to build

./gradlew :sample:android-app:assembleRelease

APK: sample/android-app/build/outputs/apk/release/

Notes

  • Firebase provider excluded (requires google-services.json)
  • R8 minification enabled for release; ProGuard rules flow in transitively from upstream modules via consumerProguardFiles
  • ConfigValues is scoped to Activity for simplicity; in production use Application/DI singleton to avoid DataStore file conflicts across rotations

Closes #171

🤖 Generated with Claude Code

Creates a new :sample:android-app module (com.android.application) that
depends on :sample, :featured-debug-ui, and :featured-platform. Wires
DataStoreConfigValueProvider via defaultLocalProvider(context) and shows
FeatureFlagsDebugScreen on demand.

Also populates :sample's androidMain manifest and MainActivity so the
existing KMP sample module can run as a self-contained Android activity.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@qodo-code-review
Copy link
Copy Markdown

ⓘ You've reached your Qodo monthly free-tier limit. Reviews pause until next month — upgrade your plan to continue now, or link your paid account if you already have one.

- Delete accidental MainActivity from :sample KMP library module
- Revert :sample androidMain manifest to empty (library must not declare launcher Activity)
- Remove androidMain deps block from :sample (belonged to deleted MainActivity)
- Remove featured-debug-ui from :sample commonMain (only needed in android-app)
- android-app: fix import order for BackHandler
- android-app: use applicationContext instead of this for defaultLocalProvider
- android-app: add shrinkResources = true alongside isMinifyEnabled
- android-app: add androidx.appcompat for Theme.AppCompat.Light.NoActionBar
- android-app: remove tools:replace (library manifest no longer declares theme)
@kirich1409 kirich1409 merged commit 6f726de into main Apr 30, 2026
10 checks passed
@kirich1409 kirich1409 deleted the feat/sample-android-app branch April 30, 2026 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(sample): implement working sample app for v1.0.0

1 participant