aboutsummaryrefslogtreecommitdiff
path: root/lwjgl
diff options
context:
space:
mode:
authorWyvest <45589059+Wyvest@users.noreply.github.com>2022-06-20 22:42:33 +0700
committerWyvest <45589059+Wyvest@users.noreply.github.com>2022-06-20 22:42:33 +0700
commite95dfd774b359fb296ccd4e725b8114e3b21dea4 (patch)
treec9b304260fdb7d19b3bee3d4b83b5c1dce976a78 /lwjgl
parentbda6a119108d238e3c7d85e82f37f5d6da3b9b5e (diff)
downloadOneConfig-e95dfd774b359fb296ccd4e725b8114e3b21dea4.tar.gz
OneConfig-e95dfd774b359fb296ccd4e725b8114e3b21dea4.tar.bz2
OneConfig-e95dfd774b359fb296ccd4e725b8114e3b21dea4.zip
separate lwjgl stuff from actual project
Diffstat (limited to 'lwjgl')
-rw-r--r--lwjgl/build.gradle.kts103
1 files changed, 103 insertions, 0 deletions
diff --git a/lwjgl/build.gradle.kts b/lwjgl/build.gradle.kts
new file mode 100644
index 0000000..9f347bd
--- /dev/null
+++ b/lwjgl/build.gradle.kts
@@ -0,0 +1,103 @@
+plugins {
+ kotlin("jvm")
+ id("gg.essential.defaults.repo")
+ id("gg.essential.defaults.java")
+ id("com.github.johnrengelman.shadow")
+ id("maven-publish")
+ id("signing")
+ java
+}
+
+val mod_name: String by project
+val mod_version: String by project
+val mod_id: String by project
+
+version = mod_version
+
+repositories {
+ maven("https://repo.polyfrost.cc/releases")
+}
+val shadeCompileOnly: Configuration by configurations.creating
+val shadeRuntimeOnly: Configuration by configurations.creating
+
+sourceSets {
+ main {
+ runtimeClasspath += shadeRuntimeOnly
+ }
+}
+
+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")
+
+ 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")
+}
+
+tasks {
+ named<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar>("shadowJar") {
+ archiveClassifier.set("")
+ configurations = listOf(shadeCompileOnly, shadeRuntimeOnly)
+ 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")
+ }
+ duplicatesStrategy = DuplicatesStrategy.EXCLUDE
+ dependsOn(jar)
+ }
+ jar {
+ enabled = false
+ }
+}
+
+publishing {
+ publications {
+ register<MavenPublication>("lwjgl") {
+ groupId = "cc.polyfrost"
+ artifactId = "lwjgl"
+ artifact(tasks["shadowJar"])
+ }
+ }
+
+ repositories {
+ maven {
+ name = "releases"
+ url = uri("https://repo.polyfrost.cc/releases")
+ credentials(PasswordCredentials::class)
+ authentication {
+ create<BasicAuthentication>("basic")
+ }
+ }
+ maven {
+ name = "snapshots"
+ url = uri("https://repo.polyfrost.cc/snapshots")
+ credentials(PasswordCredentials::class)
+ authentication {
+ create<BasicAuthentication>("basic")
+ }
+ }
+ maven {
+ name = "private"
+ url = uri("https://repo.polyfrost.cc/private")
+ credentials(PasswordCredentials::class)
+ authentication {
+ create<BasicAuthentication>("basic")
+ }
+ }
+ }
+} \ No newline at end of file