Skip to content

Commit 5b312e6

Browse files
authored
chore: move addon.gradle application to the bottom to improve custom code support (#122)
1 parent 6743289 commit 5b312e6

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

build.gradle

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -318,14 +318,6 @@ tasks.withType(ScalaCompile).configureEach {
318318
}
319319

320320

321-
// Allow others using this buildscript to have custom gradle code run
322-
if (getFile('addon.gradle').exists()) {
323-
apply from: 'addon.gradle'
324-
} else if (getFile('addon.gradle.kts').exists()) {
325-
apply from: 'addon.gradle.kts'
326-
}
327-
328-
329321
// Configure Minecraft
330322

331323
// Try to gather mod version from git tags if version is not manually specified
@@ -377,9 +369,9 @@ minecraft {
377369
extraRunJvmArguments.add('-Dterminal.jline=true')
378370
if (usesMixins.toBoolean()) {
379371
extraRunJvmArguments.addAll([
380-
'-Dmixin.hotSwap=true',
381-
'-Dmixin.checks.interfaces=true',
382-
'-Dmixin.debug.export=true'
372+
'-Dmixin.hotSwap=true',
373+
'-Dmixin.checks.interfaces=true',
374+
'-Dmixin.debug.export=true'
383375
])
384376
}
385377

@@ -877,7 +869,7 @@ if (enableJava17RunTasks.toBoolean()) {
877869
if (modId != 'lwjgl3ify') {
878870
java17Dependencies("io.github.twilightflower:lwjgl3ify:1.0.1")
879871
java17PatchDependencies("io.github.twilightflower:lwjgl3ify:1.0.1:forgePatches") {
880-
transitive = false
872+
transitive = false
881873
}
882874
}
883875
}
@@ -1552,3 +1544,11 @@ def getLastTag() {
15521544
return runShell('git describe --abbrev=0 --tags ' +
15531545
(githubTag.isPresent() ? runShell('git rev-list --tags --skip=1 --max-count=1') : ''))
15541546
}
1547+
1548+
1549+
// Allow others using this buildscript to have custom gradle code run
1550+
if (getFile('addon.gradle').exists()) {
1551+
apply from: 'addon.gradle'
1552+
} else if (getFile('addon.gradle.kts').exists()) {
1553+
apply from: 'addon.gradle.kts'
1554+
}

0 commit comments

Comments
 (0)