Aral 0.4.0 is now available. This release introduces support for the Android Gradle Library Plugin for Kotlin Multiplatform (KMP).
Android Gradle Library Plugin for KMP Link to heading
The com.android.kotlin.multiplatform.library
plugin is the officially supported way to add an Android target to a Kotlin Multiplatform library module. It replaces the previous use of com.android.library
in KMP projects, which is now deprecated.
Key characteristics of the plugin include:
- Single variant architecture: removes product flavors and build types, simplifying configuration.
- Optimized for KMP: focuses on shared Kotlin code and interoperability, without Android-specific legacy features.
- Tests disabled by default: host and device tests can be enabled explicitly.
- No top-level
android
block: configuration is handled throughandroidLibrary {}
within the KMP DSL. - Opt-in Java compilation: Java sources are not compiled unless explicitly enabled.
For details, see the official documentation.
Migration Notes Link to heading
Projects using com.android.library
for KMP should migrate to the new plugin. The migration involves:
- Declaring the plugin in the version catalog.
- Applying it in the root and module-level
build.gradle(.kts)
files. - Configuring the Android target with the
androidLibrary {}
block. - Explicitly enabling Android resources or test source sets if required.
Other Changes Link to heading
- Internal adjustments to align with the new plugin’s single-variant model.
- Updated build configuration to improve consistency across supported targets.
Availability Link to heading
aral 0.4.0 is available on the usual distribution channels. Users are encouraged to update to ensure compatibility with the evolving Kotlin Multiplatform ecosystem.