Skip to content

Feat: Merge sample apps and update dependencies#109

Merged
jacob-derynk merged 1 commit into
feature/cmp-library-migrate-compose-to-cmpfrom
feature/unify-sample-apps-into-one-module
Oct 1, 2025
Merged

Feat: Merge sample apps and update dependencies#109
jacob-derynk merged 1 commit into
feature/cmp-library-migrate-compose-to-cmpfrom
feature/unify-sample-apps-into-one-module

Conversation

@jacob-derynk

Copy link
Copy Markdown
Contributor

🔄 Merge Sample Modules: Combine Legacy Views into Compose Multiplatform Sample

📋 Summary

This PR combines the project's sample applications by removing the standalone legacy Android-only sample module and integrating its functionality into the existing sample-cmp (Compose Multiplatform) module. The unified sample app now provides Android users with a choice between modern Compose Multiplatform and legacy Android Views implementations through an intuitive chooser interface. IOS part behavior is unchanged.

🔧 Changes Made

Module Structure

  • Removed: sample/ module (legacy Android-only)
  • Enhanced: sample-cmp/ module (now supports both implementations)

New Architecture

  • MainActivity: Chooser screen allowing users to select between implementations
  • CmpSampleActivity: Compose Multiplatform implementation showcase
  • ViewsSampleActivity: Legacy Android Views implementation showcase

Resource Migration

  • Moved layouts, drawables, strings, colors, and styles from sample to sample-cmp/src/androidMain
  • Preserved all functionality while eliminating duplication
  • Updated resource references and package names

Dependencies & Configuration

  • Updated sample-cmp/build.gradle.kts to include legacy Views dependencies
  • Removed sample module from settings.gradle.kts
  • Updated AndroidManifest.xml with proper activity declarations and themes
  • Fixed tools:context references in layout files
  • Updated gradle version

Documentation & CI

  • Updated README.md to reflect new unified structure
  • Updated Dangerfile for correct ktlint reporting paths
  • Maintained all existing functionality and examples

This commit removes the legacy Android-only `sample` module and integrates its functionality into the `sample-cmp` (Compose Multiplatform) module.

The `sample-cmp` module now offers a chooser screen to navigate between the Compose Multiplatform and the legacy Android Views implementations of the Donut component.

Key changes:
- Deleted the `sample` module and all its contents.
- Moved relevant resources (layouts, drawables, strings, colors, styles) and Kotlin utility files from `sample` to `sample-cmp/src/androidMain`.
- Created `ViewsSampleActivity.kt` in `sample-cmp` to host the legacy Views sample.
- Created `CmpSampleActivity.kt` in `sample-cmp` to host the Compose Multiplatform sample.
- Updated `MainActivity.kt` in `sample-cmp` to display a chooser screen for selecting between the CMP and Views samples.
- Updated `AndroidManifest.xml` in `sample-cmp` to declare the new activities and set `MainActivity` as the launcher.
- Updated `sample-cmp/build.gradle.kts` to include dependencies for the legacy Views implementation (appcompat, constraintlayout, material) and the main library.
- Updated `settings.gradle.kts` to remove the `sample` module.
- Updated `README.md` to reflect the consolidated sample app structure.
- Updated `Dangerfile` to point to the new location of ktlint reports for the sample app.
- Updated Android Gradle Plugin version in `gradle/libs.versions.toml`.
@jacob-derynk
jacob-derynk merged commit 095a746 into feature/cmp-library-migrate-compose-to-cmp Oct 1, 2025
1 check passed
@jacob-derynk
jacob-derynk deleted the feature/unify-sample-apps-into-one-module branch October 1, 2025 12:27
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.

2 participants