build.gradle 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. buildscript {
  2. repositories {
  3. jcenter()
  4. maven { url = "http://files.minecraftforge.net/maven" }
  5. }
  6. dependencies {
  7. classpath 'net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT'
  8. }
  9. }
  10. apply plugin: 'net.minecraftforge.gradle.forge'
  11. //Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
  12. version = "1.0"
  13. group = "me.hammerle.km" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
  14. archivesBaseName = "km"
  15. sourceCompatibility = targetCompatibility = "1.8" // Need this here so eclipse task generates correctly.
  16. compileJava {
  17. sourceCompatibility = targetCompatibility = "1.8"
  18. }
  19. minecraft {
  20. version = "1.11.2-13.20.0.2228"
  21. runDir = "run"
  22. // the mappings can be changed at any time, and must be in the following format.
  23. // snapshot_YYYYMMDD snapshot are built nightly.
  24. // stable_# stables are built at the discretion of the MCP team.
  25. // Use non-default mappings at your own risk. they may not always work.
  26. // simply re-run your setup task after changing the mappings to update your workspace.
  27. mappings = "snapshot_20161220"
  28. // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
  29. }
  30. dependencies {
  31. // you may put jars on which you depend on in ./libs
  32. // or you may define them like so..
  33. //compile "some.group:artifact:version:classifier"
  34. //compile "some.group:artifact:version"
  35. // real examples
  36. //compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env
  37. //compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env
  38. // the 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime.
  39. //provided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
  40. // the deobf configurations: 'deobfCompile' and 'deobfProvided' are the same as the normal compile and provided,
  41. // except that these dependencies get remapped to your current MCP mappings
  42. //deobfCompile 'com.mod-buildcraft:buildcraft:6.0.8:dev'
  43. //deobfProvided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
  44. // for more info...
  45. // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
  46. // http://www.gradle.org/docs/current/userguide/dependency_management.html
  47. compile group: 'mysql', name: 'mysql-connector-java', version: '5.1.42'
  48. }
  49. processResources {
  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. // replace stuff in mcmod.info, nothing else
  54. from(sourceSets.main.resources.srcDirs) {
  55. include 'mcmod.info'
  56. // replace version and mcversion
  57. expand 'version':project.version, 'mcversion':project.minecraft.version
  58. }
  59. // copy everything else except the mcmod.info
  60. from(sourceSets.main.resources.srcDirs) {
  61. exclude 'mcmod.info'
  62. }
  63. //rename '(.+_at.cfg)', 'META-INF/$1'
  64. }
  65. /*
  66. jar {
  67. manifest {
  68. attributes 'FMLAT': 'km_at.cfg'
  69. }
  70. }*/