@@ -23,6 +23,7 @@ fun configInterop(target: org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTar
2323 " -linker-options" ,
2424 " -lsqlite3 -L/usr/lib/x86_64-linux-gnu -L/usr/lib"
2525 )
26+
2627 HostManager .hostIsMingw -> listOf (" -linker-options" , " -lsqlite3 -Lc:\\ msys64\\ mingw64\\ lib" )
2728 else -> listOf (" -linker-options" , " -lsqlite3" )
2829 }
@@ -46,6 +47,7 @@ kotlin {
4647 watchosDeviceArm64(),
4748 mingwX64(),
4849 linuxX64(),
50+ linuxArm64(),
4951 )
5052
5153 knTargets
@@ -63,7 +65,6 @@ kotlin {
6365 }
6466 commonMain {
6567 dependencies {
66- implementation(" org.jetbrains.kotlin:kotlin-stdlib-common" )
6768 }
6869 }
6970 commonTest {
@@ -78,10 +79,16 @@ kotlin {
7879 val appleMain = sourceSets.maybeCreate(" appleMain" ).apply {
7980 dependsOn(nativeCommonMain)
8081 }
81- val linuxMain = sourceSets.maybeCreate(" linuxX64Main " ).apply {
82+ val linuxMain = sourceSets.maybeCreate(" linuxMain " ).apply {
8283 dependsOn(nativeCommonMain)
8384 }
84-
85+ val linuxX64Main = sourceSets.maybeCreate(" linuxX64Main" ).apply {
86+ dependsOn(linuxMain)
87+ }
88+ val linuxArm64Main = sourceSets.maybeCreate(" linuxArm64Main" ).apply {
89+ dependsOn(linuxMain)
90+ }
91+
8592 val mingwMain = sourceSets.maybeCreate(" mingwMain" ).apply {
8693 dependsOn(nativeCommonMain)
8794 }
@@ -96,9 +103,11 @@ kotlin {
96103 target.compilations.getByName(" main" ).defaultSourceSet.dependsOn(mingwMain)
97104 target.compilations.getByName(" test" ).defaultSourceSet.dependsOn(nativeCommonTest)
98105 }
106+
99107 target.name.startsWith(" linux" ) -> {
100108 target.compilations.getByName(" test" ).defaultSourceSet.dependsOn(nativeCommonTest)
101109 }
110+
102111 else -> {
103112 target.compilations.getByName(" main" ).defaultSourceSet.dependsOn(appleMain)
104113 target.compilations.getByName(" test" ).defaultSourceSet.dependsOn(nativeCommonTest)
@@ -112,20 +121,13 @@ tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinNativeCompile> {
112121 kotlinOptions.freeCompilerArgs + = " -Xexpect-actual-classes"
113122}
114123
115- if (! HostManager .hostIsLinux) {
116- tasks.findByName(" linuxX64Test" )?.enabled = false
117- tasks.findByName(" linkDebugTestLinuxX64" )?.enabled = false
118- tasks.findByName(" publishLinuxX64PublicationToMavenRepository" )?.enabled = false
119- }
120-
121- if (! HostManager .hostIsMingw) {
122- tasks.findByName(" mingwX64Test" )?.enabled = false
123- tasks.findByName(" linkDebugTestMingwX64" )?.enabled = false
124- tasks.findByName(" publishMingwX64PublicationToMavenRepository" )?.enabled = false
125- }
124+ listOf (
125+ " linuxX64Test" ,
126+ " linuxArm64Test" ,
127+ " linkDebugTestLinuxX64" ,
128+ " linkDebugTestLinuxArm64" ,
129+ " mingwX64Test" ,
130+ " linkDebugTestMingwX64" ,
131+ ).forEach { tasks.findByName(it)?.enabled = false }
126132
127133apply (from = " ../gradle/gradle-mvn-mpp-push.gradle" )
128-
129- tasks.register(" publishMac" ){
130- setDependsOn(tasks.filter { t -> t.name.startsWith(" publish" ) && t.name.endsWith(" ToMavenRepository" ) && ! t.name.contains(" Linux" ) }.map { it.name })
131- }
0 commit comments