build.gradle 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. plugins {
  2. id 'fabric-loom' version '0.2.5-SNAPSHOT'
  3. id 'maven-publish'
  4. id 'net.minecrell.licenser' version '0.4.1'
  5. }
  6. sourceCompatibility = 1.8
  7. targetCompatibility = 1.8
  8. archivesBaseName = "RoughlyEnoughItems"
  9. group = "me.shedaniel"
  10. def ENV = System.getenv()
  11. version = project.mod_version + "+" + (ENV.BUILD_NUMBER ? ("build." + ENV.BUILD_NUMBER) : "local")
  12. def includeDep = true
  13. minecraft {
  14. }
  15. license {
  16. header rootProject.file('HEADER')
  17. include '**/*.java'
  18. exclude '**/Scissors.java'
  19. }
  20. repositories {
  21. maven { url "https://tehnut.info/maven/" }
  22. maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
  23. maven { url "https://minecraft.curseforge.com/api/maven" }
  24. }
  25. processResources {
  26. filesMatching('fabric.mod.json') {
  27. expand 'version': project.version
  28. }
  29. inputs.property "version", project.version
  30. }
  31. dependencies {
  32. minecraft "com.mojang:minecraft:${project.minecraft_version}"
  33. mappings "net.fabricmc:yarn:${project.yarn_version}"
  34. modApi "net.fabricmc:fabric-loader:${project.fabricloader_version}"
  35. modApi "net.fabricmc.fabric-api:fabric-api:${project.fabric_api}"
  36. modApi("me.shedaniel.cloth:cloth-events:${cloth_events_version}") {
  37. transitive = false
  38. }
  39. modImplementation("me.shedaniel.cloth:config-2:${cloth_config_version}") {
  40. transitive = false
  41. }
  42. modApi("me.shedaniel.cloth:fiber2cloth:1.1.0") {
  43. transitive = false
  44. }
  45. modApi "me.zeroeightsix:fiber:0.6.0-7"
  46. modApi "blue.endless:jankson:${project.jankson_version}"
  47. if (includeDep) {
  48. include("me.shedaniel.cloth:cloth-events:${cloth_events_version}") {
  49. transitive = false
  50. }
  51. include("me.shedaniel.cloth:config-2:${cloth_config_version}") {
  52. transitive = false
  53. }
  54. include("me.shedaniel.cloth:fiber2cloth:1.1.0") {
  55. transitive = false
  56. }
  57. include "me.zeroeightsix:fiber:0.6.0-7"
  58. }
  59. modImplementation "io.github.prospector:modmenu:${modmenu_version}"
  60. compile "org.lwjgl:lwjgl-jemalloc:3.2.1"
  61. compileOnly "com.google.code.findbugs:jsr305:3.0.2"
  62. implementation 'org.jetbrains:annotations:15.0'
  63. }
  64. task sourcesJar(type: Jar, dependsOn: classes) {
  65. classifier = "sources"
  66. from sourceSets.main.allSource
  67. }
  68. publishing {
  69. publications {
  70. mavenJava(MavenPublication) {
  71. artifact(remapJar) {
  72. builtBy remapJar
  73. }
  74. artifact(sourcesJar) {
  75. builtBy remapSourcesJar
  76. }
  77. }
  78. }
  79. repositories {
  80. if (project.hasProperty('danielshe_pass')) {
  81. maven {
  82. url = "http://deploy.modmuss50.me/"
  83. credentials {
  84. username = "danielshe"
  85. password = project.getProperty('danielshe_pass')
  86. }
  87. }
  88. }
  89. }
  90. }