FOSS graphics extensions mod.
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.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. buildscript {
  2. repositories {
  3. jcenter()
  4. maven { url = "http://files.minecraftforge.net/maven" }
  5. maven {
  6. url "https://plugins.gradle.org/m2/"
  7. }
  8. }
  9. dependencies {
  10. classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
  11. classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.2'
  12. classpath "gradle.plugin.net.minecrell:licenser:0.3"
  13. }
  14. }
  15. apply plugin: 'net.minecraftforge.gradle.forge'
  16. apply plugin: 'com.github.johnrengelman.shadow'
  17. apply plugin: 'net.minecrell.licenser'
  18. version = "0.2.4"
  19. group = "pl.asie.mage" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
  20. archivesBaseName = "MAGE"
  21. sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
  22. compileJava {
  23. sourceCompatibility = targetCompatibility = '1.8'
  24. }
  25. minecraft {
  26. version = "1.12.2-14.23.5.2768"
  27. runDir = "run"
  28. mappings = "snapshot_20180719"
  29. replace '@VERSION@', project.version
  30. replace '@MC_VERSION@', version
  31. }
  32. repositories {
  33. maven {
  34. url = 'https://repo.elytradev.com'
  35. }
  36. ivy {
  37. name 'asie dependency mirror'
  38. artifactPattern "http://asie.pl/javadeps/[module]-[revision](-[classifier]).[ext]"
  39. }
  40. }
  41. dependencies {
  42. }
  43. license {
  44. sourceSets = [project.sourceSets.main]
  45. header = project.file("docs/licenses/LICENSE")
  46. ignoreFailures = true
  47. exclude '**/*.lang'
  48. exclude '**/*.info'
  49. exclude '**/*.mcmeta'
  50. matching('**/pl/asie/mage/api/**') {
  51. header = project.file("docs/licenses/LICENSE-API")
  52. }
  53. }
  54. sourceSets {
  55. main {
  56. resources {
  57. srcDirs += 'docs'
  58. }
  59. }
  60. }
  61. processResources {
  62. // this will ensure that this task is redone when the versions change.
  63. inputs.property "version", project.version
  64. inputs.property "mcversion", project.minecraft.version
  65. // replace stuff in mcmod.info, nothing else
  66. from(sourceSets.main.resources.srcDirs) {
  67. include 'mcmod.info'
  68. // replace version and mcversion
  69. expand 'version':project.version, 'mcversion':project.minecraft.version
  70. }
  71. // copy everything else except the mcmod.info
  72. from(sourceSets.main.resources.srcDirs) {
  73. exclude 'mcmod.info'
  74. }
  75. }
  76. jar {
  77. classifier = 'slim'
  78. manifest.attributes "Manifest-Version": "1.0"
  79. manifest.attributes "FMLCorePluginContainsFMLMod": "true"
  80. manifest.attributes "FMLCorePlugin": "pl.asie.mage.core.MageCoremod"
  81. }
  82. shadowJar {
  83. classifier = ''
  84. relocate 'com.elytradev.mini', 'pl.asie.mage.core.repackage.com.elytradev.mini'
  85. configurations = [project.configurations.shadow]
  86. manifest.attributes "Manifest-Version": "1.0"
  87. manifest.attributes "FMLCorePluginContainsFMLMod": "true"
  88. manifest.attributes "FMLCorePlugin": "pl.asie.mage.core.MageCoremod"
  89. }
  90. reobf {
  91. shadowJar { mappingType = 'SEARGE' }
  92. }
  93. tasks.build.dependsOn reobfShadowJar
  94. artifacts {
  95. archives shadowJar
  96. }
  97. dependencies {
  98. compile 'com.elytradev:mini:0.2-SNAPSHOT'
  99. shadow 'com.elytradev:mini:0.2-SNAPSHOT'
  100. }
  101. task signShadowJar(type: SignJar, dependsOn: shadowJar) {
  102. onlyIf {
  103. project.hasProperty('keyStore')
  104. }
  105. keyStore = project.keyStore
  106. alias = project.keyStoreAlias
  107. storePass = project.keyStorePass
  108. keyPass = project.keyStoreKeyPass
  109. inputFile = shadowJar.archivePath
  110. outputFile = shadowJar.archivePath
  111. }
  112. build.dependsOn(signShadowJar)