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 20KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548
  1. buildscript {
  2. repositories {
  3. mavenCentral()
  4. jcenter()
  5. //maven {
  6. // name = "forge"
  7. // url = "https://files.minecraftforge.net/maven"
  8. //}
  9. maven {
  10. name = "gt"
  11. url = "https://gregtech.overminddl1.com/"
  12. }
  13. maven {
  14. name = "sonatype"
  15. url = "https://oss.sonatype.org/content/repositories/snapshots/"
  16. }
  17. }
  18. dependencies {
  19. classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
  20. //classpath 'net.onedaybeard.artemis:artemis-odb-gradle-plugin:2.2.0'
  21. //classpath 'net.onedaybeard.artemis:artemis-fluid-gradle-plugin:2.2.0'
  22. }
  23. }
  24. allprojects {
  25. tasks.withType(JavaCompile) {
  26. options.compilerArgs << "-Xlint:deprecation" << "-Xlint:unchecked"
  27. }
  28. }
  29. apply plugin: 'eclipse'
  30. eclipse {
  31. classpath {
  32. downloadJavadoc = true
  33. downloadSources = true
  34. }
  35. }
  36. def eclipseRuntimeClasspath = ""
  37. 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"
  38. task eclipseForgeWorkspace(type: Copy) {
  39. doFirst {
  40. sourceSets.main.runtimeClasspath.collect {
  41. eclipseRuntimeClasspath += eclipseRuntimeClasspathTemplate.replaceAll('@@PATH@@', it.toString())
  42. ""
  43. }
  44. }
  45. from(".meta/eclipse/.metadata") {
  46. include '**/*.template'
  47. rename { it.replace '.template', '' }
  48. filter { it.replaceAll('@@eclipseRuntimeClasspath@@', eclipseRuntimeClasspath) }
  49. //rename '(.*).template', '$1'
  50. }
  51. from(".meta/eclipse/.metadata") {
  52. exclude '**/*.launch'
  53. }
  54. into "eclipse/.metadata"
  55. }
  56. import org.apache.tools.ant.taskdefs.condition.Os
  57. task eclipseForgeProject {
  58. doLast {
  59. if(!(new File("eclipse/Minecraft")).exists()) {
  60. if(!Os.isFamily(Os.FAMILY_WINDOWS)) {
  61. ant.symlink(resource: "../", link: "eclipse/Minecraft")
  62. } else {
  63. println("WINDOWS: Before loading this workspace with Eclipse, manually run this in an Elevated/Admin command prompt:")
  64. println("mklink /D " + (new File("").absolutePath) + "/eclipse/Minecraft " + (new File("").absolutePath))
  65. }
  66. }
  67. }
  68. }
  69. eclipseForgeProject.dependsOn(eclipseForgeWorkspace)
  70. tasks.eclipse.dependsOn(eclipseForgeProject)
  71. apply plugin: 'idea'
  72. idea{
  73. module {
  74. downloadJavadoc = true
  75. downloadSources = true
  76. }
  77. }
  78. repositories {
  79. maven {
  80. name = "gt"
  81. url = "https://gregtech.overminddl1.com/"
  82. }
  83. maven {
  84. name = "sonatype"
  85. url = "https://oss.sonatype.org/content/repositories/snapshots/"
  86. }
  87. //maven {
  88. // name = "forge"
  89. // url = "https://files.minecraftforge.net/maven"
  90. //}
  91. //// No official maven'y storage for:
  92. //// - Baubles
  93. //// - MicdoodleCore
  94. //// - GalacticraftCore
  95. //// - Galacticraft-Planets
  96. //// - Thaumcraft
  97. //// - EnviroMine
  98. //// - Botania
  99. //// - Railcraft
  100. //// - twilightforest
  101. //// - appliedenergistics2
  102. //// - CoFHLib
  103. //// - ComputerCraft
  104. //// - RTG
  105. //// - OpenBlocks
  106. //// - IC2Classic
  107. //// Main storage for forestry_1.7.10
  108. //maven {
  109. // name = "ic2"
  110. // url = "http://maven.ic2.player.to/"
  111. //}
  112. //// Main storage for waila, jabba
  113. //maven {
  114. // name = "profmobius"
  115. // url = "http://default.mobiusstrip.eu/maven"
  116. //}
  117. //// Main storage for buildcraft
  118. //ivy {
  119. // name "BuildCraft"
  120. // artifactPattern "http://www.mod-buildcraft.com/releases/BuildCraft/[revision]/[module]-[revision](-[classifier]).[ext]"
  121. //}
  122. //// Main storage for CodeChickenCore, NotEnoughItems
  123. //// CodeChickenLib is in the Forge maven
  124. //maven {
  125. // name = "chickenbones"
  126. // url = "http://chickenbones.net/maven/"
  127. //}
  128. //// Main storage for AppleCore
  129. //maven {
  130. // name = "Apple"
  131. // url "http://www.ryanliptak.com/maven/"
  132. //}
  133. //// Main storage for OpenComputers
  134. //maven {
  135. // name = "OC repo"
  136. // url = "http://maven.cil.li/"
  137. //}
  138. }
  139. apply plugin: 'forge'
  140. //apply plugin: 'artemis'
  141. //apply plugin: 'artemis-fluid'
  142. group = "com.gregoriust.gregtech"
  143. archivesBaseName = "gregtech_1.7.10"
  144. version = "<UNKNOWN>"
  145. sourceCompatibility = 1.7
  146. targetCompatibility = 1.7
  147. compileJava.options.bootClasspath = org.gradle.internal.jvm.Jvm.current().getJre().getHomeDir().toString() +"/lib/rt.jar"
  148. compileJava {
  149. options.encoding = "UTF-8"
  150. }
  151. configurations {
  152. shade
  153. compile.extendsFrom shade
  154. }
  155. minecraft {
  156. version = "1.7.10-10.13.4.1614-1.7.10"
  157. runDir = "instance"
  158. // This is how you rename a namespace
  159. //srgExtra "PK: com/artemis gregtech/thirdparty/com/artemis"
  160. //srgExtra "PK: net/mostlyoriginal gregtech/thirdparty/net/mostlyoriginal"
  161. //srgExtra "PK: net/fbridault/eeel gregtech/thirdparty/net/fbridault/eeel"
  162. }
  163. dependencies {
  164. //compile fileTree(dir: 'libs', include: '*.jar')
  165. //shade 'net.onedaybeard.artemis:artemis-odb:2.2.0'
  166. //shade 'net.mostlyoriginal.artemis-odb:contrib-core:2.3.0'
  167. //shade 'net.mostlyoriginal.artemis-odb:contrib-eventbus:2.3.0'
  168. //shade 'net.fbridault.eeel:artemis-odb-eeel:1.2'
  169. runtime 'org.apache.commons:commons-math3:3.2' // Needed for dev opis because it doesn't know how to specify dependencies properly
  170. runtime 'org.jfree:jcommon:1.0.21' // Needed for dev opis because it doesn't know how to specify dependencies properly
  171. runtime 'org.jfree:jfreechart:1.0.17' // Needed for dev opis because it doesn't know how to specify dependencies properly
  172. runtime 'com.miglayout:miglayout-swing:4.2' // Needed for dev opis because it doesn't know how to specify dependencies properly
  173. runtime 'net.sf.opencsv:opencsv:2.3' // Needed for dev opis because it doesn't know how to specify dependencies properly
  174. runtime "io.netty-opis:Netty-opis:4.0.23" // Needed for dev opis because it doesn't know how to specify dependencies properly
  175. runtime "mcp.mobius.opis:Opis:1.2.5_1.7.10:dev"
  176. compile "mcp.mobius.waila:Waila:1.5.11-RC2-NONEI_1.7.10:dev"
  177. compile "codechicken:CodeChickenLib:1.7.10-1.1.3.140:dev"
  178. compile "codechicken:CodeChickenCore:1.7.10-1.0.7.47:dev"
  179. compile "codechicken:NotEnoughItems:1.7.10-1.0.5.120:dev"
  180. compileOnly "net.electricalage.eln:ElectricalAge-jrddunbr:1.16.3:dev"
  181. compileOnly "net.sengir.forestry:forestry_1.7.10:4.2.16.64:dev"
  182. compileOnly "com.mod-buildcraft:buildcraft:7.1.23:dev"
  183. compileOnly "com.azanor.baubles:Baubles:1.7.10-1.0.1.10:deobf"
  184. compileOnly "micdoodle8.mods:MicdoodleCore:1.7-3.0.12.504:Dev"
  185. compileOnly "micdoodle8.mods:GalacticraftCore:1.7-3.0.12.504:Dev"
  186. compileOnly "micdoodle8.mods:Galacticraft-Planets:1.7-3.0.12.504:Dev"
  187. compileOnly "thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev"
  188. compileOnly "enviromine:EnviroMine:1.3.124:deobf"
  189. compileOnly "vazkii.botania:Botania:r1.8-250:deobf"
  190. compileOnly "mods.railcraft:Railcraft_1.7.10:9.12.3.0:dev"
  191. compileOnly "twilightforest:twilightforest:1.7.10-2.3.8dev:dev"
  192. compileOnly "appeng:appliedenergistics2:rv3-beta-6:dev"
  193. compileOnly "cofh:CoFHLib:1.7.10R3.0.3:dev"
  194. compileOnly "applecore:AppleCore:1.7.10-3.1.1:deobf"
  195. compileOnly "li.cil.oc:OpenComputers:MC1.7.10-1.7.2.1204:dev"
  196. // This ComputerCraft thing is *SUCH* a hack, but ComputerCraft is... not right... This only works because of CodeChickenCore Magic being included up above...
  197. compileOnly "dan200.computercraft:ComputerCraft:1.75"
  198. compileOnly "openblocks:OpenBlocks:1.7.10-1.6-1.7.10:deobf"
  199. compileOnly "openmods:OpenModsLib:1.7.10-0.10:deobf"
  200. compileOnly "ic2:IC2Classic:1.2.1.8:dev"
  201. compileOnly "com.builtbroken:AddictedToRed:1.7.10-0.4.0b145:deobf"
  202. compileOnly "com.builtbroken:Assembly-Line:1.7.10-0.5.7b180:deobf-dev"
  203. compileOnly "com.builtbroken:BasicIndustry:1.7.10-0.1.0b162:deobf"
  204. compileOnly "com.builtbroken:ComeCloser:1.7.10-0.7.0b10:deobf"
  205. compileOnly "com.builtbroken:ICBM-classic:1.7.10-2.16.4b239:deobf"
  206. compileOnly "com.builtbroken:Mffs:1.7.10-4.0.0b160:deobf"
  207. compileOnly "com.builtbroken:MilitaryBaseDecor:1.7.10-0.1.0b203:deobf"
  208. compileOnly "com.builtbroken:VoltzEngine:1.7.10-1.11.0b466:deobf"
  209. compileOnly "com.hbm:hbm:1.0.27:dev"
  210. compileOnly "com.celestek.hexcraft:HEXCraft:1.7.10-0.13.1:dev"
  211. // List of potentially useful mods that may or may not be linked in here:
  212. //compileOnly "appeng:appliedenergistics2:rv3-beta-6:dev"
  213. //compileOnly "applecore:AppleCore:1.7.10-3.1.1:deobf"
  214. //compileOnly "binnie:binnie-mods:1.7.10-2.0.22:dev"
  215. //compileOnly "blusunrize:ImmersiveEngineering:0.7.7:deobf"
  216. //compileOnly "climateControl:ClimateControl:0.6.61" // Hack
  217. //compileOnly "climateControl:ClimateControl:0.8.2" // Hack
  218. //compileOnly "climateControl:climateControl:0.6.beta59:dev" // Does nothing but compiles successfully
  219. //compileOnly "codechicken:CodeChickenCore:1.7.10-1.0.7.47:dev"
  220. //compileOnly "codechicken:CodeChickenLib:1.7.10-1.1.3.140:dev"
  221. //compileOnly "codechicken:ForgeMultipart:1.7.10-1.2.0.347:dev"
  222. //compileOnly "codechicken:NotEnoughItems:1.7.10-1.0.5.120:dev"
  223. //compileOnly "cofh:CoFHCore:1.7.10R3.0.4:dev"
  224. //compileOnly "cofh:CoFHLib:1.7.10R3.0.3:dev"
  225. //compileOnly "com.InfinityRaider.AgriCraft:AgriCraft:1.7.10-1.5.0:dev"
  226. //compileOnly "com.amadornes.framez:Framez:1.7.10-0.2-33:deobf"
  227. //compileOnly "com.amadornes.jtraits:JTraits:0.1"
  228. //compileOnly "com.azanor.baubles:Baubles:1.7.10-1.0.1.10:deobf"
  229. //compileOnly "com.bioxx.tfc:TerraFirmaCraft_1.7.10:0.79.28.908:deobf"
  230. //compileOnly "com.bluepowermod:BluePower:1.7.10-0.2.963:deobf"
  231. //compileOnly "com.builtbroken:AddictedToRed:1.7.10-0.4.0b145:deobf"
  232. //compileOnly "com.builtbroken:Assembly-Line:1.7.10-0.5.7b180:deobf-dev"
  233. //compileOnly "com.builtbroken:BasicIndustry:1.7.10-0.1.0b162:deobf"
  234. //compileOnly "com.builtbroken:ComeCloser:1.7.10-0.7.0b10:deobf"
  235. //compileOnly "com.builtbroken:ICBM-classic:1.7.10-2.16.4b239:deobf"
  236. //compileOnly "com.builtbroken:Mffs:1.7.10-4.0.0b160:deobf"
  237. //compileOnly "com.builtbroken:MilitaryBaseDecor:1.7.10-0.1.0b203:deobf"
  238. //compileOnly "com.builtbroken:VoltzEngine:1.7.10-1.11.0b466:deobf"
  239. //compileOnly "com.carpentersblocks:CarpentersBlocks:3.3.8.2:dev"
  240. //compileOnly "com.celestek.hexcraft:HEXCraft:1.7.10-0.13.1:dev" // Or grab whatever the latest version is as it is still developed
  241. //compileOnly "com.chocolate.chocolateQuest:chocolateQuest:1.7.10-1.1d" // Hack
  242. //compileOnly "com.creativemd:craftingmanager:0.7.6:dev"
  243. //compileOnly "com.creativemd:creativecore:1.3.24:dev"
  244. //compileOnly "com.enderio:EnderIO/1.7.10-2.3.0.430_beta:dev"
  245. //compileOnly "com.gregoriust.gregtech:gregtech_1.7.10:6.09.00:dev"
  246. //compileOnly "com.hbm:hbm:1.0.27:dev"
  247. //compileOnly "com.mod-buildcraft:buildcraft:7.1.23:dev"
  248. //compileOnly "com.rwtema.funkylocomotion:funky-locomotion-1.7.10:beta-7:deobf"
  249. //compileOnly "com.shedar.IC2NuclearControl:IC2NuclearControl:2.4.3a:dev"
  250. //compileOnly "com.wayoftime.bloodmagic:BloodMagic:1.7.10-1.3.3-18:deobf"
  251. //compileOnly "com.xcompwiz:mystcraft:1.7.10-0.12.3.04:dev"
  252. //compileOnly "dan200.computercraft:ComputerCraft:1.75" // Hack
  253. //compileOnly "delvr.streams:Streams:1.7.10-0.3.4:deobf"
  254. //compileOnly "enviromine:EnviroMine:1.3.124:deobf"
  255. //compileOnly "extracells:ExtraCells:1.7.10-2.3.14b200:deobf"
  256. //compileOnly "ic2:IC2Classic:1.2.1.8:dev"
  257. //compileOnly "io.netty-opis:Netty-opis:4.0.23" // Needed for dev opis because it doesn't know how to specify dependencies properly
  258. //compileOnly "java.moze_intel:ProjectE:1.7.10-PE1.10.1:dev"
  259. //compileOnly "li.cil.oc:OpenComputers:MC1.7.10-1.7.2.1204:dev"
  260. //compileOnly "mcp.mobius.opis:Opis:1.2.5_1.7.10:dev"
  261. //compileOnly "mcp.mobius.waila:Waila:1.5.10_1.7.10:dev"
  262. //compileOnly "mcp.mobius.waila:Waila:1.5.11-RC2-NONEI_1.7.10:dev"
  263. //compileOnly "mekanism:MekanismAll:1.7.10-9.1.1.283:dev"
  264. //compileOnly "micdoodle8.mods:Galacticraft-Planets:1.7-3.0.12.504:Dev"
  265. //compileOnly "micdoodle8.mods:GalacticraftCore:1.7-3.0.12.504:Dev"
  266. //compileOnly "micdoodle8.mods:MicdoodleCore:1.7-3.0.12.504:Dev"
  267. //compileOnly "minechem:Minechem:1.7.10-6.0.407:dev"
  268. //compileOnly "minetweaker:MineTweaker3:1.7.10-3.0.10:dev-full"
  269. //compileOnly "mods.railcraft:Railcraft_1.7.10:9.12.3.0:dev"
  270. //compileOnly "mrtjp:ForgeRelocation:0.0.1.4:dev"
  271. //compileOnly "mrtjp:MrTJPCore:1.1.0.34:dev"
  272. //compileOnly "mrtjp:ProjectRed:1.7.10-4.7.0pre11.52:dev"
  273. //compileOnly "net.bdew:bdlib:1.9.4.110-mc1.7.10:dev"
  274. //compileOnly "net.bdew:gendustry:1.6.4-133-mc1.7.10:dev"
  275. //compileOnly "net.electricalage.eln:ElectricalAge-jrddunbr:1.16.3:dev"
  276. //compileOnly "net.machinemuse:ModularPowersuits:1.7.10-0.11.1.114" // Hack
  277. //compileOnly "net.machinemuse:Numina:0.4.1.105" // Hack
  278. //compileOnly "net.sengir.forestry:forestry_1.7.10:4.2.16.64:dev"
  279. //compileOnly "openblocks:OpenBlocks:1.7.10-1.6-1.7.10:deobf"
  280. //compileOnly "openmods:OpenModsLib:1.7.10-0.10:deobf"
  281. //compileOnly "pneumaticCraft:PneumaticCraft:1.7.10-1.12.7-153:userdev"
  282. //compileOnly "powercrystals:MineFactoryReloaded:[1.7.10]2.8.2B1-201:dev"
  283. //compileOnly "qmunity:QmunityLib:0.2.118:deobf"
  284. //compileOnly "santa:hairy-spice:0.1:dev"
  285. //compileOnly "team.chisel.ctmlib:CTMLib:MC1.7.10-1.4.1.5:deobf"
  286. //compileOnly "team.chisel:Chisel:2.9.5.12:deobf"
  287. //compileOnly "thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev"
  288. //compileOnly "ttftcuts.atg:ATG:1.7.10-0.12.0:DEV"
  289. //compileOnly "twilightforest:twilightforest:1.7.10-2.3.8dev:dev"
  290. //compileOnly "vazkii.botania:Botania:r1.8-250:deobf"
  291. //compileOnly 'com.miglayout:miglayout-swing:4.2' // Needed for dev opis because it doesn't know how to specify dependencies properly
  292. //compileOnly 'net.sf.opencsv:opencsv:2.3' // Needed for dev opis because it doesn't know how to specify dependencies properly
  293. //compileOnly 'org.apache.commons:commons-math3:3.2' // Needed for dev opis because it doesn't know how to specify dependencies properly
  294. //compileOnly 'org.jfree:jcommon:1.0.21' // Needed for dev opis because it doesn't know how to specify dependencies properly
  295. //compileOnly 'org.jfree:jfreechart:1.0.17' // Needed for dev opis because it doesn't know how to specify dependencies properly
  296. }
  297. runClient {
  298. jvmArgs "-Xmx4096m", "-Xms1024m"
  299. }
  300. runServer {
  301. jvmArgs "-Xmx4096m", "-Xms1024m"
  302. }
  303. task buildInfo {
  304. def matcher = "v6.[0-9]*"
  305. def cmdTag = "git describe --match ${matcher} --abbrev=0 --exact-match --dirty"
  306. def procTag = cmdTag.execute()
  307. procTag.waitFor()
  308. if (procTag.exitValue() == 0) {
  309. ext.isRelease = true
  310. ext.tag = "${procTag.text.trim().substring(1)}" // Full Release
  311. ext.version = ext.tag
  312. } else {
  313. ext.isRelease = false
  314. def cmdLat = "git describe --match ${matcher} --dirty"
  315. def procLat = cmdLat.execute()
  316. procLat.waitFor()
  317. if (procLat.exitValue() == 0) {
  318. ext.tag = procLat.text.trim().substring(1)
  319. } else {
  320. def cmdDes = "git describe --dirty"
  321. def procDes = cmdDes.execute()
  322. procDes.waitFor()
  323. if (procDes.exitValue() == 0) {
  324. ext.tag = "DEV-${procDes.text.trim()}"
  325. } else {
  326. ext.tag = "NOGIT" // No tags at all?!
  327. }
  328. }
  329. if (System.getenv().VERSION_FALLBACK != null) {
  330. ext.version = System.getenv().VERSION_FALLBACK
  331. } else {
  332. ext.version = ext.tag
  333. }
  334. }
  335. }
  336. if (System.getenv().ARTIFACT_VERSION == null) {
  337. version = "${project.buildInfo.version}"
  338. } else {
  339. version = "${System.getenv().ARTIFACT_VERSION}"
  340. }
  341. processResources {
  342. inputs.property "version", project.buildInfo.tag
  343. inputs.property "mcversion", project.minecraft.version
  344. from(sourceSets.main.resources.srcDirs) {
  345. include 'mcmod.info'
  346. expand 'version':project.buildInfo.tag, 'mcversion':project.minecraft.version
  347. }
  348. from(sourceSets.main.resources.srcDirs) {
  349. exclude 'mcmod.info'
  350. }
  351. }
  352. task generateBuildInfo(type: Copy) {
  353. def templateContext = [
  354. version: project.buildInfo.tag,
  355. mcversion: project.minecraft.version,
  356. builddate: new Date().toString(),
  357. ]
  358. inputs.properties templateContext
  359. from 'src/template/java'
  360. into "$buildDir/generated-source/java"
  361. expand templateContext
  362. }
  363. sourceSets.main.java.srcDir "$buildDir/generated-source/java"
  364. compileJava.dependsOn generateBuildInfo
  365. task wrapper(type: Wrapper) {
  366. gradleVersion = '3.5.1'
  367. }
  368. //weave {
  369. // classesDir = sourceSets.main.output.classesDir
  370. // enableArtemisPlugin = true
  371. // enablePooledWeaving = true
  372. // generateLinkMutators = true
  373. // optimizeEntitySystems = true
  374. //}
  375. //fluid {
  376. // doFirst {
  377. // sourceSets.main.compileClasspath.each { c ->
  378. // if(!c.exists() && c.getName().lastIndexOf('.')==-1) {
  379. // c.mkdirs()
  380. // }
  381. // }
  382. // }
  383. // doLast {
  384. // def fp = "$buildDir/generated-source/fluid/com/artemis/E.java"
  385. // String fc = new File(fp).getText('UTF-8')
  386. // fc = fc.replaceAll('public final class', '@SuppressWarnings("all") public final class')
  387. // new File(fp).write(fc, 'UTF-8')
  388. //
  389. // fp = "$buildDir/generated-source/fluid/com/artemis/SuperMapper.java"
  390. // fc = new File(fp).getText('UTF-8')
  391. // fc = fc.replaceAll('public final class', '@SuppressWarnings("all") public final class')
  392. // fc = fc.replaceAll('E getE\\(int entityId\\) \\{', '@SuppressWarnings("unchecked") E getE(int entityId) {')
  393. // new File(fp).write(fc, 'UTF-8')
  394. // }
  395. // generatedSourcesDirectory = file("$buildDir/generated-source/fluid/")
  396. // classpath = sourceSets.main.compileClasspath
  397. //
  398. // // Fluid Configuration
  399. // // preferences.prefixComponentGetter = "get" // prefix for E::[get]pos()
  400. // // preferences.prefixComponentCreate = "" // prefix for E::[]pos()
  401. // // preferences.prefixComponentHas = "has" // prefix for E::[has]Pos()
  402. // // preferences.prefixComponentRemove = "remove" // prefix for E::[remove]Pos()
  403. // // preferences.generateTagMethods = true // add tag convenience methods (true).
  404. // // preferences.generateGroupMethods = true // add group convenience methods (true).
  405. // // preferences.generateBooleanComponentAccessors = true // Generate boolean accessors for flag components (true)?
  406. // // preferences.swallowGettersWithParameters = false // global setting. overridden by @Fluid annotation (false).
  407. //}
  408. //sourceSets.main.java.srcDirs += file("$buildDir/generated-source/fluid/")
  409. //sourceMainJava.dependsOn fluid
  410. //classes.finalizedBy weave
  411. jar {
  412. manifest {
  413. attributes 'FMLAT': 'gregtech_at.cfg'
  414. }
  415. configurations.shade.each { dep ->
  416. from(project.zipTree(dep)) {
  417. exclude 'META-INF', 'META-INF/**'
  418. }
  419. }
  420. }
  421. task sourceJar(type: Jar) {
  422. manifest {}
  423. classifier = 'sources'
  424. from sourceSets.main.allSource
  425. exclude 'assets/**', 'logos/**'
  426. }
  427. task devJar(type: Jar) {
  428. manifest {
  429. attributes 'FMLAT': 'gregtech_at.cfg'
  430. }
  431. configurations.shade.each { dep ->
  432. from(project.zipTree(dep)) {
  433. exclude 'META-INF', 'META-INF/**'
  434. }
  435. }
  436. classifier = 'dev'
  437. from sourceSets.main.output
  438. }
  439. //task coreJar(type: Jar) {
  440. // dependsOn jar
  441. // manifest {
  442. // attributes 'FMLAT': 'gregtech_at.cfg'
  443. // }
  444. // classifier = 'core'
  445. // from sourceSets.main.output
  446. // exclude('gregtech/**')
  447. //}
  448. task changelog(type: Copy) {
  449. from('./CHANGELOG.md') {
  450. rename '.*', "$archivesBaseName-$version-changelog.md"
  451. }
  452. into './build/libs'
  453. ext.output = new File("./build/libs/$archivesBaseName-$version-changelog.md")
  454. }
  455. task supporterlist(type: Copy) {
  456. from('./src/main/resources/supporterlist.txt') {
  457. rename '.*', "$archivesBaseName-$version-supporterlist.txt"
  458. }
  459. into './build/libs'
  460. ext.output = new File("./build/libs/$archivesBaseName-$version-supporterlist.txt")
  461. }
  462. task supporterlistgold(type: Copy) {
  463. from('./src/main/resources/supporterlistgold.txt') {
  464. rename '.*', "$archivesBaseName-$version-supporterlistgold.txt"
  465. }
  466. into './build/libs'
  467. ext.output = new File("./build/libs/$archivesBaseName-$version-supporterlistgold.txt")
  468. }
  469. task defaultConfigPack(type: Zip) {
  470. from('./.defaultconfigs/')
  471. include('**/')
  472. classifier = 'defaultConfigPack'
  473. destinationDir = new File('./build/libs/')
  474. }
  475. jar.dependsOn supporterlist
  476. jar.dependsOn supporterlistgold
  477. jar.dependsOn changelog
  478. jar.dependsOn defaultConfigPack
  479. reobf {
  480. //reobf(coreJar) {
  481. // spec -> spec.classpath = sourceSets.main.compileClasspath
  482. //}
  483. }
  484. artifacts {
  485. archives devJar, sourceJar, changelog.output, supporterlist.output, supporterlistgold.output, defaultConfigPack //, coreJar
  486. }
  487. if (!hasProperty("mavenUsername")) {
  488. ext.mavenUsername="${System.getenv().MAVEN_USERNAME}"
  489. }
  490. if (!hasProperty("mavenPassword")) {
  491. ext.mavenPassword="${System.getenv().MAVEN_PASSWORD}"
  492. }
  493. if (!hasProperty("mavenURL")) {
  494. ext.mavenURL="${System.getenv().MAVEN_URL}"
  495. }
  496. if ( !project.buildInfo.tag.contains("-dirty") && (System.getenv().ONLY_RELEASES!="true" || project.buildInfo.isRelease) ) {
  497. uploadArchives {
  498. repositories {
  499. mavenDeployer {
  500. uniqueVersion = false
  501. repository(url: mavenURL) {
  502. authentication(userName: mavenUsername, password: mavenPassword)
  503. }
  504. }
  505. }
  506. }
  507. }