Mirror/alternate repository of https://github.com/Qwertygiy/qwertech
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 5.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. buildscript {
  2. repositories {
  3. mavenCentral()
  4. maven {
  5. name = "gt"
  6. url = "https://gregtech.overminddl1.com/"
  7. }
  8. maven {
  9. name = "forge"
  10. url = "http://files.minecraftforge.net/maven"
  11. }
  12. maven {
  13. name = "OC repo"
  14. url = "http://maven.cil.li/"
  15. }
  16. maven {
  17. name = "sonatype"
  18. url = "https://oss.sonatype.org/content/repositories/snapshots/"
  19. }
  20. }
  21. dependencies {
  22. classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
  23. classpath 'com.gregoriust.gregtech:gregtech_1.7.10:SNAPSHOT:dev'
  24. }
  25. }
  26. apply plugin: 'idea'
  27. idea{
  28. module {
  29. downloadJavadoc = true
  30. downloadSources = true
  31. }
  32. }
  33. repositories {
  34. maven {
  35. name = "gt"
  36. url = "https://gregtech.overminddl1.com/"
  37. }
  38. }
  39. //allprojects {
  40. // tasks.withType(JavaCompile) {
  41. // options.compilerArgs << "-Xlint:deprecation" << "-Xlint:unchecked"
  42. // }
  43. //}
  44. apply plugin: 'forge'
  45. version = "1.0.0-a.44"
  46. group= "com.kbi.qwertech" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
  47. archivesBaseName = "qwertech"
  48. sourceCompatibility = 1.7
  49. targetCompatibility = 1.7
  50. compileJava.options.bootClasspath = org.gradle.internal.jvm.Jvm.current().getJre().getHomeDir().toString() +"/lib/rt.jar"
  51. compileJava {
  52. options.encoding = "UTF-8"
  53. }
  54. minecraft {
  55. version = "1.7.10-10.13.4.1614-1.7.10"
  56. runDir = "eclipse"
  57. }
  58. dependencies {
  59. compile fileTree(dir: 'lib', include: '*.jar')
  60. compile "com.gregoriust.gregtech:gregtech_1.7.10:SNAPSHOT:dev"
  61. runtime 'org.apache.commons:commons-math3:3.2' // Needed for dev opis because it doesn't know how to specify dependencies properly
  62. runtime 'org.jfree:jcommon:1.0.21' // Needed for dev opis because it doesn't know how to specify dependencies properly
  63. runtime 'org.jfree:jfreechart:1.0.17' // Needed for dev opis because it doesn't know how to specify dependencies properly
  64. runtime 'com.miglayout:miglayout-swing:4.2' // Needed for dev opis because it doesn't know how to specify dependencies properly
  65. runtime 'net.sf.opencsv:opencsv:2.3' // Needed for dev opis because it doesn't know how to specify dependencies properly
  66. runtime "io.netty-opis:Netty-opis:4.0.23" // Needed for dev opis because it doesn't know how to specify dependencies properly
  67. runtime "mcp.mobius.opis:Opis:1.2.5_1.7.10:dev"
  68. compile "mcp.mobius.waila:Waila:1.5.11-RC2-NONEI_1.7.10:dev"
  69. compile "codechicken:CodeChickenLib:1.7.10-1.1.3.140:dev"
  70. compile "codechicken:CodeChickenCore:1.7.10-1.0.7.47:dev"
  71. compile "codechicken:NotEnoughItems:1.7.10-1.0.5.120:dev"
  72. compileOnly "net.sengir.forestry:forestry_1.7.10:4.2.16.64:dev"
  73. compileOnly "com.mod-buildcraft:buildcraft:7.1.23:dev"
  74. compileOnly "com.azanor.baubles:Baubles:1.7.10-1.0.1.10:deobf"
  75. compileOnly "micdoodle8.mods:MicdoodleCore:1.7-3.0.12.504:Dev"
  76. compileOnly "micdoodle8.mods:GalacticraftCore:1.7-3.0.12.504:Dev"
  77. compileOnly "micdoodle8.mods:Galacticraft-Planets:1.7-3.0.12.504:Dev"
  78. compileOnly "thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev"
  79. compileOnly "enviromine:EnviroMine:1.3.124:deobf"
  80. compileOnly "vazkii.botania:Botania:r1.8-250:deobf"
  81. compileOnly "mods.railcraft:Railcraft_1.7.10:9.12.3.0:dev"
  82. compileOnly "twilightforest:twilightforest:1.7.10-2.3.8dev:dev"
  83. compileOnly "appeng:appliedenergistics2:rv3-beta-6:dev"
  84. compileOnly "cofh:CoFHLib:1.7.10R3.0.3:dev"
  85. compileOnly "applecore:AppleCore:1.7.10-3.1.1:deobf"
  86. compileOnly "li.cil.oc:OpenComputers:MC1.7.10-1.7.2.1204:dev"
  87. // This ComputerCraft thing is *SUCH* a hack, but ComputerCraft is... not right... This only works because of CodeChickenCore Magic being included up above...
  88. compileOnly "dan200.computercraft:ComputerCraft:1.75"
  89. compileOnly "openblocks:OpenBlocks:1.7.10-1.6-1.7.10:deobf"
  90. compileOnly "openmods:OpenModsLib:1.7.10-0.10:deobf"
  91. compileOnly "ic2:IC2Classic:1.2.1.8:dev"
  92. }
  93. processResources
  94. {
  95. // this will ensure that this task is redone when the versions change.
  96. inputs.property "version", project.version
  97. inputs.property "mcversion", project.minecraft.version
  98. // replace stuff in mcmod.info, nothing else
  99. from(sourceSets.main.resources.srcDirs) {
  100. include 'mcmod.info'
  101. exclude 'thumbs.db'
  102. // replace version and mcversion
  103. expand 'version':project.version, 'mcversion':project.minecraft.version
  104. }
  105. // copy everything else, thats not the mcmod.info
  106. from(sourceSets.main.resources.srcDirs) {
  107. exclude 'mcmod.info'
  108. exclude 'thumbs.db'
  109. }
  110. }
  111. def filteredSourceDir = file("${buildDir}/filtered")
  112. sourceSets {
  113. ahem {
  114. java {
  115. srcDirs = [file("${buildDir}/sources/java")]
  116. //include 'com/kbi/qwertech/**'
  117. exclude 'com/kbi/qwertech/QwerTech.java'
  118. }
  119. }
  120. }
  121. // copy the main sources and filter any '$version' occurences.
  122. task processVersion (type: Copy, dependsOn: 'sourceMainJava') {
  123. inputs.property "version", project.version
  124. inputs.property "mcversion", project.minecraft.version
  125. outputs.upToDateWhen { false }
  126. from "build/sources/java/com/kbi/qwertech/QwerTech.java"
  127. into filteredSourceDir
  128. expand 'version':project.version
  129. }
  130. compileJava.dependsOn processVersion
  131. sourceSets {
  132. // This source set will contain all sources that we filter
  133. filtered {
  134. java {
  135. srcDirs = [sourceSets.ahem.java, filteredSourceDir]
  136. }
  137. }
  138. }
  139. // tell the compileJava task to compile the filtered source
  140. compileJava.source = sourceSets.filtered.java
  141. task deobfJar(type: Jar, dependsOn: 'jar') {
  142. from "build/classes/main"
  143. from(sourceSets.main.resources.srcDirs) {
  144. exclude 'mcmod.info'
  145. exclude 'thumbs.db'
  146. }
  147. classifier "dev"
  148. }
  149. task sourceJar(type: Jar, dependsOn: 'sourceMainJava') {
  150. from "build/sources/java/com/kbi/qwertech/api"
  151. classifier "api"
  152. }
  153. artifacts {
  154. archives deobfJar
  155. archives sourceJar
  156. }
  157. idea { module { inheritOutputDirs = true } }