build.gradle 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. plugins {
  2. id 'fabric-loom' version '0.4-SNAPSHOT'
  3. }
  4. repositories {
  5. maven {
  6. url = "https://maven.fabricmc.net/"
  7. }
  8. maven {
  9. url = "https://minecraft.guntram.de/maven/"
  10. }
  11. }
  12. sourceCompatibility = 1.8
  13. targetCompatibility = 1.8
  14. ext.Versions = new Properties()
  15. Versions.load(file("Versionfiles/mcversion-1.16.4.properties").newReader())
  16. archivesBaseName = "advancementinfo"
  17. ext.projectVersion = "1.2"
  18. version = "${Versions['minecraft_version']}-fabric${Versions['fabric_versiononly']}-${project.projectVersion}"
  19. minecraft {
  20. refmapName = "advancementinfo-refmap.json";
  21. }
  22. processResources {
  23. inputs.property "version", project.version
  24. from(sourceSets.main.resources.srcDirs) {
  25. include "fabric.mod.json"
  26. expand "version": project.version
  27. }
  28. from(sourceSets.main.resources.srcDirs) {
  29. exclude "fabric.mod.json"
  30. }
  31. }
  32. dependencies {
  33. minecraft "com.mojang:minecraft:${Versions['minecraft_version']}"
  34. mappings "net.fabricmc:yarn:${Versions['yarn_mappings']}:v2"
  35. modCompile "net.fabricmc:fabric-loader:${Versions['loader_version']}"
  36. modCompile "net.fabricmc.fabric-api:fabric-api:${Versions['fabric_version']}"
  37. modCompile "io.github.prospector:modmenu:${Versions['modmenu_version']}"
  38. }
  39. // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
  40. // if it is present.
  41. // If you remove this task, sources will not be generated.
  42. task sourcesJar(type: Jar, dependsOn: classes) {
  43. classifier = 'sources'
  44. from sourceSets.main.allSource
  45. }
  46. jar {
  47. from "LICENSE"
  48. }