Bradleycorn
08/13/2024, 2:17 PMapply false
, and then listed in each module without a version.
When I link the kmp repo with my android app using gitportal, this breaks, because those plugins are not listed in my app project's root build.gradle.kts. So when I try to sync the project, it can't determine the version and fails.
The easy solution is to just add those plugins to my android app's root build.gradle.kts. Is that the right way to go about it?kpgalligan
08/13/2024, 6:01 PMsettings.gradle.kts
file by pointing the module's projectDir
property to the folder where those modules live.
include(":app", ":breeds", ":analytics")
project(":breeds").projectDir = File("library/breeds")
project(":analytics").projectDir = File("library/analytics")
kpgalligan
08/13/2024, 6:04 PMapply false
Gradle plugins are listed in the root build.gradle.kts
file.
kotlin("multiplatform") version libs.versions.kotlin.get() apply false
kotlin("plugin.serialization") version libs.versions.kotlin.get() apply false
id("com.android.library") version kmpLibs.versions.android.gradle.plugin.get() apply false
alias(libs.plugins.compose.compiler) apply false
To cut down on duplicate versions, I import the KMP repo's version catalog so versions can be derived from either.
dependencyResolutionManagement {
versionCatalogs {
create("kmpLibs") {
from(files("library/gradle/libs.versions.toml"))
}
}
}
That's a personal preference thing.kpgalligan
08/13/2024, 6:04 PMkpgalligan
08/13/2024, 6:04 PMkpgalligan
08/13/2024, 6:06 PMgradle.properties