Advertisement
Guest User

build.gradle

a guest
Feb 19th, 2016
901
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.21 KB | None | 0 0
  1. buildscript {
  2. repositories {
  3. jcenter()
  4. maven {
  5. name = "forge"
  6. url = "http://files.minecraftforge.net/maven"
  7. }
  8. }
  9. dependencies {
  10. classpath 'net.minecraftforge.gradle:ForgeGradle:2.0-SNAPSHOT'
  11. }
  12. }
  13.  
  14. apply plugin: 'net.minecraftforge.gradle.forge'
  15.  
  16. version = "1.0"
  17. group= "com.yourname.modid" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
  18. archivesBaseName = "modid"
  19.  
  20. minecraft {
  21. version = "1.8.9-11.15.1.1751"
  22. runDir = "eclipse"
  23.  
  24. // the mappings can be changed at any time, and must be in the following format.
  25. // snapshot_YYYYMMDD snapshot are built nightly.
  26. // stable_# stables are built at the discretion of the MCP team.
  27. // Use non-default mappings at your own risk. they may not allways work.
  28. // simply re-run your setup task after changing the mappings to update your workspace.
  29. mappings = "snapshot_20160217"
  30. }
  31.  
  32. dependencies {
  33. // you may put jars on which you depend on in ./libs
  34. // or you may define them like so..
  35. //compile "some.group:artifact:version:classifier"
  36. //compile "some.group:artifact:version"
  37.  
  38. // real examples
  39. //compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env
  40. //compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env
  41.  
  42. // for more info...
  43. // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
  44. // http://www.gradle.org/docs/current/userguide/dependency_management.html
  45.  
  46. }
  47.  
  48. processResources
  49. {
  50. // this will ensure that this task is redone when the versions change.
  51. inputs.property "version", project.version
  52. inputs.property "mcversion", project.minecraft.version
  53.  
  54. // replace stuff in mcmod.info, nothing else
  55. from(sourceSets.main.resources.srcDirs) {
  56. include 'mcmod.info'
  57.  
  58. // replace version and mcversion
  59. expand 'version':project.version, 'mcversion':project.minecraft.version
  60. }
  61.  
  62. // copy everything else, thats not the mcmod.info
  63. from(sourceSets.main.resources.srcDirs) {
  64. exclude 'mcmod.info'
  65. }
  66. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement