-
-
Notifications
You must be signed in to change notification settings - Fork 61
Migrate to use new Android Library KMP Gradle Plugin #490
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR migrates the project from using the com.mikepenz.convention.android-library plugin to explicit Kotlin Multiplatform Android configuration, modernizes dependency declarations to use the sourceSets DSL, and removes experimental screenshot testing functionality.
Key Changes:
- Replaced the
com.mikepenz.convention.android-libraryplugin with explicitkotlin { android {} }orkotlin { androidLibrary {} }configuration blocks across all library and sample modules - Migrated dependency declarations from convention-based syntax (e.g.,
commonMainApi) to standardsourceSets { commonMain { dependencies {} } }blocks - Removed screenshot testing support and dependencies from the Android sample and project-wide gradle properties
- Updated the version catalog dependency to 0.11.6
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| settings.gradle.kts | Updated version catalog from 0.10.3 to 0.11.6 |
| sample/shared/build.gradle.kts | Migrated to androidLibrary {} DSL with Android resources enabled and explicit namespace configuration |
| sample/desktop/gradle.properties | Added property to disable Android support for the desktop module |
| sample/desktop/build.gradle.kts | Added Compose Hot Reload plugin |
| sample/android/build.gradle.kts | Removed screenshot testing plugin, experimental property, and related dependencies |
| multiplatform-markdown-renderer/build.gradle.kts | Replaced convention plugin with explicit android {} configuration and migrated dependencies to sourceSets |
| multiplatform-markdown-renderer-m3/build.gradle.kts | Replaced convention plugin with explicit android {} configuration and migrated dependencies to sourceSets |
| multiplatform-markdown-renderer-m2/build.gradle.kts | Replaced convention plugin with explicit android {} configuration and migrated dependencies to sourceSets |
| multiplatform-markdown-renderer-coil3/build.gradle.kts | Replaced convention plugin with explicit android {} configuration and migrated dependencies to sourceSets |
| multiplatform-markdown-renderer-coil2/build.gradle.kts | Replaced convention plugin with explicit android {} configuration and migrated dependencies to sourceSets with platform-specific androidMain sourceSet |
| multiplatform-markdown-renderer-code/build.gradle.kts | Replaced convention plugin with explicit android {} configuration and migrated dependencies to sourceSets |
| gradle.properties | Removed project-wide screenshot testing experimental property |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| val commonMain by getting { | ||
| dependencies { | ||
| api(projects.multiplatformMarkdownRenderer) | ||
| api(libs.coil.core.get().toString()) { |
Copilot
AI
Dec 29, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The dependency declaration should be api(libs.coil.core) instead of api(libs.coil.core.get().toString()). Converting the dependency to a String breaks Gradle's dependency DSL and will prevent the dependency from being resolved correctly. The version catalog accessor can be used directly without calling .get().toString().
| api(libs.coil.core.get().toString()) { | |
| api(libs.coil.core) { |
This pull request restructures the Gradle build configuration for multiple modules to improve consistency, modernize dependency declarations, and clean up unused or outdated settings. The main focus is on migrating away from the
com.mikepenz.convention.android-libraryplugin in favor of explicit Kotlin Multiplatform and Android configuration, as well as updating dependency declarations to use thesourceSetsblock. Additionally, some experimental and screenshot testing features are removed or disabled, and version catalogs are updated.Build configuration modernization and consistency:
Removed the
com.mikepenz.convention.android-libraryplugin from all affected modules and replaced it with explicitkotlin { android { ... } }configuration andsourceSets-based dependency declarations for better clarity and multiplatform support. (multiplatform-markdown-renderer/build.gradle.kts,multiplatform-markdown-renderer-code/build.gradle.kts,multiplatform-markdown-renderer-coil2/build.gradle.kts,multiplatform-markdown-renderer-coil3/build.gradle.kts,multiplatform-markdown-renderer-m2/build.gradle.kts,multiplatform-markdown-renderer-m3/build.gradle.kts,sample/shared/build.gradle.kts) [1] [2] [3] [4] [5] [6] [7]Updated dependency declarations to use
apiandcompileOnlyinsidesourceSets, aligning with current Kotlin Multiplatform best practices. [1] [2] [3] [4] [5] [6]Cleanup and removal of experimental/screenshot testing features:
gradle.properties,sample/android/build.gradle.kts) [1] [2] [3] [4]Version and plugin updates:
0.11.6) for dependency management. (settings.gradle.kts)sample/desktop/build.gradle.kts,sample/desktop/gradle.properties) [1] [2]Android and multiplatform resource handling improvements:
androidLibraryblock with explicit namespace and enabled experimental Android resources for KMP. (sample/shared/build.gradle.kts) [1] [2]These changes collectively improve the maintainability and future-proofing of the project’s build configuration.