diff --git a/gradle/platform.gradle b/gradle/platform.gradle index 736a9e3..661906b 100644 --- a/gradle/platform.gradle +++ b/gradle/platform.gradle @@ -52,6 +52,12 @@ targetList.forEach { target -> } } +static def configureNative(srcSetMain, srcSetTest) { + srcSetMain.kotlin.srcDirs = ['src/nativeMain/kotlin'] + srcSetTest.kotlin.srcDirs = ['src/nativeTest/kotlin'] +} + + logger.lifecycle(":platforms from: ${os.displayName} on ${arch.displayName}:${buildTargetList}=${useTarget}") kotlin { @@ -159,5 +165,14 @@ kotlin { implementation kotlin('test-annotations-common') } } + if (useTarget['linux']) { + configureNative(linuxMain, linuxTest) + } + if (useTarget['mingw']) { + configureNative(mingwX64Main, mingwX64Test) + } + if (useTarget['macos']) { + configureNative(macosMain, macosTest) + } } }