Advertisement
Guest User

Untitled

a guest
Nov 20th, 2019
1,050
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.27 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. //gui dependency (1.3.2)
  60. modImplementation "io.github.cottonmc:LibGui:${project.LibGui_version}"
  61. //energy system dependency
  62. modImplementation "io.github.cottonmc:cotton-energy:1.5.0+1.14.3-SNAPSHOT"
  63. //multiblock dependency
  64. modImplementation "io.github.cottonmc:LibMultiblock:0.1.0+1.14.4"
  65. //material dependency (ores etc.)
  66. modImplementation ("io.github.cottonmc:cotton-resources:1.4.0+1.14.4") {
  67. exclude group: "me.shedaniel", module: "RoughlyEnoughItems"
  68. }
  69. //cloth config dependency
  70. modRuntime "me.shedaniel.cloth:config-2:1.8"
  71. modCompileOnly "me.shedaniel.cloth:config-2:1.8"
  72.  
  73. //included in jar files
  74. include "me.shedaniel.cloth:config-2:1.8"
  75. include "alexiil.mc.lib:libblockattributes-all:${project.libblockattributes_all_version}"
  76. include "io.github.cottonmc:LibGui:${project.LibGui_version}"
  77. include "io.github.cottonmc:cotton-energy:1.5.0+1.14.3-SNAPSHOT"
  78. include "io.github.cottonmc:LibMultiblock:0.1.0+1.14.4"
  79. include "io.github.cottonmc:cotton-resources:${project.cotton_resources_version}"
  80.  
  81. // PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs.
  82. // You may need to force-disable transitiveness on them.
  83. }
  84.  
  85. processResources {
  86. inputs.property "version", project.version
  87.  
  88. from(sourceSets.main.resources.srcDirs) {
  89. include "fabric.mod.json"
  90. expand "version": project.version
  91. }
  92.  
  93. from(sourceSets.main.resources.srcDirs) {
  94. exclude "fabric.mod.json"
  95. }
  96. }
  97.  
  98. // ensure that the encoding is set to UTF-8, no matter what the system default is
  99. // this fixes some edge cases with special characters not displaying correctly
  100. // see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
  101. tasks.withType(JavaCompile) {
  102. options.encoding = "UTF-8"
  103. }
  104.  
  105. // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
  106. // if it is present.
  107. // If you remove this task, sources will not be generated.
  108. task sourcesJar(type: Jar, dependsOn: classes) {
  109. classifier = "sources"
  110. from sourceSets.main.allSource
  111. }
  112.  
  113. jar {
  114. from "LICENSE"
  115. }
  116.  
  117. // configure the maven publication
  118. publishing {
  119. publications {
  120. mavenJava(MavenPublication) {
  121. // add all the jars that should be included when publishing to maven
  122. artifact(remapJar) {
  123. builtBy remapJar
  124. }
  125. artifact(sourcesJar) {
  126. builtBy remapSourcesJar
  127. }
  128. }
  129. }
  130.  
  131. // select the repositories you want to publish to
  132. repositories {
  133. // uncomment to publish to the local maven
  134. // mavenLocal()
  135. }
  136. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement