Youssef Shoaib [MOD]
08/02/2023, 4:30 AMtargetHierarchy
experimental API, but I can't figure out how to declare a group as jvm-only:
targetHierarchy.custom {
common {
group("jvm") {
withJvm()
withAndroidTarget()
}
}
}
in the generated jvmMain
and jvmTest
, I still don't have access to jvm apisephemient
08/02/2023, 4:34 AMJeff Lockhart
08/02/2023, 4:38 AM"jvm"
, as the jvm
target itself uses this name. I have a common JVM + Android intermediate source set that I've set up in almost this exact way. I'm just calling it group("jvmCommon")
is the only difference. I have not had an issue accessing JVM APIs. I've run into some other hurdles, but have mostly found workable resolutions for them all.Youssef Shoaib [MOD]
08/02/2023, 4:38 AMJeff Lockhart
08/02/2023, 4:41 AMtargetHierarchy.custom {
common {
group("jvmCommon") {
withAndroidTarget()
withJvm()
}
group("nativeCommon") {
group("apple") {
withApple()
}
group("native") {
withLinux()
withMingw()
}
}
}
}
androidTarget()
jvm()
iosArm64()
iosSimulatorArm64()
iosX64()
macosX64()
macosArm64()
linuxX64()
mingwX64()
Youssef Shoaib [MOD]
08/02/2023, 4:51 AMJeff Lockhart
08/02/2023, 5:12 AMcompileOnly
.
This mostly works, but I still needed a workaround to fix false positive errors in the IDE, where the JVM and Android dependency APIs clash, since the Android target ends up seeing both platform dependencies.takahirom
08/08/2023, 2:35 AMJeff Lockhart
08/08/2023, 3:49 AMjvm
source set, as this seems to have helped resolve the issue for Youssef. He was able to change the name back after it began working.takahirom
08/09/2023, 12:50 AM