Skip to content

Commit c7ebfd4

Browse files
committed
use new maven publish plugin
1 parent 647016d commit c7ebfd4

11 files changed

Lines changed: 100 additions & 320 deletions

File tree

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
uses: actions/setup-java@v4
3030
with:
3131
distribution: 'temurin'
32-
java-version: '17'
32+
java-version: '11'
3333
- uses: lukka/get-cmake@latest
3434
- uses: actions/setup-python@v5
3535
with:
@@ -65,7 +65,7 @@ jobs:
6565
uses: actions/setup-java@v4
6666
with:
6767
distribution: 'temurin'
68-
java-version: '17'
68+
java-version: '11'
6969
- name: Setup CMake
7070
uses: lukka/get-cmake@latest
7171
- name: Setup Python
@@ -101,7 +101,7 @@ jobs:
101101
uses: actions/setup-java@v4
102102
with:
103103
distribution: 'temurin'
104-
java-version: '17'
104+
java-version: '11'
105105
- name: Install coreutils
106106
run: brew install coreutils
107107
- name: Setup CMake
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Release
1+
name: Publish
22

33
on:
44
workflow_dispatch:
@@ -25,7 +25,7 @@ jobs:
2525
uses: actions/setup-java@v4
2626
with:
2727
distribution: 'temurin'
28-
java-version: '17'
28+
java-version: '11'
2929
- name: Setup CMake
3030
uses: lukka/get-cmake@latest
3131
- name: Setup Python
@@ -60,7 +60,7 @@ jobs:
6060
uses: actions/setup-java@v4
6161
with:
6262
distribution: 'temurin'
63-
java-version: '17'
63+
java-version: '11'
6464
- name: Setup CMake
6565
uses: lukka/get-cmake@latest
6666
- name: Setup Python
@@ -95,7 +95,7 @@ jobs:
9595
uses: actions/setup-java@v4
9696
with:
9797
distribution: 'temurin'
98-
java-version: '17'
98+
java-version: '11'
9999
- name: Install coreutils
100100
run: brew install coreutils
101101
- name: Setup CMake
@@ -135,7 +135,7 @@ jobs:
135135
uses: actions/setup-java@v4
136136
with:
137137
distribution: 'temurin'
138-
java-version: '17'
138+
java-version: '11'
139139
- name: Download native lib artifacts
140140
uses: actions/download-artifact@v4
141141
- name: Copy downloaded artifacts to resources
@@ -148,12 +148,12 @@ jobs:
148148
- name: Build JNI bindings
149149
run: ./gradlew build
150150
- name: Publish JNI bindings
151-
run: ./gradlew :physx-jni:publishToSonatype :physx-jni-android:publishToSonatype closeAndReleaseSonatypeStagingRepository
151+
run: ./gradlew :physx-jni:publishToMavenCentral :physx-jni-android:publishToMavenCentral --no-configuration-cache
152152
env:
153-
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
154-
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
155-
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
156-
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
153+
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_USERNAME }}
154+
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_PASSWORD }}
155+
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_PRIVATE_KEY }}
156+
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_PASSWORD }}
157157
- name: Create release
158158
uses: ncipollo/release-action@v1
159159
with:

.github/workflows/snapshot.yml

Lines changed: 0 additions & 153 deletions
This file was deleted.

build.gradle.kts

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import org.gradle.internal.os.OperatingSystem
22
import org.gradle.jvm.tasks.Jar
33

44
plugins {
5-
alias(libs.plugins.nexusPublish)
5+
id("com.android.library") version "8.11.2" apply false
6+
alias(libs.plugins.mavenPublish) apply false
67
}
78

89
subprojects {
@@ -70,19 +71,3 @@ tasks.register("deleteNativeLibs") {
7071
delete("$projectDir/physx-jni-natives-windows-cuda/src/main/resources")
7172
}
7273
}
73-
74-
if (!version.toString().endsWith("-SNAPSHOT")) {
75-
nexusPublishing {
76-
repositories {
77-
repositories {
78-
sonatype {
79-
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
80-
snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/"))
81-
82-
username = System.getenv("MAVEN_USERNAME")
83-
password = System.getenv("MAVEN_PASSWORD")
84-
}
85-
}
86-
}
87-
}
88-
}

buildSrc/build.gradle.kts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ plugins {
22
`kotlin-dsl`
33
}
44

5+
kotlin {
6+
jvmToolchain(11)
7+
}
8+
59
repositories {
610
mavenCentral()
711
}

buildSrc/src/main/kotlin/LocalProperties.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ import java.io.File
33
import java.util.*
44

55
class LocalProperties private constructor(file: File) : Properties() {
6-
val publishUnsigned: Boolean get() = getProperty("physxjni.publishUnsigned", "false").toBoolean()
7-
86
init {
97
if (file.exists()) {
108
file.reader().use { load(it) }

gradle/libs.versions.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ junit-bom = { module = "org.junit:junit-bom", version.ref = "junitBom" }
88
junit-jupiter = { module = "org.junit.jupiter:junit-jupiter" }
99

1010
[plugins]
11-
webidl = { id = "de.fabmax.webidl-util", version = "0.10.2" }
12-
nexusPublish = { id = "io.github.gradle-nexus.publish-plugin", version = "2.0.0" }
11+
webidl = { id = "de.fabmax.webidl-util", version = "0.10.3" }
12+
mavenPublish = { id = "com.vanniktech.maven.publish", version = "0.34.0" }

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

0 commit comments

Comments
 (0)