Advertisement
Guest User

Untitled

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