Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix publication after kotlin 1.6 #194

Merged
merged 2 commits into from
Dec 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions .github/workflows/gradle-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
build:
strategy:
matrix:
os: [ macos-11, ubuntu-latest, windows-latest ]
os: [ macos-11, ubuntu-latest ]
fail-fast: false
runs-on: ${{ matrix.os }}

Expand Down Expand Up @@ -127,12 +127,7 @@ jobs:

publish:
needs: [ build, test ]
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-11, windows-latest ]
fail-fast: false

runs-on: macos-11
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gradle-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
build:
strategy:
matrix:
os: [ macos-11, ubuntu-latest, windows-latest ]
os: [ macos-11, ubuntu-latest ]
fail-fast: false
runs-on: ${{ matrix.os }}

Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/gradle-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
build:
strategy:
matrix:
os: [ macos-11, ubuntu-latest, windows-latest ]
os: [ macos-11, ubuntu-latest ]
fail-fast: false
runs-on: ${{ matrix.os }}

Expand Down Expand Up @@ -39,12 +39,7 @@ jobs:

publish:
needs: [ build ]
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-11, windows-latest ]
fail-fast: false

runs-on: macos-11
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/publish-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,7 @@ on: workflow_dispatch

jobs:
publish:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-11, windows-latest ]
fail-fast: false

runs-on: macos-11
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
Expand Down
13 changes: 3 additions & 10 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import groovy.util.*
import org.gradle.api.publish.maven.internal.artifact.*
import org.jetbrains.kotlin.gradle.dsl.*
import org.jetbrains.kotlin.gradle.plugin.mpp.*
import org.jetbrains.kotlin.konan.target.*
import org.jfrog.gradle.plugin.artifactory.dsl.*

buildscript {
Expand All @@ -43,16 +42,10 @@ plugins {
id("com.jfrog.artifactory") apply false
}

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

subprojects {
tasks.whenTaskAdded {
Expand Down