Advertisement
Guest User

Untitled

a guest
Mar 31st, 2020
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Groovy 7.21 KB | None | 0 0
  1. buildscript {
  2.     repositories {
  3.         mavenCentral()
  4.         jcenter()
  5.         maven {
  6.             name = "gt"
  7.             url = "http://gregtech.overminddl1.com/"
  8.         }
  9.         maven {
  10.             name = "forge"
  11.             url = "http://files.minecraftforge.net/maven"
  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.     }
  21. }
  22.  
  23. // Because Forge is too stupid to fix Deprecation Issues, and we cannot fix it on our end! (until we fork Forge)
  24. allprojects {
  25.     tasks.withType(JavaCompile) {
  26.         //options.compilerArgs << "-Xlint:deprecation"
  27.     }
  28. }
  29.  
  30. apply plugin: 'eclipse'
  31. eclipse {
  32.     classpath {
  33.         downloadJavadoc = true
  34.         downloadSources = true
  35.     }
  36. }
  37.  
  38. apply plugin: 'idea'
  39. idea{
  40.     module {
  41.         downloadJavadoc = true
  42.         downloadSources = true
  43.     }
  44. }
  45.  
  46. apply plugin: 'forge'
  47.  
  48. version = "0.0.0"
  49. group = "com.yourname.modid" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
  50. archivesBaseName = "modid"
  51.  
  52. minecraft {
  53.     version = "1.7.10-10.13.4.1614-1.7.10"
  54.     runDir = "eclipse"
  55. }
  56.  
  57. sourceCompatibility = 1.7
  58. targetCompatibility = 1.7
  59. compileJava.options.bootClasspath = org.gradle.internal.jvm.Jvm.current().getJre().getHomeDir().toString() +"/lib/rt.jar"
  60.  
  61. repositories {
  62.     maven {
  63.         name = "gt"
  64.         url = "http://gregtech.overminddl1.com/"
  65.     }
  66. }
  67.  
  68. dependencies {
  69.     // `compile` means it is both compiled with and run with `run*`
  70.     // `compileOnly` means it is only used to compile with but not run in dev via run*
  71.     compile "codechicken:CodeChickenLib:1.7.10-1.1.3.140:dev"
  72.     compile "codechicken:CodeChickenCore:1.7.10-1.0.7.47:dev"
  73.     compile "codechicken:NotEnoughItems:1.7.10-1.0.5.120:dev"
  74.     //compileOnly "appeng:appliedenergistics2:rv3-beta-6:dev"
  75.     //compileOnly "applecore:AppleCore:1.7.10-3.1.1:deobf"
  76.     //compileOnly "ic2:IC2Classic:1.2.1.8:dev"
  77.     //compileOnly "micdoodle8.mods:GalacticraftCore:1.7-3.0.12.504:Dev"
  78.     //compileOnly "micdoodle8.mods:MicdoodleCore:1.7-3.0.12.504:Dev"
  79.     //compile fileTree(dir: 'libs', include: '*.jar') // If you use this, don't commit them to VCS
  80.     //compileOnly "appeng:appliedenergistics2:rv3-beta-6:dev"
  81.     //compileOnly "applecore:AppleCore:1.7.10-3.1.1:deobf"
  82.     //compileOnly "binnie:binnie-mods:1.7.10-2.0.22:dev"
  83.     //compileOnly "blusunrize:ImmersiveEngineering:0.7.7:deobf"
  84.     //compileOnly "climateControl:ClimateControl:0.6.61" // Hack
  85.     //compileOnly "climateControl:ClimateControl:0.8.2" // Hack
  86.     //compileOnly "climateControl:climateControl:0.6.beta59:dev" // Does nothing but compiles successfully
  87.     //compileOnly "codechicken:CodeChickenCore:1.7.10-1.0.7.47:dev"
  88.     //compileOnly "codechicken:CodeChickenLib:1.7.10-1.1.3.140:dev"
  89.     //compileOnly "codechicken:ForgeMultipart:1.7.10-1.2.0.347:dev"
  90.     //compileOnly "codechicken:NotEnoughItems:1.7.10-1.0.5.120:dev"
  91.     //compileOnly "cofh:CoFHCore:1.7.10R3.0.4:dev"
  92.     //compileOnly "cofh:CoFHLib:1.7.10R3.0.3:dev"
  93.     //compileOnly "com.InfinityRaider.AgriCraft:AgriCraft:1.7.10-1.5.0:dev"
  94.     //compileOnly "com.amadornes.framez:Framez:1.7.10-0.2-33:deobf"
  95.     //compileOnly "com.amadornes.jtraits:JTraits:0.1"
  96.     //compileOnly "com.azanor.baubles:Baubles:1.7.10-1.0.1.10:deobf"
  97.     //compileOnly "com.bioxx.tfc:TerraFirmaCraft_1.7.10:0.79.28.908:deobf"
  98.     //compileOnly "com.bluepowermod:BluePower:1.7.10-0.2.963:deobf"
  99.     //compileOnly "com.builtbroken:ICBM:1.7.10-2.15.5b514:deobf-dev"
  100.     //compileOnly "com.builtbroken:VoltzEngine:1.7.10-1.11.0b466:deobf"
  101.     //compileOnly "com.carpentersblocks:CarpentersBlocks:3.3.8.2:dev"
  102.     //compileOnly "com.chocolate.chocolateQuest:chocolateQuest:1.7.10-1.1d" // Hack
  103.     //compileOnly "com.creativemd:craftingmanager:0.7.6:dev"
  104.     //compileOnly "com.creativemd:creativecore:1.3.24:dev"
  105.     //compileOnly "com.gregoriust.gregtech:gregtech_1.7.10:6.09.00:dev"
  106.     //compileOnly "com.mod-buildcraft:buildcraft:7.1.23:dev"
  107.     //compileOnly "com.rwtema.funkylocomotion:funky-locomotion-1.7.10:beta-7:deobf"
  108.     //compileOnly "com.wayoftime.bloodmagic:BloodMagic:1.7.10-1.3.3-18:deobf"
  109.     //compileOnly "com.xcompwiz:mystcraft:1.7.10-0.12.3.04:dev"
  110.     //compileOnly "dan200.computercraft:ComputerCraft:1.75" // Hack
  111.     //compileOnly "delvr.streams:Streams:1.7.10-0.3.4:deobf"
  112.     //compileOnly "enviromine:EnviroMine:1.3.124:deobf"
  113.     //compileOnly "extracells:ExtraCells:1.7.10-2.3.14b200:deobf"
  114.     //compileOnly "ic2:IC2Classic:1.2.1.8:dev"
  115.     //compileOnly "java.moze_intel:ProjectE:1.7.10-PE1.10.1:dev"
  116.     //compileOnly "li.cil.oc:OpenComputers:MC1.7.10-1.7.2.1204:dev"
  117.     //compileOnly "mcp.mobius.waila:Waila:1.5.10_1.7.10:dev"
  118.     //compileOnly "mekanism:MekanismAll:1.7.10-9.1.1.283:dev"
  119.     //compileOnly "micdoodle8.mods:Galacticraft-Planets:1.7-3.0.12.504:Dev"
  120.     //compileOnly "micdoodle8.mods:GalacticraftCore:1.7-3.0.12.504:Dev"
  121.     //compileOnly "micdoodle8.mods:MicdoodleCore:1.7-3.0.12.504:Dev"
  122.     //compileOnly "minechem:Minechem:1.7.10-6.0.407:dev"
  123.     //compileOnly "minetweaker:MineTweaker3:1.7.10-3.0.10:dev-full"
  124.     //compileOnly "mods.railcraft:Railcraft_1.7.10:9.12.3.0:dev"
  125.     //compileOnly "mrtjp:ForgeRelocation:0.0.1.4:dev"
  126.     //compileOnly "mrtjp:MrTJPCore:1.1.0.34:dev"
  127.     //compileOnly "mrtjp:ProjectRed:1.7.10-4.7.0pre11.52:dev"
  128.     //compileOnly "net.bdew:bdlib:1.9.4.110-mc1.7.10:dev"
  129.     //compileOnly "net.bdew:gendustry:1.6.4-133-mc1.7.10:dev"
  130.     //compileOnly "net.machinemuse:ModularPowersuits:1.7.10-0.11.1.114" // Hack
  131.     //compileOnly "net.machinemuse:Numina:0.4.1.105" // Hack
  132.     //compileOnly "net.sengir.forestry:forestry_1.7.10:4.2.16.64:dev"
  133.     //compileOnly "openblocks:OpenBlocks:1.7.10-1.6-1.7.10:deobf"
  134.     //compileOnly "openmods:OpenModsLib:1.7.10-0.10:deobf"
  135.     //compileOnly "pneumaticCraft:PneumaticCraft:1.7.10-1.12.7-153:userdev"
  136.     //compileOnly "powercrystals:MineFactoryReloaded:[1.7.10]2.8.2B1-201:dev"
  137.     //compileOnly "qmunity:QmunityLib:0.2.118:deobf"
  138.     //compileOnly "santa:hairy-spice:0.1:dev"
  139.     //compileOnly "team.chisel.ctmlib:CTMLib:MC1.7.10-1.4.1.5:deobf"
  140.     //compileOnly "team.chisel:Chisel:2.9.5.12:deobf"
  141.     //compileOnly "thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev"
  142.     //compileOnly "ttftcuts.atg:ATG:1.7.10-0.12.0:DEV"
  143.     //compileOnly "twilightforest:twilightforest:1.7.10-2.3.8dev:dev"
  144.     //compileOnly "vazkii.botania:Botania:r1.8-250:deobf"
  145.  
  146.     // real example
  147.     //compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env
  148.  
  149.     // for more info...
  150.     // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
  151.     // http://www.gradle.org/docs/current/userguide/dependency_management.html
  152. }
  153.  
  154.  
  155. processResources {
  156.     // this will ensure that this task is redone when the versions change.
  157.     inputs.property "version", project.version
  158.     inputs.property "mcversion", project.minecraft.version
  159.  
  160.     // replace stuff in mcmod.info, nothing else
  161.     from(sourceSets.main.resources.srcDirs) {
  162.         include 'mcmod.info'
  163.  
  164.         // replace version and mcversion
  165.         expand 'version':project.version, 'mcversion':project.minecraft.version
  166.     }
  167.  
  168.     // copy everything else, thats not the mcmod.info
  169.     from(sourceSets.main.resources.srcDirs) {
  170.         exclude 'mcmod.info'
  171.     }
  172. }
  173.  
  174. version = "${version}-${artifact_version}"
  175.  
  176. task devJar(type: Jar) {
  177.     from sourceSets.main.output
  178.     classifier = 'dev'
  179. }
  180.  
  181. task sourcesJar(type: Jar) {
  182.     from sourceSets.main.allJava
  183.     classifier = 'sources'
  184. }
  185.  
  186. artifacts {
  187.     archives devJar
  188.     archives sourcesJar
  189. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement