@@ -58,6 +58,7 @@ def modrinthKey = secretEnv["MODRINTH_KEY"] ?: System.getenv("MODRINTH_KEY")
5858def repositoryName = secretEnv[" PUBLIC_REP_NAME" ] ?: System . getenv(" PUBLIC_REP_NAME" )
5959def repositoryKey = secretEnv[" PUBLIC_REP_KEY" ] ?: System . getenv(" PUBLIC_REP_KEY" )
6060def githubKey = secretEnv[" GITHUB_KEY" ] ?: System . getenv(" GITHUB_KEY" )
61+ def minimumRuntime = project. hasProperty(' clean_test' ) && project. property(' clean_test' ). toBoolean()
6162
6263// Include resources generated by data generators.
6364sourceSets. main. resources { srcDir ' src/generated/resources' }
@@ -248,44 +249,63 @@ dependencies {
248249
249250 // Minimal requirements end
250251
251- compileOnly(" com.refinedmods.refinedstorage:refinedstorage-neoforge:${ refinedstorage_version} " )
252- runtimeOnly(" com.refinedmods.refinedstorage:refinedstorage-neoforge:${ refinedstorage_version} " ) {
253- transitive = false
252+ compileOnly " com.refinedmods.refinedstorage:refinedstorage-neoforge:${ refinedstorage_version} "
253+ if (! minimumRuntime) {
254+ runtimeOnly(" com.refinedmods.refinedstorage:refinedstorage-neoforge:${ refinedstorage_version} " ) {
255+ transitive = false
256+ }
254257 }
255258
256259 // Transitive prevents that this dependency would load other dependencies which are used by refined storage and are faulty marked
257- compileOnly(" com.refinedmods.refinedstorage:refinedstorage-mekanism-integration:${ refinedstorage_mekanism_version} " )
258- runtimeOnly(" com.refinedmods.refinedstorage:refinedstorage-mekanism-integration:${ refinedstorage_mekanism_version} " ) {
259- transitive = false
260+ compileOnly " com.refinedmods.refinedstorage:refinedstorage-mekanism-integration:${ refinedstorage_mekanism_version} "
261+ if (! minimumRuntime) {
262+ runtimeOnly(" com.refinedmods.refinedstorage:refinedstorage-mekanism-integration:${ refinedstorage_mekanism_version} " ) {
263+ transitive = false
264+ }
260265 }
261266
262267 // Extended requirements
263268 // We don't use the api since we need a specific class from mekanism
264269 compileOnly " mekanism:Mekanism:${ mekanism_version} "
265- runtimeOnly " mekanism:Mekanism:${ mekanism_version} "
270+ if (! minimumRuntime) {
271+ runtimeOnly " mekanism:Mekanism:${ mekanism_version} "
272+ }
266273
267274 // Applied Energistics 2
268275 compileOnly " org.appliedenergistics:appliedenergistics2:${ appliedenergistics_version} "
269- runtimeOnly " org.appliedenergistics:appliedenergistics2:${ appliedenergistics_version} "
276+ if (! minimumRuntime) {
277+ runtimeOnly " org.appliedenergistics:appliedenergistics2:${ appliedenergistics_version} "
278+ }
270279
271280 // Applied Mekanistics
272281 compileOnly " curse.maven:applied-mekanistics-574300:${ appliedmekanistics_version} "
273- runtimeOnly " curse.maven:applied-mekanistics-574300:${ appliedmekanistics_version} "
282+ if (! minimumRuntime) {
283+ runtimeOnly " curse.maven:applied-mekanistics-574300:${ appliedmekanistics_version} "
284+ }
274285
275286 // AE2 Things
276287 compileOnly " curse.maven:ae2things-609977:${ ae2things_version} -sources"
277- runtimeOnly " curse.maven:ae2things-609977:${ ae2things_version} -sources"
288+ if (! minimumRuntime) {
289+ runtimeOnly " curse.maven:ae2things-609977:${ ae2things_version} -sources"
290+ }
278291
279292 // Create
280- implementation (" com.simibubi.create:create-${ minecraft_version} :${ create_version} :slim" ) { transitive = false }
281- implementation " net.createmod.ponder:Ponder-NeoForge-${ minecraft_version} :${ ponder_version} "
293+ compileOnly (" com.simibubi.create:create-${ minecraft_version} :${ create_version} :slim" ) { transitive = false }
294+ compileOnly " net.createmod.ponder:Ponder-NeoForge-${ minecraft_version} :${ ponder_version} "
282295 compileOnly " dev.engine-room.flywheel:flywheel-neoforge-api-${ minecraft_version} :${ flywheel_version} "
283- runtimeOnly " dev.engine-room.flywheel:flywheel-neoforge-${ minecraft_version} :${ flywheel_version} "
284- implementation " com.tterrag.registrate:Registrate:${ registrate_version} "
296+ compileOnly " com.tterrag.registrate:Registrate:${ registrate_version} "
297+ if (! minimumRuntime) {
298+ runtimeOnly(" com.simibubi.create:create-${ minecraft_version} :${ create_version} :slim" ) { transitive = false }
299+ runtimeOnly " net.createmod.ponder:Ponder-NeoForge-${ minecraft_version} :${ ponder_version} "
300+ runtimeOnly " dev.engine-room.flywheel:flywheel-neoforge-${ minecraft_version} :${ flywheel_version} "
301+ runtimeOnly " com.tterrag.registrate:Registrate:${ registrate_version} "
302+ }
285303
286304 // Curios
287- runtimeOnly " top.theillusivec4.curios:curios-neoforge:${ curios_version} "
288305 compileOnly " top.theillusivec4.curios:curios-neoforge:${ curios_version} :api"
306+ if (! minimumRuntime) {
307+ runtimeOnly " top.theillusivec4.curios:curios-neoforge:${ curios_version} "
308+ }
289309
290310 // DimStorage
291311 compileOnly " curse.maven:dimstorage-353882:${ dimstorage_version} "
@@ -296,19 +316,25 @@ dependencies {
296316 compileOnly " com.ldtteam:domum-ornamentum:${ domumornamentum_version} "
297317 compileOnly " com.ldtteam:minecolonies:${ minecolonies_version} "
298318 compileOnly " com.ldtteam:structurize:${ structurize_version} "
299- runtimeOnly " com.ldtteam:blockui:${ blockui_version} "
300- runtimeOnly " com.ldtteam:domum-ornamentum:${ domumornamentum_version} "
301- runtimeOnly " com.ldtteam:minecolonies:${ minecolonies_version} "
302- runtimeOnly " com.ldtteam:structurize:${ structurize_version} "
319+ if (! minimumRuntime) {
320+ runtimeOnly " com.ldtteam:blockui:${ blockui_version} "
321+ runtimeOnly " com.ldtteam:domum-ornamentum:${ domumornamentum_version} "
322+ runtimeOnly " com.ldtteam:minecolonies:${ minecolonies_version} "
323+ runtimeOnly " com.ldtteam:structurize:${ structurize_version} "
324+ }
303325
304326 // Patchouli
305327 compileOnly " vazkii.patchouli:Patchouli:${ patchouli_version} -NEOFORGE"
306- runtimeOnly " vazkii.patchouli:Patchouli:${ patchouli_version} -NEOFORGE"
328+ if (! minimumRuntime) {
329+ runtimeOnly " vazkii.patchouli:Patchouli:${ patchouli_version} -NEOFORGE"
330+ }
307331
308332 // Powah
309333 compileOnly " curse.maven:powah-633483:${ powah_version} "
310- runtimeOnly " me.shedaniel.cloth:cloth-config-neoforge:${ cloth_config_version} "
311- runtimeOnly " curse.maven:powah-633483:${ powah_version} "
334+ if (! minimumRuntime) {
335+ runtimeOnly " me.shedaniel.cloth:cloth-config-neoforge:${ cloth_config_version} "
336+ runtimeOnly " curse.maven:powah-633483:${ powah_version} "
337+ }
312338
313339 testModImplementation sourceSets. main. output
314340
@@ -321,9 +347,12 @@ dependencies {
321347 runtimeOnly " dev.emi:emi-neoforge:${ emi_version} "
322348 // Spark
323349 runtimeOnly " maven.modrinth:spark:1.10.124-neoforge-1.21.1"
324- // Sophisticated Backpacks
325- runtimeOnly " maven.modrinth:sophisticated-backpacks:${ sophisticated_backpacks_version} "
326- runtimeOnly " maven.modrinth:sophisticated-core:${ sophisticated_core_version} "
350+
351+ if (! minimumRuntime) {
352+ // Sophisticated Backpacks
353+ runtimeOnly " maven.modrinth:sophisticated-backpacks:${ sophisticated_backpacks_version} "
354+ runtimeOnly " maven.modrinth:sophisticated-core:${ sophisticated_core_version} "
355+ }
327356}
328357
329358
0 commit comments