File tree Expand file tree Collapse file tree 5 files changed +44
-32
lines changed Expand file tree Collapse file tree 5 files changed +44
-32
lines changed Original file line number Diff line number Diff line change 37
37
- name : Run unit tests
38
38
uses : gradle/gradle-build-action@3fbe033aaae657f011f88f29be9e65ed26bd29ef # v2.3.3
39
39
with :
40
- arguments : check --stacktrace
40
+ arguments : check -PenableNativeTargets - -stacktrace
41
41
42
42
- name : Run benchmarks
43
43
uses : gradle/gradle-build-action@3fbe033aaae657f011f88f29be9e65ed26bd29ef # v2.3.3
44
44
with :
45
- arguments : :benchmark:benchmark --stacktrace
45
+ arguments : :benchmark:benchmark -PenableNativeTargets - -stacktrace
Original file line number Diff line number Diff line change 42
42
- name : Publish
43
43
uses : gradle/gradle-build-action@3fbe033aaae657f011f88f29be9e65ed26bd29ef # v2.3.3
44
44
with :
45
- arguments : publishAllPublicationsToSonatypeRepository
45
+ arguments : publishAllPublicationsToSonatypeRepository -PenableNativeTargets
46
46
env :
47
47
ORG_GRADLE_PROJECT_signingKey : ${{ secrets.NEXUS_PUBLISH_GPG_KEY }}
48
48
ORG_GRADLE_PROJECT_signingPassword : ${{ secrets.NEXUS_PUBLISH_GPG_KEY_PASSWORD }}
73
73
- name : Publish Windows artifacts
74
74
uses : gradle/gradle-build-action@3fbe033aaae657f011f88f29be9e65ed26bd29ef # v2.3.3
75
75
with :
76
- arguments : publishMingwX64PublicationToSonatypeRepository publishMingwX86PublicationToSonatypeRepository
76
+ arguments : publishMingwX64PublicationToSonatypeRepository publishMingwX86PublicationToSonatypeRepository -PenableNativeTargets
77
77
env :
78
78
ORG_GRADLE_PROJECT_signingKey : ${{ secrets.NEXUS_PUBLISH_GPG_KEY }}
79
79
ORG_GRADLE_PROJECT_signingPassword : ${{ secrets.NEXUS_PUBLISH_GPG_KEY_PASSWORD }}
Original file line number Diff line number Diff line change @@ -18,17 +18,21 @@ benchmark {
18
18
register(" js" )
19
19
register(" jsIR" )
20
20
register(" jvm" )
21
- register(" native" )
21
+ if (providers.gradleProperty(" enableNativeTargets" ).isPresent) {
22
+ register(" native" )
23
+ }
22
24
}
23
25
}
24
26
25
27
kotlin {
26
28
jvm()
27
29
js { nodejs() }
28
30
js(" jsIR" , IR ) { nodejs() }
29
- if (HostManager .hostIsLinux) linuxX64(" native" ) { configureTarget() }
30
- if (HostManager .hostIsMingw) mingwX64(" native" ) { configureTarget() }
31
- if (HostManager .hostIsMac) macosX64(" native" ) { configureTarget() }
31
+ if (providers.gradleProperty(" enableNativeTargets" ).isPresent) {
32
+ if (HostManager .hostIsLinux) linuxX64(" native" ) { configureTarget() }
33
+ if (HostManager .hostIsMingw) mingwX64(" native" ) { configureTarget() }
34
+ if (HostManager .hostIsMac) macosX64(" native" ) { configureTarget() }
35
+ }
32
36
33
37
sourceSets[" commonMain" ].dependencies {
34
38
implementation(project(" :" ))
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import com.vanniktech.maven.publish.KotlinMultiplatform
3
3
import org.gradle.api.tasks.testing.Test
4
4
import org.gradle.api.tasks.testing.logging.TestLogEvent
5
5
import org.gradle.kotlin.dsl.withType
6
+ import org.jetbrains.kotlin.konan.target.HostManager
6
7
7
8
plugins {
8
9
alias(libs.plugins.kotlinMultiplatform)
@@ -72,25 +73,31 @@ kotlin {
72
73
}
73
74
}
74
75
}
75
- iosX64()
76
- iosArm32()
77
- iosArm64()
78
- tvosX64()
79
- tvosArm64()
80
- watchosX86()
81
- watchosX64()
82
- watchosArm32()
83
- watchosArm64()
84
- macosX64()
85
- mingwX86()
86
- mingwX64()
87
- linuxX64()
88
- macosArm64()
89
- iosSimulatorArm64()
90
- watchosSimulatorArm64()
91
- tvosSimulatorArm64()
92
- androidNativeArm32()
93
- androidNativeArm64()
76
+ if (providers.gradleProperty(" enableNativeTargets" ).isPresent) {
77
+ if (HostManager .hostIsMac) {
78
+ iosX64()
79
+ iosArm32()
80
+ iosArm64()
81
+ tvosX64()
82
+ tvosArm64()
83
+ watchosX86()
84
+ watchosX64()
85
+ watchosArm32()
86
+ watchosArm64()
87
+ macosX64()
88
+ macosArm64()
89
+ iosSimulatorArm64()
90
+ watchosSimulatorArm64()
91
+ tvosSimulatorArm64()
92
+ }
93
+ if (HostManager .hostIsMingw) {
94
+ mingwX86()
95
+ mingwX64()
96
+ }
97
+ linuxX64()
98
+ androidNativeArm32()
99
+ androidNativeArm64()
100
+ }
94
101
95
102
sourceSets {
96
103
getByName(" commonTest" ) {
@@ -104,7 +111,6 @@ kotlin {
104
111
105
112
tasks.withType<Test >().configureEach {
106
113
testLogging { events(TestLogEvent .PASSED , TestLogEvent .SKIPPED , TestLogEvent .FAILED ) }
107
- doNotTrackState(" Prevent caching of tests so they are always executed" )
108
114
}
109
115
110
116
signing {
Original file line number Diff line number Diff line change 1
1
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTargetWithHostTests
2
+ import org.jetbrains.kotlin.konan.target.HostManager
2
3
3
4
plugins {
4
5
application
@@ -22,10 +23,11 @@ kotlin {
22
23
}
23
24
}
24
25
}
25
- ios()
26
- linuxX64 { configureTarget() }
27
- mingwX64 { configureTarget() }
28
- macosX64 { configureTarget() }
26
+ if (providers.gradleProperty(" enableNativeTargets" ).isPresent) {
27
+ if (HostManager .hostIsLinux) linuxX64 { configureTarget() }
28
+ if (HostManager .hostIsMingw) mingwX64 { configureTarget() }
29
+ if (HostManager .hostIsMac) macosX64 { configureTarget() }
30
+ }
29
31
30
32
sourceSets { sourceSets[" commonMain" ].apply { dependencies { implementation(project(" :" )) } } }
31
33
}
You can’t perform that action at this time.
0 commit comments