Advertisement
B0N

Untitled

B0N
Nov 20th, 2019
1,346
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.19 KB | None | 0 0
  1. plugins {
  2. id 'fabric-loom' version '0.2.5-SNAPSHOT'
  3. id 'maven-publish'
  4. id "com.wynprice.cursemaven" version "2.1.1"
  5. }
  6.  
  7. sourceCompatibility = JavaVersion.VERSION_1_8
  8. targetCompatibility = JavaVersion.VERSION_1_8
  9.  
  10. archivesBaseName = project.archives_base_name
  11. version = project.mod_version
  12. group = project.maven_group
  13.  
  14. minecraft {
  15. }
  16.  
  17. repositories {
  18. jcenter()
  19. maven {
  20. name = "Fabric"
  21. url = "http://maven.fabricmc.net"
  22. }
  23. maven {
  24. name = "Cotton (Snapshot)"
  25. url = "http://server.bbkr.space:8081/artifactory/libs-snapshot"
  26. }
  27. maven {
  28. name = "Cotton"
  29. url = "http://server.bbkr.space:8081/artifactory/libs-release/"
  30. }
  31. maven {
  32. name = "CurseForge"
  33. url = "https://minecraft.curseforge.com/api/maven"
  34. }
  35. maven {
  36. name = "BuildCraft"
  37. url = "https://mod-buildcraft.com/maven"
  38. }
  39. maven {
  40. name = "BuildCraft"
  41. url = "https://minecraft.curseforge.com/api/maven"
  42. }
  43. maven { url = 'http://maven.sargunv.s3-website-us-west-2.amazonaws.com/' }
  44. }
  45.  
  46. dependencies {
  47. //to change the versions see the gradle.properties file
  48. minecraft "com.mojang:minecraft:${project.minecraft_version}"
  49. mappings "net.fabricmc:yarn:${project.yarn_mappings}"
  50. modCompile "net.fabricmc:fabric-loader:${project.loader_version}"
  51.  
  52. // Fabric API. This is technically optional, but you probably want it anyway.
  53. modCompile "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
  54. //modmenu compile and runtime (honestly is mandatory unless using few non configurable mods)
  55. modRuntime "io.github.prospector:modmenu:${project.modmenu_version}"
  56. modCompileOnly "io.github.prospector:modmenu:${project.modmenu_version}"
  57. //lib block attributes (dependency) (0.4.9)
  58. modImplementation "alexiil.mc.lib:libblockattributes-all:${project.libblockattributes_all_version}"
  59. include "alexiil.mc.lib:libblockattributes-all:${project.libblockattributes_all_version}"
  60.  
  61. //gui dependency (1.3.2)
  62. modImplementation "io.github.cottonmc:LibGui:${project.LibGui_version}"
  63. include "io.github.cottonmc:LibGui:${project.LibGui_version}"
  64.  
  65. //energy system dependency
  66. modImplementation "io.github.cottonmc:cotton-energy:1.5.0+1.14.3-SNAPSHOT"
  67. include "io.github.cottonmc:cotton-energy:1.5.0+1.14.3-SNAPSHOT"
  68.  
  69. //multiblock dependency
  70. modImplementation "io.github.cottonmc:LibMultiblock:0.1.0+1.14.4"
  71. include "io.github.cottonmc:LibMultiblock:0.1.0+1.14.4"
  72.  
  73. //material dependency (ores etc.)
  74. modImplementation ("io.github.cottonmc:cotton-resources:${project.cotton_resources_version}") {
  75. exclude group: "me.shedaniel", module: "RoughlyEnoughItems"
  76. }
  77. include "io.github.cottonmc:cotton-resources:${project.cotton_resources_version}"
  78.  
  79. //cloth config dependency
  80. modRuntime "me.shedaniel.cloth:config-2:1.8"
  81. modCompileOnly "me.shedaniel.cloth:config-2:1.8"
  82. modImplementation("me.shedaniel.cloth:config-2:1.8")
  83. include "me.shedaniel.cloth:config-2:1.8"
  84.  
  85. }
  86.  
  87. processResources {
  88. inputs.property "version", project.version
  89.  
  90. from(sourceSets.main.resources.srcDirs) {
  91. include "fabric.mod.json"
  92. expand "version": project.version
  93. }
  94.  
  95. from(sourceSets.main.resources.srcDirs) {
  96. exclude "fabric.mod.json"
  97. }
  98. }
  99.  
  100. // ensure that the encoding is set to UTF-8, no matter what the system default is
  101. // this fixes some edge cases with special characters not displaying correctly
  102. // see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
  103. tasks.withType(JavaCompile) {
  104. options.encoding = "UTF-8"
  105. }
  106.  
  107. // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
  108. // if it is present.
  109. // If you remove this task, sources will not be generated.
  110. task sourcesJar(type: Jar, dependsOn: classes) {
  111. classifier = "sources"
  112. from sourceSets.main.allSource
  113. }
  114.  
  115. jar {
  116. from "LICENSE"
  117. }
  118.  
  119. // configure the maven publication
  120. publishing {
  121. publications {
  122. mavenJava(MavenPublication) {
  123. // add all the jars that should be included when publishing to maven
  124. artifact(remapJar) {
  125. builtBy remapJar
  126. }
  127. artifact(sourcesJar) {
  128. builtBy remapSourcesJar
  129. }
  130. }
  131. }
  132.  
  133. // select the repositories you want to publish to
  134. repositories {
  135. // uncomment to publish to the local maven
  136. // mavenLocal()
  137. }
  138. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement