Advertisement
Guest User

Untitled

a guest
Apr 28th, 2016
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.15 KB | None | 0 0
  1.  
  2. // For those who want the bleeding edge
  3. buildscript {
  4. repositories {
  5. jcenter()
  6. maven {
  7. name = "forge"
  8. url = "http://files.minecraftforge.net/maven"
  9. }
  10. }
  11. dependencies {
  12. classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT'
  13. }
  14. }
  15. apply plugin: 'net.minecraftforge.gradle.forge'
  16.  
  17. apply plugin: 'java'
  18. // So you say I have to do = 'UTF-8'? Nope. Does not work.
  19. compileJava.options.encoding = 'unicode'
  20.  
  21.  
  22. /*
  23. // for people who want stable - not yet functional for MC 1.8.8 - we require the forgegradle 2.1 snapshot
  24. plugins {
  25. id "net.minecraftforge.gradle.forge" version "2.0.2"
  26. }
  27. */
  28. version = "1.0"
  29. group= "com.yourname.modid" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
  30. archivesBaseName = "modid"
  31.  
  32. minecraft {
  33. version = "1.8.9-11.15.1.1855"
  34. runDir = "run"
  35.  
  36. // the mappings can be changed at any time, and must be in the following format.
  37. // snapshot_YYYYMMDD snapshot are built nightly.
  38. // stable_# stables are built at the discretion of the MCP team.
  39. // Use non-default mappings at your own risk. they may not allways work.
  40. // simply re-run your setup task after changing the mappings to update your workspace.
  41. mappings = "stable_20"
  42. // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
  43. }
  44.  
  45. dependencies {
  46. // you may put jars on which you depend on in ./libs
  47. // or you may define them like so..
  48. //compile "some.group:artifact:version:classifier"
  49. //compile "some.group:artifact:version"
  50.  
  51. // real examples
  52. //compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env
  53. //compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env
  54.  
  55. // the 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime.
  56. //provided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
  57.  
  58. // the deobf configurations: 'deobfCompile' and 'deobfProvided' are the same as the normal compile and provided,
  59. // except that these dependencies get remapped to your current MCP mappings
  60. //deobfCompile 'com.mod-buildcraft:buildcraft:6.0.8:dev'
  61. //deobfProvided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
  62.  
  63. // for more info...
  64. // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
  65. // http://www.gradle.org/docs/current/userguide/dependency_management.html
  66.  
  67. }
  68.  
  69. processResources
  70. {
  71. // this will ensure that this task is redone when the versions change.
  72. inputs.property "version", project.version
  73. inputs.property "mcversion", project.minecraft.version
  74.  
  75. // replace stuff in mcmod.info, nothing else
  76. from(sourceSets.main.resources.srcDirs) {
  77. include 'mcmod.info'
  78.  
  79. // replace version and mcversion
  80. expand 'version':project.version, 'mcversion':project.minecraft.version
  81. }
  82.  
  83. // copy everything else, thats not the mcmod.info
  84. from(sourceSets.main.resources.srcDirs) {
  85. exclude 'mcmod.info'
  86. }
  87. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement