File tree Expand file tree Collapse file tree 2 files changed +16
-21
lines changed Expand file tree Collapse file tree 2 files changed +16
-21
lines changed Original file line number Diff line number Diff line change @@ -3,18 +3,12 @@ kotlin {
3
3
if (project. ext. ideaActive) {
4
4
fromPreset(project. ext. ideaPreset, ' native' )
5
5
} else {
6
- if (project. ext. isLinuxHost) {
7
- fromPreset(presets. linuxX64, ' linuxX64' )
8
- }
9
- if (project. ext. isMacosHost) {
10
- fromPreset(presets. iosArm64, ' iosArm64' )
11
- fromPreset(presets. iosArm32, ' iosArm32' )
12
- fromPreset(presets. iosX64, ' iosX64' )
13
- fromPreset(presets. macosX64, ' macosX64' )
14
- }
15
- if (project. ext. isWinHost) {
16
- fromPreset(presets. mingwX64, ' windowsX64' )
17
- }
6
+ fromPreset(presets. linuxX64, ' linuxX64' )
7
+ fromPreset(presets. iosArm64, ' iosArm64' )
8
+ fromPreset(presets. iosArm32, ' iosArm32' )
9
+ fromPreset(presets. iosX64, ' iosX64' )
10
+ fromPreset(presets. macosX64, ' macosX64' )
11
+ fromPreset(presets. mingwX64, ' windowsX64' )
18
12
}
19
13
}
20
14
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ task stubJavadoc(type: Jar) {
18
18
publishing {
19
19
repositories {
20
20
maven { url = ' https://kotlin.bintray.com/kotlinx' }
21
- maven { name = " testLocal" ; url = " $rootProject . buildDir /m2" }
21
+ maven { name = " testLocal" ; url = " $rootProject . buildDir /m2" }
22
22
}
23
23
publications. all {
24
24
pom. withXml(configureMavenCentralMetadata)
@@ -30,7 +30,7 @@ publishing {
30
30
from kotlin. sourceSets. commonMain. kotlin
31
31
}
32
32
33
- it. artifactId = " $project . name "
33
+ it. artifactId = " $project . name -native "
34
34
it. artifact stubJavadoc
35
35
it. artifact sourcesJar
36
36
break
@@ -40,16 +40,17 @@ publishing {
40
40
}
41
41
}
42
42
43
- kotlin. targets. forEach { target ->
44
- def publication = publications. findByName(target. name)
43
+ kotlin. targets. all { target ->
44
+ def publication = publishing. publications. findByName(target. name)
45
+
45
46
if (publication != null ) {
46
47
publication. artifact stubJavadoc
47
- }
48
48
49
- if (target. platformType. name != ' native' ) {
50
- publication. gradleModuleMetadataFile = null
51
- tasks. matching { it. name == " generateMetadataFileFor${ name.capitalize()} Publication" }. all {
52
- onlyIf { false }
49
+ if (target. platformType. name != ' native' ) {
50
+ publication. gradleModuleMetadataFile = null
51
+ tasks. matching { it. name == " generateMetadataFileFor${ name.capitalize()} Publication" }. all {
52
+ onlyIf { false }
53
+ }
53
54
}
54
55
}
55
56
}
You can’t perform that action at this time.
0 commit comments