feat(build): add Epic Fight dependency and gradle test setup

- Add Epic Fight via CurseMaven as an implementation dependency and Skill Tree as compile-only
- Pass Epic Fight refmap remapping properties to the run configuration
- Add JUnit 5 test dependencies and enable JUnit platform in the test task
- Ignore reference/ recordings in .gitignore
This commit is contained in:
richard committed 2026-11-29 22:21:26 +01:00
1 parent 018efc206c
commit 3fadf8bd0c
338 files changed
+20222 -1462

No files matched your search

+25 -1
View File
@@ -75,6 +75,10 @@ minecraft {
// Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
property 'forge.logging.console.level', 'debug'
// Epic Fight ships mixins: remap their refmaps to dev names
property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg"
mods {
"${mod_id}" {
source sourceSets.main
@@ -121,6 +125,11 @@ repositories {
// flatDir {
// dir 'libs'
// }
// Epic Fight is not on its own maven: pull the CurseForge file through CurseMaven
maven {
url "https://cursemaven.com"
content { includeGroup "curse.maven" }
}
}
dependencies {
@@ -142,6 +151,17 @@ dependencies {
// The group id is ignored when searching -- in this case, it is "blank"
// implementation fg.deobf("blank:coolmod-${mc_version}:${coolmod_version}")
// Epic Fight ${epicfight_version} (CurseForge file id ${epicfight_file_id})
implementation fg.deobf("curse.maven:epic-fight-mod-405076:${epicfight_file_id}")
// Epic Fight: Skill Tree ${epicskills_version}, OPTIONAL: compile-only, used only when the mod is installed
// (compat.SkillTreeCompat). Not on the runtime classpath, so dev runs and game tests run without it.
compileOnly fg.deobf("curse.maven:epic-fight-skill-tree-1295882:${epicskills_file_id}")
// Unit tests for the Minecraft-free core package
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.2'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.10.2'
// For more info:
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
// http://www.gradle.org/docs/current/userguide/dependency_management.html
@@ -155,7 +175,7 @@ tasks.named('processResources', ProcessResources).configure {
var replaceProperties = [
minecraft_version: minecraft_version, minecraft_version_range: minecraft_version_range,
forge_version: forge_version, forge_version_range: forge_version_range,
loader_version_range: loader_version_range,
loader_version_range: loader_version_range, epicfight_version_range: epicfight_version_range,
mod_id: mod_id, mod_name: mod_name, mod_license: mod_license, mod_version: mod_version,
mod_authors: mod_authors, mod_description: mod_description,
]
@@ -206,3 +226,7 @@ publishing {
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
}
tasks.named('test', Test).configure {
useJUnitPlatform()
}