Add KMP dependency: $ARGUMENTS
Steps:
- •
Search the web for the latest stable version of the library and confirm it supports Kotlin Multiplatform (Android + iOS targets).
- •
Read
gradle/libs.versions.tomlto understand the current version catalog structure. - •
Add the dependency to
gradle/libs.versions.toml:- •Add version under
[versions] - •Add library entry under
[libraries] - •Add plugin under
[plugins]if needed
- •Add version under
- •
Read
composeApp/build.gradle.ktsto understand the current dependency setup. - •
Add the dependency in
composeApp/build.gradle.ktsunder the correct source set:- •
commonMainif the library is multiplatform - •
androidMain/iosMainonly if platform-specific
- •
- •
Sync and verify:
code./gradlew :composeApp:dependencies
Rules:
- •Always use the latest stable version (no RC/alpha/beta unless explicitly requested)
- •Never hardcode versions in build.gradle.kts — use the version catalog
- •Confirm the library supports all project targets before adding to commonMain