Skip to content

Commit 338169a

Browse files
committed
Add aws.kotlin.native.enableAllTargets flag
1 parent 8c63445 commit 338169a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

build-plugins/kmp-conventions/src/main/kotlin/aws/sdk/kotlin/gradle/kmp/ConfigureTargets.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,13 @@ fun Project.configureKmpTargets() {
108108
// FIXME Configure JS
109109

110110
if (NATIVE_ENABLED) {
111-
if ((hasApple || hasDesktop) && HostManager.hostIsMac) {
111+
if ((hasApple || hasDesktop) && (HostManager.hostIsMac || NATIVE_ENABLE_ALL_TARGETS)) {
112112
kmpExt.apply { configureApple() }
113113
}
114-
if ((hasWindows || hasDesktop) && HostManager.hostIsMingw) {
114+
if ((hasWindows || hasDesktop) && (HostManager.hostIsMingw || NATIVE_ENABLE_ALL_TARGETS)) {
115115
kmpExt.apply { configureWindows() }
116116
}
117-
if ((hasLinux || hasDesktop) && HostManager.hostIsLinux) {
117+
if ((hasLinux || hasDesktop) && (HostManager.hostIsLinux || NATIVE_ENABLE_ALL_TARGETS)) {
118118
if (group == "aws.sdk.kotlin.crt") { // TODO Remove special-casing once K/N is released across the entire project
119119
kmpExt.apply { configureLinux() }
120120
} else {
@@ -220,3 +220,4 @@ fun KotlinMultiplatformExtension.configureSourceSetsConvention() {
220220

221221
val Project.JVM_ENABLED get() = prop("aws.kotlin.jvm")?.let { it == "true" } ?: true
222222
val Project.NATIVE_ENABLED get() = prop("aws.kotlin.native")?.let { it == "true" } ?: true
223+
val Project.NATIVE_ENABLE_ALL_TARGETS get() = prop("aws.kotlin.native.enableAllTargets")?.let { it == "true" } ?: false

0 commit comments

Comments
 (0)