Skip to content

Conversation

@mikepenz
Copy link
Owner

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-library plugin in favor of explicit Kotlin Multiplatform and Android configuration, as well as updating dependency declarations to use the sourceSets block. 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-library plugin from all affected modules and replaced it with explicit kotlin { android { ... } } configuration and sourceSets-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 api and compileOnly inside sourceSets, aligning with current Kotlin Multiplatform best practices. [1] [2] [3] [4] [5] [6]

Cleanup and removal of experimental/screenshot testing features:

  • Removed screenshot testing configuration and related dependencies from both the Gradle properties and the Android sample module, simplifying the build and reducing unnecessary complexity. (gradle.properties, sample/android/build.gradle.kts) [1] [2] [3] [4]

Version and plugin updates:

  • Updated the version catalog reference to a newer version (0.11.6) for dependency management. (settings.gradle.kts)
  • Added the Compose Hot Reload plugin to the desktop sample and disabled Android support in its properties for clarity. (sample/desktop/build.gradle.kts, sample/desktop/gradle.properties) [1] [2]

Android and multiplatform resource handling improvements:

  • Updated the shared sample module to use the androidLibrary block 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.

Copilot AI review requested due to automatic review settings December 29, 2025 18:32
Copy link
Contributor

Copilot AI left a 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-library plugin with explicit kotlin { android {} } or kotlin { androidLibrary {} } configuration blocks across all library and sample modules
  • Migrated dependency declarations from convention-based syntax (e.g., commonMainApi) to standard sourceSets { 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()) {
Copy link

Copilot AI Dec 29, 2025

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().

Suggested change
api(libs.coil.core.get().toString()) {
api(libs.coil.core) {

Copilot uses AI. Check for mistakes.
@mikepenz mikepenz merged commit c1ecb68 into develop Dec 29, 2025
9 checks passed
@mikepenz mikepenz deleted the feature/migrate_new_android_kmp branch December 29, 2025 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants