The Aether II is the sequel to the highly popular dimension mod "The Aether" for modern versions of Minecraft. https://minecraft.curseforge.com/projects/the-aether-ii
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.

156 lines
3.5 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.3-SNAPSHOT'
  11. }
  12. }
  13. apply plugin: 'net.minecraftforge.gradle.forge'
  14. apply plugin: 'maven-publish'
  15. def isPhosphorSubmodule = findProject(":Phosphor") != null
  16. repositories {
  17. mavenCentral()
  18. maven { url = 'https://repo.spongepowered.org/maven' }
  19. maven { url = 'https://repo.gildedgames.com/maven' }
  20. }
  21. configurations {
  22. shaded
  23. shaded.exclude group: "org.spongepowered"
  24. }
  25. dependencies {
  26. if (isPhosphorSubmodule) {
  27. runtime project(':phosphor')
  28. } else {
  29. runtime "me.jellysquid.mods:phosphor:${phosphor_version}:dev"
  30. shaded "me.jellysquid.mods:phosphor:${phosphor_version}:universal"
  31. }
  32. compile project(":orbis-lib")
  33. shaded project(":orbis-lib")
  34. }
  35. allprojects {
  36. sourceCompatibility = 1.8
  37. targetCompatibility = 1.8
  38. }
  39. if (System.getenv("BUILD_NUMBER") != null) {
  40. version = "${minecraft_version}-${mod_version}+build${System.getenv("BUILD_NUMBER")}"
  41. } else {
  42. version = "${minecraft_version}-${mod_version}-SNAPSHOT"
  43. }
  44. group = "com.gildedgames"
  45. archivesBaseName = "aether_ii"
  46. sourceSets {
  47. api {
  48. java { srcDir "src/api/java" }
  49. }
  50. test {
  51. java { srcDir "src/test/java" }
  52. }
  53. }
  54. jar {
  55. from sourceSets.api.output
  56. from sourceSets.main.output
  57. classifier "universal"
  58. gradle.projectsEvaluated({
  59. def artifacts = configurations.shaded.files
  60. .findAll { it.name.contains("-universal.jar") }
  61. .toList()
  62. .reverse()
  63. from(artifacts)
  64. manifest {
  65. attributes "ContainedDeps": artifacts.collect { it.name }.join(' ')
  66. attributes "FMLAT": "aether_at.cfg"
  67. attributes "SignedFileName": jar.archivePath.name
  68. }
  69. })
  70. }
  71. task apiJar(type: Jar) {
  72. classifier = "api"
  73. from sourceSets.api.output
  74. }
  75. minecraft {
  76. version = "$minecraft_version-$forge_version"
  77. mappings = "$forge_mappings"
  78. runDir = "run"
  79. def plugin = "me.jellysquid.mods.phosphor.core.PhosphorFMLLoadingPlugin"
  80. clientJvmArgs = serverJvmArgs += "-Dfml.coreMods.load=$plugin"
  81. }
  82. processResources {
  83. inputs.property "version", project.version
  84. inputs.property "mcversion", project.minecraft.version
  85. from(sourceSets.main.resources.srcDirs) {
  86. include 'mcmod.info'
  87. expand 'version': project.version, 'mcversion': project.minecraft.version
  88. }
  89. from(sourceSets.main.resources.srcDirs) {
  90. exclude 'mcmod.info'
  91. }
  92. }
  93. idea {
  94. module {
  95. inheritOutputDirs = true
  96. }
  97. }
  98. // We disable this because Gradle will fail to build otherwise for some reason.
  99. // See https://github.com/MinecraftForge/Srg2Source/issues/10
  100. minecraft {
  101. makeObfSourceJar = false
  102. }
  103. if (System.getenv("JARSIGN_SECRETS_FILE") != null) {
  104. def secretsFile = file(System.getenv("JARSIGN_SECRETS_FILE"))
  105. def secrets = new Properties()
  106. secrets.load(secretsFile.newReader())
  107. [jar, apiJar].each { jarTask ->
  108. def task = task(jarTask.name + 'Sign', type: SignJar) {
  109. keyStore = System.getenv("JARSIGN_KEYSTORE_FILE")
  110. alias = secrets.alias
  111. storePass = secrets.storePassword
  112. keyPass = secrets.keyPassword
  113. inputFile = jarTask.archivePath
  114. outputFile = jarTask.archivePath
  115. }
  116. build.dependsOn task
  117. }
  118. }
  119. build.dependsOn apiJar
  120. jar.dependsOn ":orbis-lib:build"