build.gradle 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. plugins {
  2. id 'fabric-loom' version '0.11-SNAPSHOT'
  3. id 'ferritecore.loader-conventions'
  4. }
  5. repositories {
  6. maven {
  7. url 'https://maven.parchmentmc.org'
  8. }
  9. }
  10. dependencies {
  11. minecraft group: 'com.mojang', name: 'minecraft', version: minecraft_version
  12. mappings loom.layered() {
  13. officialMojangMappings()
  14. parchment("org.parchmentmc.data:parchment-${minecraft_version}:${parchment_version}@zip")
  15. }
  16. modImplementation group: 'net.fabricmc', name: 'fabric-loader', version: fabric_loader_version
  17. }
  18. loom {
  19. runs {
  20. client {
  21. client()
  22. setConfigName("Fabric Client")
  23. ideConfigGenerated(true)
  24. runDir("run")
  25. }
  26. server {
  27. server()
  28. setConfigName("Fabric Server")
  29. ideConfigGenerated(true)
  30. runDir("run")
  31. }
  32. }
  33. }
  34. processResources {
  35. filesMatching("fabric.mod.json") {
  36. expand "version": mod_version
  37. }
  38. }
  39. jar {
  40. filesMatching("*.mixin.json") {
  41. expand "refmap_target": "${archivesBaseName}-"
  42. }
  43. }
  44. // For some reason this doesn't work when in the "convention" scripts...
  45. def customGradle = project.file('custom.gradle');
  46. if (customGradle.exists()) {
  47. apply from: customGradle;
  48. }