|
1 | 1 | plugins { |
2 | 2 | id("java") |
3 | | - id("maven-publish") |
4 | | - id("signing") |
| 3 | + id("com.github.xpenatan.easy-publishing") version "-SNAPSHOT" |
5 | 4 | } |
6 | 5 |
|
| 6 | +LibExt.isRelease = rootProject.extra["easyPublishing.releaseRequested"] as Boolean |
| 7 | + |
7 | 8 | buildscript { |
8 | 9 | repositories { |
9 | 10 | mavenCentral() |
@@ -40,4 +41,47 @@ allprojects { |
40 | 41 | } |
41 | 42 | } |
42 | 43 |
|
43 | | -apply(plugin = "publish") |
| 44 | +easyPublishing { |
| 45 | + modules( |
| 46 | + ":webgpu:core", |
| 47 | + ":webgpu:shared:jni", |
| 48 | + ":webgpu:shared:c", |
| 49 | + ":webgpu:desktop:c", |
| 50 | + ":webgpu:desktop:jni", |
| 51 | + ":webgpu:desktop:ffm", |
| 52 | + ":webgpu:web:wasm", |
| 53 | + ":webgpu:android:jni", |
| 54 | + ) |
| 55 | + |
| 56 | + groupId.set(LibExt.groupId) |
| 57 | + releaseVersion.set(LibExt.releaseVersion) |
| 58 | + snapshotVersion.set(LibExt.snapshotVersion) |
| 59 | + |
| 60 | + snapshotRepositoryUrl.set("https://central.sonatype.com/repository/maven-snapshots/") |
| 61 | + releaseRepositoryUrl.set("https://central.sonatype.com") |
| 62 | + username.set(providers.environmentVariable("CENTRAL_PORTAL_USERNAME")) |
| 63 | + password.set(providers.environmentVariable("CENTRAL_PORTAL_PASSWORD")) |
| 64 | + signingKey.set(providers.environmentVariable("SIGNING_KEY")) |
| 65 | + signingPassword.set(providers.environmentVariable("SIGNING_PASSWORD")) |
| 66 | + |
| 67 | + pomName.set(LibExt.libName) |
| 68 | + pomDescription.set("WebGPU Java Bindings for wgpu-native and Dawn") |
| 69 | + projectUrl.set("https://github.com/xpenatan/jWebGPU") |
| 70 | + |
| 71 | + developerId.set("Xpe") |
| 72 | + developerName.set("Natan") |
| 73 | + |
| 74 | + scmUrl.set("https://github.com/xpenatan/jWebGPU") |
| 75 | + scmConnection.set("scm:git:https://github.com/xpenatan/jWebGPU.git") |
| 76 | + scmDeveloperConnection.set("scm:git:ssh://git@github.com/xpenatan/jWebGPU.git") |
| 77 | +} |
| 78 | + |
| 79 | +afterEvaluate { |
| 80 | + // These projects share leaf names. Keep their Gradle component identities distinct while |
| 81 | + // their Maven publications continue to use the public jWebGPU group configured above. |
| 82 | + project(":webgpu:shared:jni").group = "${LibExt.groupId}.shared" |
| 83 | + project(":webgpu:desktop:jni").group = "${LibExt.groupId}.desktop" |
| 84 | + project(":webgpu:android:jni").group = "${LibExt.groupId}.android" |
| 85 | + project(":webgpu:shared:c").group = "${LibExt.groupId}.shared" |
| 86 | + project(":webgpu:desktop:c").group = "${LibExt.groupId}.desktop" |
| 87 | +} |
0 commit comments