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

feat(publish): Fixed maven publishing to maven central #16

Merged
merged 1 commit into from
May 15, 2024
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
12 changes: 9 additions & 3 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@ jobs:
distribution: 'temurin'
java-version: 17
- name: Publish
run: |
NEW_VERSION=$(echo "${GITHUB_REF}" | cut -d "/" -f3)
echo "New version: ${NEW_VERSION}"
export ORG_GRADLE_PROJECT_VERSION_NAME=${NEW_VERSION}
./gradlew publish --stacktrace
env:
MAVEN_USER: ${{ secrets.MAVEN_USER }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
run: ./gradlew publish
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.ORG_GRADLE_PROJECT_mavenCentralUsername }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.ORG_GRADLE_PROJECT_mavenCentralPassword }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.ORG_GRADLE_PROJECT_signingInMemoryKey }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.ORG_GRADLE_PROJECT_signingInMemoryKeyPassword }}
4 changes: 1 addition & 3 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,9 @@ tasks.named<Test>("jvmTest") {
}

mavenPublishing {
publishToMavenCentral(SonatypeHost.DEFAULT, true)
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL, true)
signAllPublications()

coordinates("de.frederikbertling.kosc", "core", "0.1.0")

pom {
name.set("kOSC core library")
description.set("OSC implementation for kotlin multiplatform")
Expand Down
4 changes: 1 addition & 3 deletions udp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,10 @@ tasks.named<Test>("jvmTest") {
}

mavenPublishing {
publishToMavenCentral(SonatypeHost.DEFAULT, true)
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL, true)

signAllPublications()

coordinates("de.frederikbertling.kosc", "udp", "0.1.0")

pom {
name.set("kOSC UDP server and client implementation")
description.set("OSC over UDP implementation for kotlin multiplatform")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class OSCUDPSocketTest : StringSpec() {

init {
"OSCUDPSocket test #1" {
val port = Random.nextInt(8080..30000)
val port = Random.nextInt(8080..8090)
val listener = OSCUDPSocket(port)
val client = OSCUDPSocket("localhost", port)
testClient(client, listener)
Expand All @@ -29,7 +29,7 @@ class OSCUDPSocketTest : StringSpec() {
}

"OSCUDPSocket test #2" {
val port = Random.nextInt(8080..30000)
val port = Random.nextInt(8080..8090)
val listener = OSCUDPSocket(port)
val client = OSCUDPSocket(InetSocketAddress("localhost", port))
testClient(client, listener)
Expand All @@ -38,14 +38,14 @@ class OSCUDPSocketTest : StringSpec() {
}

"OSCUDPSocket test #3" {
val port = Random.nextInt(8080..30000)
val port = Random.nextInt(8080..8090)
val listenerClient = OSCUDPSocket("localhost", port, port)
testClient(listenerClient, listenerClient)
listenerClient.close()
}

"OSCUDPSocket test #4" {
val port = Random.nextInt(8080..30000)
val port = Random.nextInt(8080..8090)
val listenerClient = OSCUDPSocket(
localAddress = InetSocketAddress("localhost", port),
remoteAddress = InetSocketAddress("localhost", port)
Expand Down
Loading