Advertisement
supersaiyansubtlety

build.gradle

Nov 2nd, 2020
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.63 KB | None | 0 0
  1. plugins {
  2. id 'fabric-loom' version '0.2.7-SNAPSHOT'
  3. id 'maven-publish'
  4. }
  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 + "+" + project.compatible_minecraft_versions
  12. group = project.maven_group
  13.  
  14. repositories {
  15. maven {
  16. name = "CottonMC"
  17. url = "http://server.bbkr.space:8081/artifactory/libs-release"
  18. }
  19.  
  20. maven {
  21. name = "Ladysnake Libs"
  22. url = "https://dl.bintray.com/ladysnake/libs"
  23. }
  24.  
  25. maven {
  26. name = "Spinnery"
  27. url "https://dl.bintray.com/spinnery/Spinnery"
  28. }
  29.  
  30. maven {
  31. name = "BuildCraft"
  32. url = "https://mod-buildcraft.com/maven"
  33. }
  34.  
  35. // fallback/catch-all repos
  36. maven {
  37. name = "CurseMaven"
  38. url = "https://www.cursemaven.com"
  39. }
  40.  
  41. // JITPACK MUST BE LAST
  42. maven {
  43. name = "JitPack"
  44. url 'https://jitpack.io'
  45. }
  46.  
  47. jcenter()
  48. }
  49.  
  50. dependencies {
  51. //to change the versions see the gradle.properties file
  52. minecraft "com.mojang:minecraft:" + project.minecraft_version
  53. mappings "net.fabricmc:yarn:" + project.yarn_mappings
  54. modImplementation "net.fabricmc:fabric-loader:" + project.loader_version
  55.  
  56. // Fabric API. This is technically optional, but you probably want it anyway.
  57. modImplementation "net.fabricmc.fabric-api:fabric-api:" + project.fabric_api_version
  58. // GUI library
  59. modImplementation ("io.github.cottonmc:LibGui:" + project.libgui_version) { exclude module: 'fabric-api' }
  60. //Config library
  61. modApi ("me.sargunvohra.mcmods:autoconfig1u:" + project.autoconfig1u_version) { exclude module: 'fabric-api' }
  62. //Config GUI support
  63. modApi ("me.shedaniel.cloth:config-2:" + project.cloth_config_2_version) { exclude module: 'fabric-api' }
  64. //Config menu support
  65. modImplementation ("io.github.prospector:modmenu:" + project.modmenu_version) { exclude module: 'fabric-api' }
  66.  
  67. include "io.github.cottonmc:LibGui:" + project.libgui_version
  68. //Config library
  69. include "me.sargunvohra.mcmods:autoconfig1u:" + project.autoconfig1u_version
  70. //Config GUI support
  71. include "me.shedaniel.cloth:config-2:" + project.cloth_config_2_version
  72.  
  73.  
  74. //DEV TEST
  75. // compile "curse.maven:slotlink:3029408"
  76. // modRuntime 'com.github.badasintended:slotlink:slotlink-1.1.4'
  77. modCompile "alexiil.mc.lib:libblockattributes-all:0.8.1"
  78. // modImplementation "io.github.onyxstudios.Cardinal-Components-API:cardinal-components-base:2.5.0"
  79. // modImplementation "io.github.onyxstudios.Cardinal-Components-API:cardinal-components-chunk:2.5.0"
  80. // modRuntime "curse.maven:flamin_hot:3041192"
  81. // modRuntime "com.github.DashEightMate:flamin-hot:beta-0.0.2"
  82.  
  83. // PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs.
  84. // You may need to force-disable transitiveness on them.
  85. }
  86.  
  87. processResources {
  88. inputs.property "version", project.version
  89. inputs.property "mod_id", project.mod_id
  90.  
  91. from(sourceSets.main.resources.srcDirs) {
  92. include "fabric.mod.json"
  93. expand (
  94. "minecraft_version": project.minecraft_version,
  95. "min_minecraft_version": project.min_minecraft_version,
  96. "loader_version": project.loader_version,
  97.  
  98. "mod_id": project.mod_id,
  99. "init_class": project.init_class,
  100. "client_init_class": project.client_init_class,
  101. "mod_version": project.version,
  102. "maven_group": project.maven_group,
  103. "archives_base_name": project.archives_base_name,
  104. "author": project.author,
  105.  
  106. "fabric_api_version": project.fabric_api_version,
  107. "min_fabric_api_version": project.min_fabric_api_version
  108. )
  109. }
  110.  
  111.  
  112. from(sourceSets.main.resources.srcDirs) {
  113. exclude "fabric.mod.json"
  114. }
  115. }
  116.  
  117. // ensure that the encoding is set to UTF-8, no matter what the system default is
  118. // this fixes some edge cases with special characters not displaying correctly
  119. // see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
  120. tasks.withType(JavaCompile) {
  121. options.encoding = "UTF-8"
  122. }
  123.  
  124. // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
  125. // if it is present.
  126. // If you remove this task, sources will not be generated.
  127. task sourcesJar(type: Jar, dependsOn: classes) {
  128. classifier = "sources"
  129. from sourceSets.main.allSource
  130. }
  131.  
  132. jar {
  133. from "LICENSE"
  134. }
  135.  
  136. // configure the maven publication
  137. publishing {
  138. publications {
  139. mavenJava(MavenPublication) {
  140. // add all the jars that should be included when publishing to maven
  141. artifact(remapJar) {
  142. builtBy remapJar
  143. }
  144. artifact(sourcesJar) {
  145. builtBy remapSourcesJar
  146. }
  147. }
  148. }
  149.  
  150. // select the repositories you want to publish to
  151. repositories {
  152. // uncomment to publish to the local maven
  153. // mavenLocal()
  154. }
  155. }
  156.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement