Open yshrsmz opened 4 months ago
afterEvaluate {
println("afterEvaluate")
val kmpExt = (this.kotlinExtension as KotlinMultiplatformExtension)
kmpExt.targets.forEach {target->
println("-------$target-------")
target.compilations.filter { !it.name.endsWith(suffix = "Test", ignoreCase = true) }
.filter { it.platformType == KotlinPlatformType.native }
.forEach {compilation ->
println("-------defaultSourceSet-------")
println(compilation.defaultSourceSet.kotlin.sourceDirectories.forEach { println(it) })
println("-------allKotlinSourceSets-------")
println(compilation.allKotlinSourceSets.forEach { a -> a.kotlin.sourceDirectories.forEach { b-> println(b) } })
}
}
}
Above snippet prints the output below
afterEvaluate
-------target android (androidJvm)-------
-------target iosArm64 (native)-------
-------defaultSourceSet-------
/Users/yshrsmz/repos/buildkonfig-145/shared/src/iosArm64Main/kotlin
kotlin.Unit
-------allKotlinSourceSets-------
/Users/yshrsmz/repos/buildkonfig-145/shared/src/iosArm64Main/kotlin
kotlin.Unit
-------target iosSimulatorArm64 (native)-------
-------defaultSourceSet-------
/Users/yshrsmz/repos/buildkonfig-145/shared/src/iosSimulatorArm64Main/kotlin
kotlin.Unit
-------allKotlinSourceSets-------
/Users/yshrsmz/repos/buildkonfig-145/shared/src/iosSimulatorArm64Main/kotlin
kotlin.Unit
-------target iosX64 (native)-------
-------defaultSourceSet-------
/Users/yshrsmz/repos/buildkonfig-145/shared/src/iosX64Main/kotlin
kotlin.Unit
-------allKotlinSourceSets-------
/Users/yshrsmz/repos/buildkonfig-145/shared/src/iosX64Main/kotlin
kotlin.Unit
-------target metadata (common)-------
what is this kotlin.Unit
?
Discussed in https://github.com/yshrsmz/BuildKonfig/discussions/145