build.gradle 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. plugins {
  2. id 'fabric-loom' version '0.6-SNAPSHOT'
  3. id "io.freefair.lombok" version "5.3.3.3"
  4. }
  5. sourceCompatibility = JavaVersion.VERSION_1_8
  6. targetCompatibility = JavaVersion.VERSION_1_8
  7. archivesBaseName = project.archives_base_name
  8. version = project.mod_version
  9. group = project.maven_group
  10. dependencies {
  11. // to change the versions see the gradle.properties file
  12. minecraft "com.mojang:minecraft:${project.minecraft_version}"
  13. mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
  14. modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
  15. }
  16. processResources {
  17. inputs.property "version", project.version
  18. filesMatching("fabric.mod.json") {
  19. expand "version": project.version
  20. }
  21. }
  22. tasks.withType(JavaCompile).configureEach {
  23. // ensure that the encoding is set to UTF-8, no matter what the system default is
  24. // this fixes some edge cases with special characters not displaying correctly
  25. // see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
  26. it.options.encoding = "UTF-8"
  27. }
  28. java {
  29. // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
  30. // if it is present.
  31. withSourcesJar()
  32. }
  33. jar {
  34. from "LICENSE"
  35. }