Repository for GregTech 6
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.

build.gradle 6.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  1. buildscript {
  2. repositories {
  3. mavenCentral()
  4. maven {
  5. name = "forge"
  6. url = "http://files.minecraftforge.net/maven"
  7. }
  8. maven {
  9. name = "sonatype"
  10. url = "https://oss.sonatype.org/content/repositories/snapshots/"
  11. }
  12. }
  13. dependencies {
  14. classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
  15. }
  16. }
  17. allprojects {
  18. tasks.withType(JavaCompile) {
  19. options.compilerArgs << "-Xlint:deprecation" << "-Xlint:unchecked"
  20. }
  21. }
  22. apply plugin: 'eclipse'
  23. eclipse {
  24. classpath {
  25. downloadJavadoc = true
  26. downloadSources = true
  27. }
  28. }
  29. def eclipseRuntimeClasspath = ""
  30. def eclipseRuntimeClasspathTemplate = "<listEntry value=\"&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry externalArchive=&quot;@@PATH@@&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#10;\"/>\n"
  31. task eclipseForgeWorkspace(type: Copy) {
  32. doFirst {
  33. sourceSets.main.runtimeClasspath.collect {
  34. eclipseRuntimeClasspath += eclipseRuntimeClasspathTemplate.replaceAll('@@PATH@@', it.toString())
  35. ""
  36. }
  37. }
  38. from(".meta/eclipse/.metadata") {
  39. include '**/*.template'
  40. rename { it.replace '.template', '' }
  41. filter { it.replaceAll('@@eclipseRuntimeClasspath@@', eclipseRuntimeClasspath) }
  42. //rename '(.*).template', '$1'
  43. }
  44. from(".meta/eclipse/.metadata") {
  45. exclude '**/*.launch'
  46. }
  47. into "eclipse/.metadata"
  48. }
  49. import org.apache.tools.ant.taskdefs.condition.Os
  50. task eclipseForgeProject {
  51. doLast {
  52. if(!(new File("eclipse/Minecraft")).exists()) {
  53. if(!Os.isFamily(Os.FAMILY_WINDOWS)) {
  54. ant.symlink(resource: "../", link: "eclipse/Minecraft")
  55. } else {
  56. println("WINDOWS: Before loading this workspace with Eclipse, manually run this in an Elevated/Admin command prompt:")
  57. println("mklink /D " + (new File("").absolutePath) + "/eclipse/Minecraft " + (new File("").absolutePath))
  58. }
  59. }
  60. }
  61. }
  62. eclipseForgeProject.dependsOn(eclipseForgeWorkspace)
  63. tasks.eclipse.dependsOn(eclipseForgeProject)
  64. apply plugin: 'idea'
  65. idea{
  66. module {
  67. downloadJavadoc = true
  68. downloadSources = true
  69. }
  70. }
  71. repositories {
  72. maven {
  73. name = "gt"
  74. url = "https://gregtech.overminddl1.com/"
  75. }
  76. maven {
  77. name = "forge"
  78. url = "https://files.minecraftforge.net/maven"
  79. }
  80. //// No official maven'y storage for:
  81. //// - Baubles
  82. //// - MicdoodleCore
  83. //// - GalacticraftCore
  84. //// - Galacticraft-Planets
  85. //// - Thaumcraft
  86. //// - EnviroMine
  87. //// - Botania
  88. //// - Railcraft
  89. //// - twilightforest
  90. //// - appliedenergistics2
  91. //// - CoFHLib
  92. //// - ComputerCraft
  93. //// - RTG
  94. //// - OpenBlocks
  95. //// - IC2Classic
  96. //// Main storage for forestry_1.7.10
  97. //maven {
  98. // name = "ic2"
  99. // url = "http://maven.ic2.player.to/"
  100. //}
  101. //// Main storage for buildcraft
  102. //ivy {
  103. // name "BuildCraft"
  104. // artifactPattern "http://www.mod-buildcraft.com/releases/BuildCraft/[revision]/[module]-[revision](-[classifier]).[ext]"
  105. //}
  106. //// Main storage for CodeChickenCore, NotEnoughItems
  107. //// CodeChickenLib is in the Forge maven
  108. //maven {
  109. // name = "chickenbones"
  110. // url = "http://chickenbones.net/maven/"
  111. //}
  112. //// Main storage for AppleCore
  113. //maven {
  114. // name = "Apple"
  115. // url "http://www.ryanliptak.com/maven/"
  116. //}
  117. //// Main storage for OpenComputers
  118. //maven {
  119. // name = "OC repo"
  120. // url = "http://maven.cil.li/"
  121. //}
  122. }
  123. apply plugin: 'forge'
  124. sourceCompatibility = 1.7
  125. targetCompatibility = 1.7
  126. compileJava.options.bootClasspath = org.gradle.internal.jvm.Jvm.current().getJre().getHomeDir().toString() +"/lib/rt.jar"
  127. group= "com.gregoriust.gregtech"
  128. archivesBaseName = "gregtech_1.7.10"
  129. version = "6.09.01"
  130. minecraft {
  131. version = "1.7.10-10.13.4.1614-1.7.10"
  132. runDir = "assets"
  133. }
  134. dependencies {
  135. //compile fileTree(dir: 'libs', include: '*.jar')
  136. compile "codechicken:CodeChickenLib:1.7.10-1.1.3.140:dev"
  137. compile "codechicken:CodeChickenCore:1.7.10-1.0.7.47:dev"
  138. compile "codechicken:NotEnoughItems:1.7.10-1.0.5.120:dev"
  139. compileOnly "net.sengir.forestry:forestry_1.7.10:4.2.16.64:dev"
  140. compileOnly "com.mod-buildcraft:buildcraft:7.1.23:dev"
  141. compileOnly "com.azanor.baubles:Baubles:1.7.10-1.0.1.10:deobf"
  142. compileOnly "micdoodle8.mods:MicdoodleCore:1.7-3.0.12.504:Dev"
  143. compileOnly "micdoodle8.mods:GalacticraftCore:1.7-3.0.12.504:Dev"
  144. compileOnly "micdoodle8.mods:Galacticraft-Planets:1.7-3.0.12.504:Dev"
  145. compileOnly "thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev"
  146. compileOnly "enviromine:EnviroMine:1.3.124:deobf"
  147. compileOnly "vazkii.botania:Botania:r1.8-250:deobf"
  148. compileOnly "mods.railcraft:Railcraft_1.7.10:9.12.3.0:dev"
  149. compileOnly "twilightforest:twilightforest:1.7.10-2.3.8dev:dev"
  150. compileOnly "appeng:appliedenergistics2:rv3-beta-6:dev"
  151. compileOnly "cofh:CoFHLib:1.7.10R3.0.3:dev"
  152. compileOnly "applecore:AppleCore:1.7.10-3.1.1:deobf"
  153. compileOnly "li.cil.oc:OpenComputers:MC1.7.10-1.7.2.1204:dev"
  154. // This ComputerCraft thing is *SUCH* a hack, but ComputerCraft is... not
  155. // right... This only works because of CodeChickenCore Magic being included
  156. // up above...
  157. compileOnly "dan200.computercraft:ComputerCraft:1.75"
  158. compileOnly "openblocks:OpenBlocks:1.7.10-1.6-1.7.10:deobf"
  159. compileOnly "openmods:OpenModsLib:1.7.10-0.10:deobf"
  160. compileOnly "ic2:IC2Classic:1.2.1.8:dev"
  161. }
  162. runClient {
  163. jvmArgs "-Xmx4096m", "-Xms1024m"
  164. }
  165. runServer {
  166. jvmArgs "-Xmx4096m", "-Xms1024m"
  167. }
  168. processResources {
  169. from(sourceSets.main.resources.srcDirs) {
  170. include 'mcmod.info'
  171. expand 'version':project.version, 'mcversion':project.minecraft.version
  172. }
  173. from(sourceSets.main.resources.srcDirs) {
  174. exclude 'mcmod.info'
  175. }
  176. }
  177. task wrapper(type: Wrapper) {
  178. gradleVersion = '3.5.1'
  179. }
  180. jar {
  181. manifest {
  182. attributes 'FMLAT': 'gregtech_at.cfg'
  183. }
  184. }
  185. task sourceJar(type: Jar) {
  186. manifest {}
  187. classifier = 'sources'
  188. from sourceSets.main.allSource
  189. include 'gregapi/**'
  190. }
  191. task devJar(type: Jar) {
  192. manifest {
  193. attributes 'FMLAT': 'gregtech_at.cfg'
  194. }
  195. classifier = 'dev'
  196. from sourceSets.main.output
  197. }
  198. task coreJar(type: Jar) {
  199. dependsOn jar
  200. manifest {
  201. attributes 'FMLAT': 'gregtech_at.cfg'
  202. }
  203. classifier = 'core'
  204. from sourceSets.main.output
  205. exclude('gregtech/**')
  206. }
  207. reobf {
  208. reobf(coreJar) {
  209. spec -> spec.classpath = sourceSets.main.compileClasspath
  210. }
  211. }
  212. artifacts {
  213. archives devJar, sourceJar, coreJar
  214. }
  215. if (!hasProperty("mavenUsername")) {
  216. ext.mavenUsername=""
  217. }
  218. if (!hasProperty("mavenPassword")) {
  219. ext.mavenPassword=""
  220. }
  221. uploadArchives {
  222. repositories {
  223. mavenDeployer {
  224. repository(url: "http://maven.gregtech.overminddl1.com/upload") {
  225. authentication(userName: mavenUsername, password: mavenPassword)
  226. }
  227. pom*.whenConfigured {
  228. pom -> pom.dependencies.clear()
  229. }
  230. }
  231. }
  232. }