admin管理员组文章数量:1391955
I'm starting a KMP project using native UI's (Compose and Swift UI) and want it to control the shared module version independently by platform.
The project was created with the KMP Wizard.
When some changes are applied to the shared module code, I want to be able to select different versions for Android and iOS. Example:
- Android using shared module v1.4.5 (already implemented the updates at ComposeApp)
- iOS using shared module v1.4.0 (still need to implement the UI updates)
I thought about using the shared module published local using mavenLocal().
After setup the shared module, published to the .m2/repository folder (./gradlew publishToMavenLocal ), the module is not found in the dependencies.
Idk if it is the best way to do it.
/shared/build.gradle.kts
plugins {
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.androidLibrary)
id("maven-publish")
}
group = "com.example.project"
version = "1.0.0"
publishing {
repositories {
mavenLocal()
}
}
settings.gradle.kts
- Added the mavenLocal() repositories
/composeApp/build.gradle.kts
commonMain.dependencies {
. . .
// implementation(projects.shared)
implementation("com.example.project:shared:1.0.0") // Not found
}
本文标签: androidKMP project using shared module with maven local Shared module not foundStack Overflow
版权声明:本文标题:android - KMP project using shared module with maven local. Shared module not found - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744710233a2621086.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论