@@ -5,12 +5,13 @@ plugins {
55 id ' java'
66 id ' idea'
77 id ' maven-publish'
8- id ' net.neoforged.moddev' version " 2.0.112 "
8+ id ' net.neoforged.moddev' version " 2.0.137 "
99 id " me.shedaniel.unified-publishing" version " 0.1.+"
1010}
1111
12- ext. ENV = System . getenv()
13- def isLocal = ! ENV . containsKey(" GITHUB_RUN_NUMBER" )
12+ var ENV = System . getenv()
13+ var CI = ENV . CI == " true"
14+ var isLocal = ! ENV . containsKey(" GITHUB_RUN_NUMBER" )
1415
1516version = " ${ mod_version} -${ isLocal ? "local.${Instant.now().epochSecond}" : "build.${ENV.GITHUB_RUN_NUMBER}"} "
1617group = project. maven_group
@@ -19,47 +20,50 @@ base.archivesName = project.archives_base_name
1920println (" Building version: ${ version} " )
2021
2122neoForge {
22- version = project. neoforge_version
23- validateAccessTransformers = true
23+ enable {
24+ version = project. neoforge_version
25+ validateAccessTransformers = ! CI
26+ disableRecompilation = CI
2427
25- accessTransformers {
26- publish(project. file(' src/main/resources/META-INF/accesstransformer.cfg' ))
27- }
28-
29- interfaceInjectionData {
30- from(file(' interfaces.json' ))
31- publish(file(' interfaces.json' ))
32- }
33-
34- runs {
35- configureEach {
36- logLevel = org.slf4j.event.Level . INFO
28+ accessTransformers {
29+ publish(project. file(' src/main/resources/META-INF/accesstransformer.cfg' ))
3730 }
3831
39- client {
40- ideName = ' Client '
41- client( )
42- systemProperty ' neoforge.enabledGameTestNamespaces ' , project . mod_id
32+ interfaceInjectionData {
33+ from(file( ' interfaces.json ' ))
34+ publish(file( ' interfaces.json ' ) )
35+ }
4336
44- if (ENV . MC_CLIENT_ARGS ) {
45- programArguments. addAll(ENV . MC_CLIENT_ARGS . split(' ' ))
37+ runs {
38+ configureEach {
39+ logLevel = org.slf4j.event.Level . INFO
4640 }
4741
48- jvmArguments. addAll(" -XX:+IgnoreUnrecognizedVMOptions" , " -XX:+AllowEnhancedClassRedefinition" )
49- gameDirectory = file ' runs/client'
50- }
42+ client {
43+ ideName = ' Client'
44+ client()
45+ systemProperty ' neoforge.enabledGameTestNamespaces' , project. mod_id
46+
47+ if (ENV . MC_CLIENT_ARGS ) {
48+ programArguments. addAll(ENV . MC_CLIENT_ARGS . split(' ' ))
49+ }
5150
52- server {
53- ideName = ' Server'
54- server()
55- programArgument(" --nogui" )
56- gameDirectory = file ' runs/server'
51+ jvmArguments. addAll(" -XX:+IgnoreUnrecognizedVMOptions" , " -XX:+AllowEnhancedClassRedefinition" )
52+ gameDirectory = file ' runs/client'
53+ }
54+
55+ server {
56+ ideName = ' Server'
57+ server()
58+ programArgument(" --nogui" )
59+ gameDirectory = file ' runs/server'
60+ }
5761 }
58- }
5962
60- mods {
61- kubejs {
62- sourceSet sourceSets. main
63+ mods {
64+ kubejs {
65+ sourceSet sourceSets. main
66+ }
6367 }
6468 }
6569}
@@ -105,29 +109,15 @@ repositories {
105109 }
106110
107111 maven {
108- url " https://maven.architectury.dev/"
109- }
110-
111- maven {
112- url " https://maven.blamejared.com"
112+ url " https://maven.latvian.dev/mirror"
113113 content {
114+ includeGroup " dev.architectury"
115+ includeGroup " me.shedaniel"
116+ includeGroup " me.shedaniel.cloth"
114117 includeGroup " mezz.jei"
115118 includeGroup " net.darkhax.bookshelf"
116119 includeGroup " net.darkhax.gamestages"
117- }
118- }
119-
120- maven {
121- name = " TerraformersMC"
122- url = " https://maven.terraformersmc.com/"
123- content {
124120 includeGroup " dev.emi"
125- }
126- }
127-
128- maven {
129- url ' https://jitpack.io'
130- content {
131121 includeGroup " com.github.rtyley"
132122 }
133123 }
@@ -154,6 +144,13 @@ dependencies {
154144 prefer " animated-gif-lib-$gif_lib_version "
155145 }
156146 }
147+
148+ jarJar(implementation(' dev.latvian.mods:better-advanced-tooltips' )) {
149+ version {
150+ strictly " [$bat_version ,)"
151+ prefer " $bat_version "
152+ }
153+ }
157154}
158155
159156processResources {
@@ -164,6 +161,7 @@ processResources {
164161 " jei_version" : project. jei_version,
165162 " rei_version" : project. rei_version,
166163 " emi_version" : project. emi_version,
164+ " bat_version" : project. bat_version,
167165 ]
168166
169167 println (" [Process Resources] Replacing properties in resources: " + toReplace)
@@ -243,33 +241,35 @@ unifiedPublishing {
243241
244242idea {
245243 module {
246- downloadSources = true
247- downloadJavadoc = true
248-
249- [" client" , " server" ]. each {
250- [
251- " .architectury-transformer" ,
252- " config" ,
253- " crash-reports" ,
254- " debug" ,
255- " downloads" ,
256- " dumps" ,
257- " flashback" ,
258- " local" ,
259- " logs" ,
260- " mods" ,
261- " pack-sync" ,
262- " profilekeys" ,
263- " saves" ,
264- " command_history.txt" ,
265- " options.txt" ,
266- " server.properties" ,
267- " world" ,
268- " emi.json" ,
269- " usercache.json" ,
270- " usernamecache.json"
271- ]. each { ext ->
272- excludeDirs. add(file(" runs/$it /$ext " ))
244+ if (! CI ) {
245+ downloadSources = true
246+ downloadJavadoc = true
247+
248+ [" client" , " server" ]. each {
249+ [
250+ " .architectury-transformer" ,
251+ " config" ,
252+ " crash-reports" ,
253+ " debug" ,
254+ " downloads" ,
255+ " dumps" ,
256+ " flashback" ,
257+ " local" ,
258+ " logs" ,
259+ " mods" ,
260+ " profilekeys" ,
261+ " saves" ,
262+ " voicechat_recordings" ,
263+ " command_history.txt" ,
264+ " options.txt" ,
265+ " server.properties" ,
266+ " world" ,
267+ " emi.json" ,
268+ " usercache.json" ,
269+ " usernamecache.json"
270+ ]. each { ext ->
271+ excludeDirs. add(file(" runs/$it /$ext " ))
272+ }
273273 }
274274 }
275275 }
0 commit comments