Skip to content

Commit ae00902

Browse files
committed
use Java 17 @ Android
1 parent 73a32c0 commit ae00902

5 files changed

Lines changed: 31 additions & 16 deletions

File tree

.github/workflows/snapshot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ jobs:
145145
- name: Build JNI bindings
146146
run: ./gradlew build
147147
- name: Publish JNI bindings
148-
run: ./gradlew :physx-jni:publishToSonatype :physx-jni-android:publishToSonatype
148+
run: ./gradlew :physx-jni:publish :physx-jni-android:publish
149149
env:
150150
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
151151
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}

build.gradle.kts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,17 @@ tasks.register("deleteNativeLibs") {
7171
}
7272
}
7373

74-
nexusPublishing {
75-
repositories {
74+
if (!version.toString().endsWith("-SNAPSHOT")) {
75+
nexusPublishing {
7676
repositories {
77-
sonatype {
78-
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
79-
snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/"))
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/"))
8081

81-
username = System.getenv("MAVEN_USERNAME")
82-
password = System.getenv("MAVEN_PASSWORD")
82+
username = System.getenv("MAVEN_USERNAME")
83+
password = System.getenv("MAVEN_PASSWORD")
84+
}
8385
}
8486
}
8587
}

buildSrc/build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@ plugins {
33
}
44

55
repositories {
6-
maven { url = uri("https://oss.sonatype.org/content/repositories/snapshots") }
76
mavenCentral()
87
}

physx-jni-android/build.gradle.kts

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ plugins {
77

88
android {
99
namespace = "de.fabmax.physxjni"
10-
compileSdk = 33
10+
compileSdk = 34
1111

1212
defaultConfig {
1313
minSdk = 24
@@ -24,6 +24,12 @@ android {
2424
}
2525
}
2626

27+
java {
28+
toolchain {
29+
languageVersion = JavaLanguageVersion.of(17)
30+
}
31+
}
32+
2733
tasks.register<Exec>("generateNativeProjectAndroid") {
2834
group = "native build"
2935
workingDir = File("$rootDir/PhysX/physx")
@@ -119,10 +125,14 @@ publishing {
119125

120126
repositories {
121127
maven {
122-
url = if (version.toString().endsWith("-SNAPSHOT")) {
123-
uri("https://central.sonatype.com/repository/maven-snapshots/")
128+
if (version.toString().endsWith("-SNAPSHOT")) {
129+
url = uri("https://central.sonatype.com/repository/maven-snapshots/")
130+
credentials {
131+
username = System.getenv("MAVEN_USERNAME")
132+
password = System.getenv("MAVEN_PASSWORD")
133+
}
124134
} else {
125-
uri("https://ossrh-staging-api.central.sonatype.com/service/local/")
135+
url = uri("https://ossrh-staging-api.central.sonatype.com/service/local/")
126136
}
127137
}
128138
}

physx-jni/build.gradle.kts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,14 @@ publishing {
144144

145145
repositories {
146146
maven {
147-
url = if (version.toString().endsWith("-SNAPSHOT")) {
148-
uri("https://central.sonatype.com/repository/maven-snapshots/")
147+
if (version.toString().endsWith("-SNAPSHOT")) {
148+
url = uri("https://central.sonatype.com/repository/maven-snapshots/")
149+
credentials {
150+
username = System.getenv("MAVEN_USERNAME")
151+
password = System.getenv("MAVEN_PASSWORD")
152+
}
149153
} else {
150-
uri("https://ossrh-staging-api.central.sonatype.com/service/local/")
154+
url = uri("https://ossrh-staging-api.central.sonatype.com/service/local/")
151155
}
152156
}
153157
}

0 commit comments

Comments
 (0)