Advertisement
Guest User

Untitled

a guest
Aug 24th, 2017
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.38 KB | None | 0 0
  1. buildscript {
  2. repositories {
  3. jcenter()
  4. maven { url = "http://files.minecraftforge.net/maven" }
  5. }
  6. dependencies {
  7. classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
  8. }
  9. }
  10.  
  11. plugins {
  12. id 'com.github.johnrengelman.shadow' version '1.2.3'
  13. }
  14.  
  15. apply plugin: 'net.minecraftforge.gradle.forge'
  16.  
  17. ext.configFile = file "build.properties"
  18.  
  19. configFile.withReader {
  20. def prop = new Properties()
  21. prop.load(it)
  22. project.ext.config = new ConfigSlurper().parse prop
  23. }
  24.  
  25. version = config.mod_version
  26. group = config.mod_group
  27. archivesBaseName = config.mod_name
  28.  
  29. if (System.getenv().BUILD_NUMBER)
  30. version = "${config.mod_version}.b${System.getenv().BUILD_NUMBER}"
  31.  
  32. sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
  33. compileJava {
  34. sourceCompatibility = targetCompatibility = '1.8'
  35. }
  36.  
  37. minecraft {
  38. version = "${config.mc_version}-${config.forge_version}"
  39. runDir = "run"
  40. // the mappings can be changed at any time, and must be in the following format.
  41. // snapshot_YYYYMMDD snapshot are built nightly.
  42. // stable_# stables are built at the discretion of the MCP team.
  43. // Use non-default mappings at your own risk. they may not always work.
  44. // simply re-run your setup task after changing the mappings to update your workspace.
  45. mappings = "snapshot_20170624"
  46. // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
  47.  
  48. }
  49.  
  50. dependencies {
  51. provided 'org.bouncycastle:bcprov-jdk15on:1.57'
  52. }
  53.  
  54. shadowJar {
  55. dependencies {
  56.  
  57. }
  58.  
  59. classifier ''
  60. }
  61.  
  62. reobf {
  63. shadowJar {}
  64. }
  65.  
  66. processResources {
  67. // this will ensure that this task is redone when the versions change.
  68. inputs.property "version", project.version
  69. inputs.property "mcversion", project.minecraft.version
  70.  
  71. // replace stuff in mcmod.info, nothing else
  72. from(sourceSets.main.resources.srcDirs) {
  73. include 'mcmod.info'
  74. include '**/reference.properties'
  75.  
  76. // replace version and mcversion
  77. expand 'version':project.version, 'mcversion':project.minecraft.version
  78. }
  79.  
  80. // copy everything else except the mcmod.info
  81. from(sourceSets.main.resources.srcDirs) {
  82. exclude 'mcmod.info'
  83. exclude '**/reference.properties'
  84. }
  85. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement