File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
build-plugins/kmp-conventions/src/main/kotlin/aws/sdk/kotlin/gradle/kmp Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -42,12 +42,13 @@ val Project.hasDesktop: Boolean get() = hasNative || files.any { it.name == "des
4242val Project .hasLinux: Boolean get() = hasNative || hasJvmAndNative || files.any { it.name == " linux" }
4343val Project .hasApple: Boolean get() = hasNative || hasJvmAndNative || files.any { it.name == " apple" }
4444val Project .hasWindows: Boolean get() = hasNative || files.any { it.name == " windows" }
45+ val Project .hasPosix: Boolean get() = hasNative || hasJvmAndNative || files.any { it.name == " posix" }
4546
4647/* *
4748 * Test if a project follows the convention and needs configured for KMP (used in handful of spots where we have a
4849 * subproject that is just a container for other projects but isn't a KMP project itself).
4950 */
50- val Project .needsKmpConfigured: Boolean get() = hasCommon || hasJvm || hasNative || hasJs || hasJvmAndNative || hasDesktop || hasLinux || hasApple || hasWindows
51+ val Project .needsKmpConfigured: Boolean get() = hasCommon || hasJvm || hasNative || hasJs || hasJvmAndNative || hasDesktop || hasLinux || hasApple || hasWindows || hasPosix
5152
5253@OptIn(ExperimentalKotlinGradlePluginApi ::class )
5354fun Project.configureKmpTargets () {
@@ -96,6 +97,16 @@ fun Project.configureKmpTargets() {
9697 }
9798 }
9899 }
100+
101+ if (hasPosix) {
102+ common {
103+ group(" posix" ) {
104+ // Linux and Apple but NOT Mingw/Windows
105+ withLinux()
106+ withMacos()
107+ }
108+ }
109+ }
99110 }
100111
101112 // enable the targets
You can’t perform that action at this time.
0 commit comments