11plugins {
2- id ' babric-loom' version ' 1.4.+'
2+ id ' maven-publish'
3+ id ' fabric-loom' version ' 1.10.0-bta'
34 id ' java'
45}
56
7+ import org.gradle.internal.os.OperatingSystem
8+
9+ project. ext. lwjglVersion = " 3.3.3"
10+
11+ switch (OperatingSystem . current()) {
12+ case OperatingSystem . LINUX :
13+ project. ext. lwjglNatives = " natives-linux"
14+ break
15+ case OperatingSystem . WINDOWS :
16+ project. ext. lwjglNatives = " natives-windows"
17+ break
18+ case OperatingSystem . MAC_OS :
19+ project. ext. lwjglNatives = " natives-macos"
20+ }
21+
622group = project. mod_group
723archivesBaseName = project. mod_name
824version = project. mod_version
925
1026loom {
11- gluedMinecraftJar()
1227 noIntermediateMappings()
13- customMinecraftManifest . set(" https://github.com/Turnip-Labs/ bta-manifest-repo/releases/download/v ${ project.bta_version } / ${ project.bta_version} .json" )
28+ customMinecraftMetadata . set(" https://downloads.betterthanadventure.net/ bta-client/ ${ project.bta_channel } /v ${ project.bta_version} /manifest .json" )
1429}
1530
1631repositories {
@@ -24,6 +39,14 @@ repositories {
2439 name = ' Fabric'
2540 url = ' https://maven.fabricmc.net/'
2641 }
42+ maven {
43+ name = ' SignalumMavenInfrastructure'
44+ url = ' https://maven.thesignalumproject.net/infrastructure'
45+ }
46+ maven {
47+ name = ' SignalumMavenReleases'
48+ url = ' https://maven.thesignalumproject.net/releases'
49+ }
2750 ivy {
2851 url = " https://github.com/Better-than-Adventure"
2952 patternLayout {
@@ -33,25 +56,17 @@ repositories {
3356 metadataSources { artifact() }
3457 }
3558 ivy {
36- url = " https://github.com/Turnip-Labs "
59+ url = " https://downloads.betterthanadventure.net/bta-client/ ${ project.bta_channel } / "
3760 patternLayout {
38- artifact " [organisation]/releases/download/ v[revision]/[module]-[revision] .jar"
61+ artifact " / v[revision]/client .jar"
3962 m2compatible = true
4063 }
4164 metadataSources { artifact() }
4265 }
4366 ivy {
44- url = " https://github.com/Turnip-Labs "
67+ url = " https://downloads.betterthanadventure.net/bta-server/ ${ project.bta_channel } / "
4568 patternLayout {
46- artifact " [organisation]/releases/download/[revision]/[module]-[revision].jar"
47- m2compatible = true
48- }
49- metadataSources { artifact() }
50- }
51- ivy {
52- url = " https://github.com/Turnip-Labs"
53- patternLayout {
54- artifact " [organisation]/releases/download/[revision]/[module]-bta-[revision].jar"
69+ artifact " /v[revision]/server.jar"
5570 m2compatible = true
5671 }
5772 metadataSources { artifact() }
@@ -64,31 +79,22 @@ repositories {
6479 }
6580 metadataSources { artifact() }
6681 }
67- ivy {
68- url = " https://github.com/MartinSVK12"
69- patternLayout {
70- artifact " [organisation]/releases/download/[revision]/[module]-[revision].jar"
71- m2compatible = true
72- }
73- metadataSources { artifact() }
74- }
82+
7583}
7684
7785dependencies {
78- minecraft " bta-download-repo:bta :${ project.bta_version} "
86+ minecraft " : :${ project.bta_version} "
7987 mappings loom. layered() {}
8088
8189 modRuntimeOnly " objects:client:43db9b498cb67058d2e12d394e6507722e71bb45" // https://piston-data.mojang.com/v1/objects/43db9b498cb67058d2e12d394e6507722e71bb45/client.jar
82- modImplementation " fabric-loader :fabric-loader:${ project.loader_version} "
90+ modImplementation " net.fabricmc :fabric-loader:${ project.loader_version} "
8391
8492 // Helper library
8593 // If you do not need Halplibe you can comment this line out or delete this line
86- modImplementation " com.github.Turnip-Labs:bta-halplibe:${ project.halplibe_version} "
87-
88- modImplementation files(" lib/btabackpacks-1.1.6-7.2pr2.jar" )
89- // modImplementation files("lib/treasure_expansion-1.2.1.jar")
94+ modImplementation(" turniplabs:halplibe:${ project.halplibe_version} " )
95+ modImplementation(" turniplabs:modmenu-bta:${ project.mod_menu_version} " )
9096
91- modImplementation " ModMenu:ModMenu:2.0.6 "
97+ implementation " useless:btabackpacks:1.1.10-7.3_03 "
9298
9399 implementation " org.slf4j:slf4j-api:1.8.0-beta4"
94100 implementation " org.apache.logging.log4j:log4j-slf4j18-impl:2.16.0"
@@ -101,6 +107,22 @@ dependencies {
101107 implementation(" org.apache.logging.log4j:log4j-1.2-api:${ log4jVersion} " )
102108
103109 include(implementation(" org.apache.commons:commons-lang3:3.12.0" ))
110+
111+ modImplementation(" com.github.Better-than-Adventure:legacy-lwjgl3:1.0.5" )
112+ implementation platform(" org.lwjgl:lwjgl-bom:$lwjglVersion " )
113+
114+ runtimeOnly " org.lwjgl:lwjgl::$lwjglNatives "
115+ runtimeOnly " org.lwjgl:lwjgl-assimp::$lwjglNatives "
116+ runtimeOnly " org.lwjgl:lwjgl-glfw::$lwjglNatives "
117+ runtimeOnly " org.lwjgl:lwjgl-openal::$lwjglNatives "
118+ runtimeOnly " org.lwjgl:lwjgl-opengl::$lwjglNatives "
119+ runtimeOnly " org.lwjgl:lwjgl-stb::$lwjglNatives "
120+ implementation " org.lwjgl:lwjgl:$lwjglVersion "
121+ implementation " org.lwjgl:lwjgl-assimp:$lwjglVersion "
122+ implementation " org.lwjgl:lwjgl-glfw:$lwjglVersion "
123+ implementation " org.lwjgl:lwjgl-openal:$lwjglVersion "
124+ implementation " org.lwjgl:lwjgl-opengl:$lwjglVersion "
125+ implementation " org.lwjgl:lwjgl-stb:$lwjglVersion "
104126}
105127
106128java {
@@ -109,7 +131,7 @@ java {
109131 withSourcesJar()
110132}
111133
112- tasks. withType(JavaCompile ) {
134+ tasks. withType(JavaCompile ). configureEach {
113135 options. release. set 8
114136}
115137
@@ -119,10 +141,37 @@ jar {
119141 }
120142}
121143
144+ configurations. configureEach {
145+ // Removes LWJGL2 dependencies
146+ exclude group : " org.lwjgl.lwjgl"
147+ }
148+
122149processResources {
123150 inputs. property " version" , version
124151
125152 filesMatching(" fabric.mod.json" ) {
126153 expand " version" : version
127154 }
128155}
156+
157+ publishing {
158+ repositories {
159+ maven {
160+ name = " signalumMaven"
161+ url = " https://maven.thesignalumproject.net/releases"
162+ credentials(PasswordCredentials )
163+ authentication {
164+ basic(BasicAuthentication )
165+ }
166+ }
167+ }
168+
169+ publications {
170+ maven(MavenPublication ) {
171+ groupId = project. mod_group
172+ artifactId = project. mod_name
173+ version = project. mod_version
174+ from components. java
175+ }
176+ }
177+ }
0 commit comments