suresh
09/19/2023, 5:35 AMDefaultHierarchyTemplate
. Tried all the usual stuffs (like clean, clear cache, restart etc). Any idea whats the issue here?plugins {
`kotlin-multiplatform`
}
kotlin {
macosArm64 {
binaries { executable(listOf(DEBUG, RELEASE)) { entryPoint = "main" } }
compilations.configureEach {
compilerOptions.configure { freeCompilerArgs.add("-Xallocator=custom") }
}
}
applyDefaultHierarchyTemplate()
sourceSets {
commonMain {
dependencies {
api(projects.common)
}
}
}
}
Cherrio LLC
09/19/2023, 3:01 PMsorceset
?suresh
09/19/2023, 3:04 PMsourceSets {
nativeMain {
}
// or macosMain etc
}
Cherrio LLC
09/19/2023, 3:16 PMdependsOn
to link it. As quoted in the docs:
Some dependencies for source sets are set by default. You don't need to specify anyMore hererelations manuallydependsOn
suresh
09/19/2023, 3:18 PMapplyDefaultHierarchyTemplate()
should take care of that part - https://kotlinlang.org/docs/whatsnew-eap.html#create-your-project-easierCherrio LLC
09/19/2023, 3:35 PMsuresh
09/19/2023, 3:42 PMCherrio LLC
09/19/2023, 3:57 PMapplyDefaultHierarchyTemplate()
If you want to have additional source sets that the default hierarchy template doesn't provide, for example between JS and the JVM, adjust the hierarchy by reapplying the template explicitly withand configuring additional source sets manually as usual withapplyDefaultHierarchyTemplate()
dependsOn()
suresh
09/19/2023, 5:28 PMapplyDefaultHierarchyTemplate()
is enabled by default. Same issue when removing that config