The Aether II is the sequel to the highly popular dimension mod "The Aether" for modern versions of Minecraft.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

107 lines
2.1 KiB

  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.2-SNAPSHOT'
  11. classpath 'org.ajoberstar:gradle-git:1.4.2'
  12. }
  13. }
  14. import org.ajoberstar.grgit.*
  15. apply plugin: 'net.minecraftforge.gradle.forge'
  16. ext.config = loadConfig(file('build.properties'))
  17. ext.repo = Grgit.open(project.file('.'))
  18. allprojects {
  19. sourceCompatibility = 1.7
  20. targetCompatibility = 1.7
  21. }
  22. version = "${config.mod_version}"
  23. group = "com.gildedgames.aether"
  24. archivesBaseName = "AetherII"
  25. ext.ciVersion = System.getenv("BUILD_VERSION")
  26. ext.gitVersion = repo.head().abbreviatedId
  27. if (ciVersion != null) {
  28. version = "${config.mod_version}.build-${ciVersion}"
  29. } else {
  30. version = "${config.mod_version}.git-${gitVersion}"
  31. }
  32. sourceSets {
  33. api {
  34. java { srcDir "src/api/java" }
  35. }
  36. }
  37. dependencies {
  38. compile project(":gilded-games-util")
  39. }
  40. jar {
  41. from sourceSets.api.output
  42. from sourceSets.main.output
  43. }
  44. minecraft {
  45. version = config.forge_version
  46. mappings = config.forge_mappings
  47. runDir = "run"
  48. }
  49. processResources {
  50. inputs.property "version", project.version
  51. inputs.property "mcversion", project.minecraft.version
  52. from (sourceSets.main.resources.srcDirs) {
  53. include 'mcmod.info'
  54. expand 'version': project.version, 'mcversion': project.minecraft.version
  55. }
  56. from (sourceSets.main.resources.srcDirs) {
  57. exclude 'mcmod.info'
  58. }
  59. }
  60. idea {
  61. module {
  62. inheritOutputDirs = true
  63. }
  64. }
  65. // We disable this because Gradle will fail to build otherwise for some reason.
  66. // See https://github.com/MinecraftForge/Srg2Source/issues/10
  67. minecraft {
  68. makeObfSourceJar = false
  69. }
  70. def loadConfig(File config) {
  71. def props = new Properties()
  72. config.withInputStream {
  73. stream -> props.load(stream)
  74. }
  75. return new ConfigSlurper().parse(props)
  76. }
  77. task signJar(type: SignJar, dependsOn: reobfJar) {
  78. if (project.hasProperty("aether_keystore")) {
  79. keyStore = project.aether_keystore
  80. alias = project.aether_keystore_alias
  81. storePass = project.aether_keystore_pass
  82. keyPass = project.aether_keystore_pass
  83. inputFile = jar.archivePath
  84. outputFile = jar.archivePath
  85. }
  86. }