You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

77 lines
1.8 KiB

  1. apply plugin: 'fabric-loom'
  2. apply plugin: 'java'
  3. apply plugin: 'idea'
  4. sourceCompatibility = 1.8
  5. targetCompatibility = 1.8
  6. archivesBaseName = "${project.mod_name}-${project.mod_version}-${project.minecraft_version}"
  7. dependencies {
  8. minecraft "com.mojang:minecraft:${project.minecraft_version}"
  9. mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
  10. modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
  11. modCompile "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
  12. modCompileOnly "TechReborn:${project.tr_slug}"
  13. if (project.name == "1.16") {
  14. implementation project(":compat:1.16")
  15. }
  16. modImplementation "com.github.vini2003:spinnery:${project.spinnery_version}"
  17. }
  18. repositories {
  19. maven {
  20. name = "TechReborn"
  21. url = "https://maven.fabricmc.net/"
  22. }
  23. maven {
  24. name = "Spinnery"
  25. url "https://dl.bintray.com/spinnery/Spinnery"
  26. }
  27. }
  28. processResources {
  29. inputs.property "version", project.version
  30. from(sourceSets.main.resources.srcDirs) {
  31. include "fabric.mod.json"
  32. expand "version": project.version
  33. }
  34. from(sourceSets.main.resources.srcDirs) {
  35. exclude "fabric.mod.json"
  36. }
  37. }
  38. setBuildDir("../../build")
  39. sourceSets {
  40. main {
  41. java {
  42. srcDirs = ["../../src/main/java"]
  43. }
  44. resources {
  45. srcDirs = ["../../src/main/resources"]
  46. }
  47. }
  48. }
  49. jar {
  50. from "LICENSE"
  51. }
  52. task sourcesJar(type: Jar, dependsOn: classes) {
  53. archiveClassifier.set("sources")
  54. from sourceSets.main.allSource
  55. }
  56. task apiJar(type: Jar, dependsOn: classes) {
  57. archiveClassifier.set("api")
  58. from sourceSets.main.allSource.filter { it.path.contains("/api/") }
  59. }
  60. jar.dependsOn apiJar
  61. jar.dependsOn sourcesJar
  62. build.dependsOn jar