build.gradle 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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 "blue.endless:jankson:${project.jankson_version}"
  43. if (includeDep) {
  44. include("me.shedaniel.cloth:cloth-events:${cloth_events_version}") {
  45. transitive = false
  46. }
  47. include("me.shedaniel.cloth:config-2:${cloth_config_version}") {
  48. transitive = false
  49. }
  50. include "blue.endless:jankson:${project.jankson_version}"
  51. }
  52. modImplementation "io.github.prospector.modmenu:ModMenu:${modmenu_version}"
  53. compile "org.lwjgl:lwjgl-jemalloc:3.2.1"
  54. compileOnly "com.google.code.findbugs:jsr305:3.0.2"
  55. }
  56. task sourcesJar(type: Jar, dependsOn: classes) {
  57. classifier = "sources"
  58. from sourceSets.main.allSource
  59. }
  60. publishing {
  61. publications {
  62. mavenJava(MavenPublication) {
  63. artifact(remapJar) {
  64. builtBy remapJar
  65. }
  66. artifact(sourcesJar) {
  67. builtBy remapSourcesJar
  68. }
  69. }
  70. }
  71. repositories {
  72. // if (project.hasProperty('danielshe_pass')) {
  73. // maven {
  74. // url = "http://deploy.modmuss50.me/"
  75. // credentials {
  76. // username = "danielshe"
  77. // password = project.getProperty('danielshe_pass')
  78. // }
  79. // }
  80. // }
  81. }
  82. }