Skip to content

chore(build): AGP 9.0 migration#38

Merged
lackary merged 4 commits intomainfrom
chore/agp-9-migration
Jan 23, 2026
Merged

chore(build): AGP 9.0 migration#38
lackary merged 4 commits intomainfrom
chore/agp-9-migration

Conversation

@lackary
Copy link
Owner

@lackary lackary commented Jan 23, 2026

Related Issues

Closes #37

Type of Change

Please check the main type of change this PR introduces. If there are multiple, please select the most significant one.

  • feat: New feature
  • fix: Bug fix
  • refactor: Code refactoring
  • docs: Documentation update
  • chore: Chore (e.g., updating dependencies, build tooling)
  • style: Style changes (e.g., formatting, no code logic changes)
  • test: Adding or modifying tests
  • other: Other: [Please briefly describe]

Description

This PR introduces a major refactor of the project structure, including module renaming, separation of Android-specific logic, and build tool upgrades.

1. Project Structure Refactor

  • Module Renaming: Renamed the composeApp module to compose and updated the package name to io.lackstudio.omnihub.compose.
  • Android Separation: Extracted Android-specific application logic and resources into a new standalone :androidApp module and updated settings.gradle.kts to include both modules.
  • Path Updates: Refactored internal imports and file paths across all source sets (common, android, ios, jvm, web) to match the new package structure.

2. Dependencies & Build Tooling

  • AGP & Gradle: Upgraded Gradle Wrapper to 9.1.0 and Android Gradle Plugin (AGP) to 9.0.0.
  • Version Catalog: Cleaned up libs.versions.toml by reordering entries and migrating compose module dependencies to use Version Catalog aliases.
  • Preview Annotations: Migrated UI component previews from org.jetbrains.compose... to the standard androidx.compose.ui.tooling.preview.Preview.

3. iOS Configuration

  • Xcode Scripts: Updated the Gradle invocation path in the "Embed Kotin Framework" build phase from :composeApp to :compose.
  • CocoaPods: Explicitly initialized inputPaths and outputPaths for the "[CP] Copy Pods Resources" build phase and updated the Podfile to reference the renamed framework.

How to test it?

Due to the module renaming, it is recommended to Clean Project before testing.

Tested Platforms:

  • Android
  • iOS
  • Desktop (JVM)
  • Web (Wasm/JS)
  • Shared Logic (Unit Tests)

Test Details:

  • Unit tests: Did you write new tests to verify the smallest units of code?
  • Integration tests: Did you test how different parts of the system work together?
  • Manual testing:
    1. Android: Sync Gradle and successfully run :androidApp on an emulator.
    2. iOS: Run pod install in the iosApp directory and ensure Xcode builds and runs the app successfully.
    3. Check Config: Verify that libs.versions.toml is correctly formatted and contains no duplicate entries.

Review Checklist

Before submitting this PR, please confirm the following:

  • My code follows the project's coding style guidelines.
  • I have added sufficient comments to my code, especially in complex areas.
  • I have updated the relevant documentation.
  • My changes don't introduce new bugs.
  • I have tested my code locally.

… to `compose`

This commit performs a major restructuring of the project modules and updates dependencies to reflect a multi-module architecture.

Key changes:
- **Module Renaming**: Renamed the `composeApp` module to `compose` and updated its package name to `io.lackstudio.omnihub.compose`.
- **Android Separation**: Extracted Android-specific application logic and resources into a new standalone `:androidApp` module.
- **Gradle & Versions**:
    - Updated Gradle wrapper to 9.1.0 and Android Gradle Plugin (AGP) to 9.0.0.
    - Switched the `compose` module to use the `com.android.kotlin.multiplatform.library` plugin.
    - Added new dependencies for Lifecycle, Compose BOM, and Koin Android in `libs.versions.toml`.
- **Package Refactoring**: Updated all internal imports and file paths to match the new `io.lackstudio.omnihub.compose` package structure across common, android, ios, jvm, and web source sets.
- **iOS Integration**: Updated `Podfile`, `Podfile.lock`, and `iOSApp.swift` to reference the renamed `Compose` framework.
- **Build Configuration**:
    - Updated `settings.gradle.kts` to include `:compose` and `:androidApp`.
    - Refactored `buildkonfig` to use the new module package name.
    - Updated the `setup_ios.sh` script to point to the new module directory.
- **Web**: Updated `index.html` to reference `compose.js`.
This commit reorganizes the Gradle dependency management for the `compose` module and updates UI component imports to use standard AndroidX preview annotations.

Key changes:
- **Dependency Management**:
    - Migrated `compose/build.gradle.kts` to use version catalog aliases (e.g., `libs.compose.*`) instead of the `compose` helper object for core libraries like runtime, foundation, and material3.
    - Added `androidx.compose.bom` and `ui-tooling` to `androidMain` dependencies.
    - Updated `libs.versions.toml` with explicit versions for `composeMaterial3`, `composeMaterial`, and `composeMaterial3Adaptive`.
- **UI & Tooling**:
    - Switched from `org.jetbrains.compose.ui.tooling.preview.Preview` to `androidx.compose.ui.tooling.preview.Preview` across all UI screens (Gallery, Home, Settings, etc.).
    - Standardized the inclusion of `material3-adaptive` and `adaptive-navigation-suite` within the common source set.
- **Cleanup**: Reordered and grouped entries in `libs.versions.toml` for better maintainability.
This commit clean up the libs.versions.toml

Key changes:
- **Dependency Management**:
    - Migrated `compose/build.gradle.kts` to use version catalog aliases (e.g., `libs.lifecycle.*`) instead of the `androidx` helper object for core libraries like runtime and viewmodel.
- **Cleanup**: Reordered and grouped entries in `libs.versions.toml` for better maintainability.
This commit refactors the iOS project configuration to reflect module renaming and improves project file organization.

Key changes:
- **Build Script**: Updated the Gradle invocation in the "Embed Kotin Framework" build phase to use the `:compose` module path instead of `:composeApp`.
- **Project Structure**: Renamed file system synchronization exception sets and cleaned up empty configurations in `project.pbxproj`.
- **CocoaPods Integration**: Explicitly initialized `inputPaths` and `outputPaths` for the "[CP] Copy Pods Resources" build phase.
@lackary lackary self-assigned this Jan 23, 2026
@lackary lackary added the chore Maintenance, build config, or dependency updates (no src code label Jan 23, 2026
@lackary lackary linked an issue Jan 23, 2026 that may be closed by this pull request
@lackary lackary changed the title Chore/agp 9 migration chore(build): AGP 9.0 migration Jan 23, 2026
@lackary lackary merged commit edab905 into main Jan 23, 2026
2 checks passed
@lackary lackary deleted the chore/agp-9-migration branch January 23, 2026 09:24
@github-actions
Copy link

🎉 This PR is included in version 0.14.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Labels

chore Maintenance, build config, or dependency updates (no src code released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore: Migrate to Android Gradle Plugin 9.0

1 participant