build.gradle 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. maven {
  28. url "https://maven.terraformersmc.com/"
  29. }
  30. }
  31. dependencies {
  32. minecraft("com.mojang:minecraft:${rootProject.minecraft_version}")
  33. mappings("net.fabricmc:yarn:${rootProject.yarn_mappings}:v2")
  34. modImplementation("net.fabricmc:fabric-loader:${rootProject.loader_version}")
  35. modApi("me.shedaniel.cloth:cloth-config-fabric:${rootProject.cloth_config_version}") {
  36. exclude(group: "net.fabricmc.fabric-api")
  37. }
  38. modImplementation("com.terraformersmc:modmenu:${rootProject.modmenu_version}")
  39. // Using modApi because api does not include dependency inside Maven pom file
  40. // see https://github.com/FabricMC/fabric-loom/issues/200
  41. modApi("org.spongepowered:configurate-hocon:${rootProject.configurate_version}")
  42. compileOnly("org.projectlombok:lombok:${rootProject.lombok_version}")
  43. annotationProcessor("org.projectlombok:lombok:${rootProject.lombok_version}")
  44. }
  45. }