11plugins {
2- id ' babric -loom' version ' 1.4.+ '
2+ id ' fabric -loom' version ' 1.7.bta '
33 id ' java'
44}
55
6+ import org.gradle.internal.os.OperatingSystem
7+
8+ project. ext. lwjglVersion = " 3.3.4"
9+
10+ switch (OperatingSystem . current()) {
11+ case OperatingSystem . LINUX :
12+ project. ext. lwjglNatives = " natives-linux"
13+ break
14+ case OperatingSystem . WINDOWS :
15+ project. ext. lwjglNatives = " natives-windows"
16+ break
17+ case OperatingSystem . MAC_OS :
18+ project. ext. lwjglNatives = " natives-macos"
19+ }
20+
621group = project. mod_group
722archivesBaseName = project. mod_name
823version = project. mod_version
924
1025loom {
11- gluedMinecraftJar()
1226 noIntermediateMappings()
13- customMinecraftManifest . set(" https://github.com/Turnip-Labs/bta-manifest-repo/releases/download/v${ project.bta_version} /${ project.bta_version} .json" )
27+ customMinecraftMetadata . set(" https://github.com/Turnip-Labs/bta-manifest-repo/releases/download/v${ project.bta_version} /${ project.bta_version} .json" )
1428}
1529
1630repositories {
@@ -24,6 +38,14 @@ repositories {
2438 name = ' Fabric'
2539 url = ' https://maven.fabricmc.net/'
2640 }
41+ maven {
42+ name = ' SignalumMavenInfrastructure'
43+ url = ' https://maven.thesignalumproject.net/infrastructure'
44+ }
45+ maven {
46+ name = ' SignalumMavenReleases'
47+ url = ' https://maven.thesignalumproject.net/releases'
48+ }
2749 ivy {
2850 url = " https://github.com/Better-than-Adventure"
2951 patternLayout {
@@ -33,57 +55,86 @@ repositories {
3355 metadataSources { artifact() }
3456 }
3557 ivy {
36- url = " https://piston-data.mojang.com "
58+ url = " https://downloads.betterthanadventure.net/bta-client/ ${ project.bta_channel } / "
3759 patternLayout {
38- artifact " v1/[organisation]/[revision]/[module].jar"
60+ artifact " /v[revision]/client.jar"
61+ m2compatible = true
62+ }
63+ metadataSources { artifact() }
64+ }
65+ ivy {
66+ url = " https://downloads.betterthanadventure.net/bta-server/${ project.bta_channel} /"
67+ patternLayout {
68+ artifact " /v[revision]/server.jar"
3969 m2compatible = true
4070 }
4171 metadataSources { artifact() }
4272 }
4373 ivy {
44- url = " https://github. com/MartinSVK12 "
74+ url = " https://piston-data.mojang. com"
4575 patternLayout {
46- artifact " [organisation]/releases/download/ [revision]/[module]-[revision ].jar"
76+ artifact " v1/ [organisation]/[revision]/[module].jar"
4777 m2compatible = true
4878 }
4979 metadataSources { artifact() }
5080 }
5181}
5282
5383dependencies {
54- // BTA jar
55- minecraft " bta-download-repo:bta:${ project.bta_version} "
84+ minecraft " ::${ project.bta_version} "
5685 mappings loom. layered() {}
5786
58- // Beta mc jar
5987 modRuntimeOnly " objects:client:43db9b498cb67058d2e12d394e6507722e71bb45" // https://piston-data.mojang.com/v1/objects/43db9b498cb67058d2e12d394e6507722e71bb45/client.jar
60- // Fabric loader
61- modImplementation " fabric-loader:fabric-loader:${ project.loader_version} "
88+ modImplementation " net.fabricmc:fabric-loader:${ project.loader_version} "
89+
90+ // Nightly builds are highly unstable, it is very likely that even these base mods might not work!
91+ // Uncomment at your own risk.
92+
93+ // Helper library
94+ // If you do not need Halplibe you can comment this line out or delete this line
95+ // modImplementation "com.github.Turnip-Labs:bta-halplibe:${project.halplibe_version}"
96+
97+ // modImplementation "ModMenu:ModMenu:2.0.6"
6298
63- // Json processing
6499 implementation ' com.google.guava:guava:33.0.0-jre'
65100 implementation group : ' com.google.code.gson' , name : ' gson' , version : ' 2.10.1'
66101
67102 include(implementation " org.yaml:snakeyaml:2.2" )
68103
69- // Logging
104+
70105 implementation " org.slf4j:slf4j-api:1.8.0-beta4"
71106 implementation " org.apache.logging.log4j:log4j-slf4j18-impl:2.16.0"
72- // var log4jVersion = "2.20.0"
73- var log4jVersion = " 2.17.2"
107+
108+ implementation ' com.google.guava:guava:33.0.0-jre'
109+ implementation group : ' com.google.code.gson' , name : ' gson' , version : ' 2.10.1'
110+ var log4jVersion = " 2.20.0"
74111 implementation(" org.apache.logging.log4j:log4j-core:${ log4jVersion} " )
75112 implementation(" org.apache.logging.log4j:log4j-api:${ log4jVersion} " )
76113 implementation(" org.apache.logging.log4j:log4j-1.2-api:${ log4jVersion} " )
77114
78- // Apache commons, I believe is used for some string processing by some things
79- implementation(" org.apache.commons:commons-lang3:3.12.0" )
115+ include(implementation(" org.apache.commons:commons-lang3:3.12.0" ))
116+
117+ modImplementation(" com.github.zarzelcow:legacy-lwjgl3:1.0.4" )
118+ implementation platform(" org.lwjgl:lwjgl-bom:$lwjglVersion " )
119+
120+ runtimeOnly " org.lwjgl:lwjgl::$lwjglNatives "
121+ runtimeOnly " org.lwjgl:lwjgl-assimp::$lwjglNatives "
122+ runtimeOnly " org.lwjgl:lwjgl-glfw::$lwjglNatives "
123+ runtimeOnly " org.lwjgl:lwjgl-openal::$lwjglNatives "
124+ runtimeOnly " org.lwjgl:lwjgl-opengl::$lwjglNatives "
125+ runtimeOnly " org.lwjgl:lwjgl-stb::$lwjglNatives "
126+ implementation " org.lwjgl:lwjgl:$lwjglVersion "
127+ implementation " org.lwjgl:lwjgl-assimp:$lwjglVersion "
128+ implementation " org.lwjgl:lwjgl-glfw:$lwjglVersion "
129+ implementation " org.lwjgl:lwjgl-openal:$lwjglVersion "
130+ implementation " org.lwjgl:lwjgl-opengl:$lwjglVersion "
131+ implementation " org.lwjgl:lwjgl-stb:$lwjglVersion "
80132}
81133
82134java {
83135 sourceCompatibility = JavaVersion . VERSION_1_8
84136 targetCompatibility = JavaVersion . VERSION_1_8
85137 withSourcesJar()
86- withJavadocJar()
87138}
88139
89140tasks. withType(JavaCompile ). configureEach {
@@ -96,10 +147,16 @@ jar {
96147 rename { " ${ it} _${ archivesBaseName} " }
97148 }
98149}
150+
99151sourcesJar {
100152 exclude(' org/useless/test/**' )
101153}
102154
155+ configurations. configureEach {
156+ // Removes LWJGL2 dependencies
157+ exclude group : " org.lwjgl.lwjgl"
158+ }
159+
103160processResources {
104161 inputs. property " version" , version
105162
0 commit comments