KMP Missing Targets
KMP Missing Targets is a Gradle plugin designed to identify missing Kotlin multiplatform targets within a project. However, this tool is currently not ready for use.
Overview
In a typical scenario, you might depend on a library like kotlinx.coroutines
for your Kotlin multiplatform project. When tools like Renovate suggest updating to a newer version, such as upgrading from kotlinx-coroutines 1.7.2
to 1.8.0
, it's crucial to ensure that your project is equipped to handle any new targets introduced in the update.
For instance, if the new library version added support for wasmJs
and it wasn't accounted for in your project setup, the KMP Missing Targets plugin would flag this oversight during the continuous integration (CI) process. Specifically, it would fail the build, alerting you with a message like:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':kmpMissingTargets'.
> Missing targets found!
- wasmJs
Addressing Compatibility
The plugin helps project maintainers stay on top of compatibility issues by identifying which new targets are unavailable due to missing support in the project setup or other dependencies. If another dependency in the project doesn't support wasmJs
, the plugin helps you identify this roadblock so you can address it accordingly. This proactive identification is an invaluable resource, especially when user requests necessitate support for additional targets.
For instance, it might indicate that wasmJs
is unsupported by a specific dependency such as:
wasmJs
unsupported by:
org.jetbrains.compose.runtime:runtime:1.5.12
This clarity allows maintainers to focus their efforts effectively by identifying which specific dependencies need updates or adjustments to accommodate new multiplatform targets.
Project Licensing
The KMP Missing Targets plugin is released under the Apache License, Version 2.0, a robust open-source license facilitating wide adoption and collaboration. Users must comply with this license when utilizing the plugin, ensuring software freedom governed by defined terms and conditions. Details of the license are available on Apache’s official website.
Conclusion
KMP Missing Targets serves as a critical tool for Kotlin multiplatform project maintainers. By automatically detecting missing or unsupported targets, it ensures that projects can smoothly transition to accommodate new features and targets introduced in subsequent library updates, thereby maintaining project efficiency and effectiveness.