Paulo Cereda
05/07/2024, 9:51 AMCLOVIS
05/07/2024, 10:01 AM:cli
module and a :core
module?Paulo Cereda
05/07/2024, 11:22 AM:cli
+ :core
would be a perfect example. Context: we have a multiplatform project using a deprecated/old syntax/structure that no longer builds with Kotlin > 1.9.10. Trying to fix the (cryptic) Gradle errors or converting parts of the build file to the new syntax did not work well for us, so I am taking a stab at starting fresh with a simple project. 😉CLOVIS
05/07/2024, 12:09 PMCLOVIS
05/07/2024, 12:13 PM// settings.gradle.kts
rootProject.name = "Name your project however you want"
dependencyResolutionManagement {
repositories {
mavenCentral()
}
}
include(
"cli",
"core",
)
// build.gradle.kts
plugins {
kotlin("multiplatform") version "1.9.23" apply false
}
// core/build.gradle.kts
plugins {
kotlin("multiplatform")
}
kotlin {
jvm()
linuxX64()
…
sourceSets.commonMain.dependencies {
implementation(…)
}
}
// cli/build.gradle.kts
plugins {
kotlin("multiplatform")
}
kotlin {
jvm()
…
sourceSets.commonMain.dependencies {
implementation(project.core)
}
}
Paulo Cereda
05/07/2024, 12:42 PMCLOVIS
05/07/2024, 12:42 PM