aboutsummaryrefslogtreecommitdiff
path: root/lwjgl/build.gradle.kts
diff options
context:
space:
mode:
authorWyvest <45589059+Wyvest@users.noreply.github.com>2022-07-06 21:09:37 +0900
committerWyvest <45589059+Wyvest@users.noreply.github.com>2022-07-06 21:09:37 +0900
commitbf0d2189dd881faa8f401d60c891bd8c1b7086b5 (patch)
tree333f33191dfbc6851ed1ba936b4b9675a68c042b /lwjgl/build.gradle.kts
parent52b87cb59eebff7826d8891a6fb52911be386f46 (diff)
downloadOneConfig-bf0d2189dd881faa8f401d60c891bd8c1b7086b5.tar.gz
OneConfig-bf0d2189dd881faa8f401d60c891bd8c1b7086b5.tar.bz2
OneConfig-bf0d2189dd881faa8f401d60c891bd8c1b7086b5.zip
real
Diffstat (limited to 'lwjgl/build.gradle.kts')
-rw-r--r--lwjgl/build.gradle.kts69
1 files changed, 47 insertions, 22 deletions
diff --git a/lwjgl/build.gradle.kts b/lwjgl/build.gradle.kts
index df8d72c..fcc5511 100644
--- a/lwjgl/build.gradle.kts
+++ b/lwjgl/build.gradle.kts
@@ -1,7 +1,11 @@
+@file:Suppress("GradlePackageUpdate")
+
plugins {
kotlin("jvm")
+ id("gg.essential.multi-version")
id("gg.essential.defaults.repo")
id("gg.essential.defaults.java")
+ id("gg.essential.defaults.loom")
id("com.github.johnrengelman.shadow")
id("maven-publish")
id("signing")
@@ -12,7 +16,7 @@ val mod_name: String by project
val mod_version: String by project
val mod_id: String by project
-version = "1.0.0-alpha1"
+version = "1.0.0-alpha5"
repositories {
maven("https://repo.polyfrost.cc/releases")
@@ -27,23 +31,39 @@ sourceSets {
}
dependencies {
- shadeCompileOnly("org.lwjgl:lwjgl:3.3.1")
- shadeCompileOnly("org.lwjgl:lwjgl-stb:3.3.1")
- shadeCompileOnly("org.lwjgl:lwjgl-tinyfd:3.3.1")
- shadeCompileOnly("org.lwjgl:lwjgl-nanovg:3.3.1")
+ val lwjgl = if (platform.mcVersion >= 11600) {
+ "3.2.1"
+ } else {
+ "3.3.1"
+ }
+ if (platform.isLegacyForge) {
+ shadeCompileOnly("org.lwjgl:lwjgl:$lwjgl")
+ shadeCompileOnly("org.lwjgl:lwjgl-stb:$lwjgl")
+ shadeCompileOnly("org.lwjgl:lwjgl-tinyfd:$lwjgl")
+
+ shadeRuntimeOnly("org.lwjgl:lwjgl:$lwjgl:natives-windows")
+ shadeRuntimeOnly("org.lwjgl:lwjgl-stb:$lwjgl:natives-windows")
+ shadeRuntimeOnly("org.lwjgl:lwjgl-tinyfd:$lwjgl:natives-windows")
+ shadeRuntimeOnly("org.lwjgl:lwjgl:$lwjgl:natives-linux")
+ shadeRuntimeOnly("org.lwjgl:lwjgl-stb:$lwjgl:natives-linux")
+ shadeRuntimeOnly("org.lwjgl:lwjgl-tinyfd:$lwjgl:natives-linux")
+ shadeRuntimeOnly("org.lwjgl:lwjgl:$lwjgl:natives-macos")
+ shadeRuntimeOnly("org.lwjgl:lwjgl-stb:$lwjgl:natives-macos")
+ shadeRuntimeOnly("org.lwjgl:lwjgl-tinyfd:$lwjgl:natives-macos")
+ }
- shadeRuntimeOnly("org.lwjgl:lwjgl:3.3.1:natives-windows")
- shadeRuntimeOnly("org.lwjgl:lwjgl-stb:3.3.1:natives-windows")
- shadeRuntimeOnly("org.lwjgl:lwjgl-tinyfd:3.3.1:natives-windows")
- shadeRuntimeOnly("org.lwjgl:lwjgl-nanovg:3.3.1:natives-windows")
- shadeRuntimeOnly("org.lwjgl:lwjgl:3.3.1:natives-linux")
- shadeRuntimeOnly("org.lwjgl:lwjgl-stb:3.3.1:natives-linux")
- shadeRuntimeOnly("org.lwjgl:lwjgl-tinyfd:3.3.1:natives-linux")
- shadeRuntimeOnly("org.lwjgl:lwjgl-nanovg:3.3.1:natives-linux")
- shadeRuntimeOnly("org.lwjgl:lwjgl:3.3.1:natives-macos")
- shadeRuntimeOnly("org.lwjgl:lwjgl-stb:3.3.1:natives-macos")
- shadeRuntimeOnly("org.lwjgl:lwjgl-tinyfd:3.3.1:natives-macos")
- shadeRuntimeOnly("org.lwjgl:lwjgl-nanovg:3.3.1:natives-macos")
+ shadeCompileOnly("org.lwjgl:lwjgl-nanovg:$lwjgl") {
+ isTransitive = platform.isLegacyForge
+ }
+ shadeRuntimeOnly("org.lwjgl:lwjgl-nanovg:$lwjgl:natives-windows") {
+ isTransitive = platform.isLegacyForge
+ }
+ shadeRuntimeOnly("org.lwjgl:lwjgl-nanovg:$lwjgl:natives-linux") {
+ isTransitive = platform.isLegacyForge
+ }
+ shadeRuntimeOnly("org.lwjgl:lwjgl-nanovg:$lwjgl:natives-macos") {
+ isTransitive = platform.isLegacyForge
+ }
}
tasks {
@@ -53,9 +73,11 @@ tasks {
exclude("META-INF/versions/**")
exclude("**/module-info.class")
exclude("**/package-info.class")
- relocate("org.lwjgl", "org.lwjgl3") {
- include("org.lwjgl.PointerBuffer")
- include("org.lwjgl.BufferUtils")
+ if (platform.isLegacyForge) {
+ relocate("org.lwjgl", "org.lwjgl3") {
+ include("org.lwjgl.PointerBuffer")
+ include("org.lwjgl.BufferUtils")
+ }
}
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
dependsOn(jar)
@@ -63,13 +85,16 @@ tasks {
jar {
enabled = false
}
+ remapJar {
+ enabled = false
+ }
}
publishing {
publications {
- register<MavenPublication>("lwjgl") {
+ register<MavenPublication>("lwjgl-$platform") {
groupId = "cc.polyfrost"
- artifactId = "lwjgl"
+ artifactId = "lwjgl-$platform"
artifact(tasks["shadowJar"])
}
}