build.gradle 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. buildscript {
  2. repositories {
  3. mavenCentral()
  4. maven {
  5. name = "forge"
  6. url = "http://files.minecraftforge.net/maven"
  7. }
  8. maven {
  9. name = "sonatype"
  10. url = "https://oss.sonatype.org/content/repositories/snapshots/"
  11. }
  12. }
  13. dependencies {
  14. classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
  15. }
  16. }
  17. apply plugin: 'forge'
  18. allprojects {
  19. apply plugin: 'java'
  20. sourceCompatibility = 1.7
  21. targetCompatibility = 1.7
  22. }
  23. file "build.properties" withReader {
  24. def prop = new Properties()
  25. prop.load(it)
  26. ext.config = new ConfigSlurper().parse prop
  27. }
  28. version = "${config.minecraft.version}-${config.lootgames.version}"
  29. group = "org.notabug.jalgateam.jalga" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
  30. archivesBaseName = "JALGA"
  31. minecraft {
  32. version = "${config.forge.version}-${config.minecraft.version}"
  33. runDir = "eclipse"
  34. replaceIn "src/main/java/io/github/jalgateam/jalga/common/lib/LibStrings.java"
  35. def versionArray = project.version.tokenize('-')
  36. replace "GRADLETOKEN_VERSION", versionArray[1]
  37. }
  38. dependencies {
  39. }
  40. processResources {
  41. def cleanVersion = ""
  42. def versionArray = project.version.tokenize('-')
  43. cleanVersion = versionArray[1]
  44. // this will ensure that this task is redone when the versions change.
  45. inputs.property "version", project.version
  46. inputs.property "mcversion", project.minecraft.version
  47. // copy everything else, thats not the mcmod.info
  48. from(sourceSets.main.resources.srcDirs) {
  49. }
  50. }
  51. idea {
  52. module {
  53. inheritOutputDirs = true
  54. }
  55. }