Skip to content

Commit d7d303b

Browse files
author
olme04
authored
Fix publication after kotlin 1.6 (#194)
1 parent 1115e7f commit d7d303b

File tree

5 files changed

+9
-31
lines changed

5 files changed

+9
-31
lines changed

.github/workflows/gradle-main.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ jobs:
9999
build:
100100
strategy:
101101
matrix:
102-
os: [ macos-11, ubuntu-latest, windows-latest ]
102+
os: [ macos-11, ubuntu-latest ]
103103
fail-fast: false
104104
runs-on: ${{ matrix.os }}
105105

@@ -127,12 +127,7 @@ jobs:
127127

128128
publish:
129129
needs: [ build, test ]
130-
runs-on: ${{ matrix.os }}
131-
strategy:
132-
matrix:
133-
os: [ ubuntu-latest, macos-11, windows-latest ]
134-
fail-fast: false
135-
130+
runs-on: macos-11
136131
steps:
137132
- uses: actions/checkout@v2
138133
- uses: actions/setup-java@v2

.github/workflows/gradle-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ jobs:
9494
build:
9595
strategy:
9696
matrix:
97-
os: [ macos-11, ubuntu-latest, windows-latest ]
97+
os: [ macos-11, ubuntu-latest ]
9898
fail-fast: false
9999
runs-on: ${{ matrix.os }}
100100

.github/workflows/gradle-release.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
build:
1212
strategy:
1313
matrix:
14-
os: [ macos-11, ubuntu-latest, windows-latest ]
14+
os: [ macos-11, ubuntu-latest ]
1515
fail-fast: false
1616
runs-on: ${{ matrix.os }}
1717

@@ -39,12 +39,7 @@ jobs:
3939

4040
publish:
4141
needs: [ build ]
42-
runs-on: ${{ matrix.os }}
43-
strategy:
44-
matrix:
45-
os: [ ubuntu-latest, macos-11, windows-latest ]
46-
fail-fast: false
47-
42+
runs-on: macos-11
4843
steps:
4944
- uses: actions/checkout@v2
5045
- uses: actions/setup-java@v2

.github/workflows/publish-branch.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,7 @@ on: workflow_dispatch
33

44
jobs:
55
publish:
6-
runs-on: ${{ matrix.os }}
7-
strategy:
8-
matrix:
9-
os: [ ubuntu-latest, macos-11, windows-latest ]
10-
fail-fast: false
11-
6+
runs-on: macos-11
127
steps:
138
- uses: actions/checkout@v2
149
- uses: actions/setup-java@v2

build.gradle.kts

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import groovy.util.*
1818
import org.gradle.api.publish.maven.internal.artifact.*
1919
import org.jetbrains.kotlin.gradle.dsl.*
2020
import org.jetbrains.kotlin.gradle.plugin.mpp.*
21-
import org.jetbrains.kotlin.konan.target.*
2221
import org.jfrog.gradle.plugin.artifactory.dsl.*
2322

2423
buildscript {
@@ -43,16 +42,10 @@ plugins {
4342
id("com.jfrog.artifactory") apply false
4443
}
4544

45+
//on macos it will return all publications supported by rsocket, as linux and mingw can be crosscompiled there for publication
46+
//on linux and mac it will not contain mac targets
4647
val Project.publicationNames: Array<String>
47-
get() {
48-
val publishing: PublishingExtension by extensions
49-
val all = publishing.publications.names
50-
//publish js, jvm, metadata, linuxX64 and kotlinMultiplatform only once
51-
return when {
52-
HostManager.hostIsLinux -> all
53-
else -> all - "js" - "jvm" - "metadata" - "kotlinMultiplatform" - "linuxX64"
54-
}.toTypedArray()
55-
}
48+
get() = extensions.getByType<PublishingExtension>().publications.names.toTypedArray()
5649

5750
subprojects {
5851
tasks.whenTaskAdded {

0 commit comments

Comments
 (0)