build.gradle 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. plugins {
  2. id 'fabric-loom' version '0.5-SNAPSHOT' apply false
  3. }
  4. subprojects {
  5. apply plugin: "fabric-loom"
  6. sourceCompatibility = JavaVersion.VERSION_1_8
  7. targetCompatibility = JavaVersion.VERSION_1_8
  8. group = rootProject.maven_group
  9. archivesBaseName = "${rootProject.archives_base_name}-${project.name}"
  10. version = rootProject.mod_version
  11. processResources {
  12. inputs.property "version", project.version
  13. filesMatching("fabric.mod.json") {
  14. expand "version": project.version
  15. }
  16. }
  17. tasks.withType(JavaCompile).configureEach {
  18. // ensure that the encoding is set to UTF-8, no matter what the system default is
  19. // this fixes some edge cases with special characters not displaying correctly
  20. // see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
  21. it.options.encoding = "UTF-8"
  22. }
  23. repositories {
  24. maven {
  25. url "https://maven.shedaniel.me/"
  26. }
  27. }
  28. dependencies {
  29. minecraft("com.mojang:minecraft:${rootProject.minecraft_version}")
  30. mappings("net.fabricmc:yarn:${rootProject.yarn_mappings}:v2")
  31. modImplementation("net.fabricmc:fabric-loader:${rootProject.loader_version}")
  32. modApi("me.shedaniel.cloth:cloth-config-fabric:${rootProject.cloth_config_version}") {
  33. exclude(group: "net.fabricmc.fabric-api")
  34. }
  35. // Using modApi because api does not include dependency inside Maven pom file
  36. // see https://github.com/FabricMC/fabric-loom/issues/200
  37. modApi("org.spongepowered:configurate-hocon:${rootProject.configurate_version}")
  38. compileOnly("org.projectlombok:lombok:${rootProject.lombok_version}")
  39. annotationProcessor("org.projectlombok:lombok:${rootProject.lombok_version}")
  40. }
  41. }