build.gradle 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. 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.kcm" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
  14. archivesBaseName = "kcm"
  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.12.1-14.22.0.2475"
  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_20170624"
  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. }
  48. processResources {
  49. // this will ensure that this task is redone when the versions change.
  50. inputs.property "version", project.version
  51. inputs.property "mcversion", project.minecraft.version
  52. // replace stuff in mcmod.info, nothing else
  53. from(sourceSets.main.resources.srcDirs) {
  54. include 'mcmod.info'
  55. // replace version and mcversion
  56. expand 'version':project.version, 'mcversion':project.minecraft.version
  57. }
  58. // copy everything else except the mcmod.info
  59. from(sourceSets.main.resources.srcDirs) {
  60. exclude 'mcmod.info'
  61. }
  62. }
  63. jar
  64. {
  65. manifest
  66. {
  67. attributes("FMLCorePlugin": "me.kcm.KajetansLoadingPlugin")
  68. }
  69. }