build.gradle 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. buildscript {
  2. repositories {
  3. maven { url = 'https://files.minecraftforge.net/maven' }
  4. jcenter()
  5. mavenCentral()
  6. maven {url='https://dist.creeper.host/Sponge/maven'}
  7. }
  8. dependencies {
  9. classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
  10. classpath 'org.spongepowered:mixingradle:0.7-SNAPSHOT'
  11. }
  12. }
  13. apply plugin: 'net.minecraftforge.gradle'
  14. // Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
  15. apply plugin: 'eclipse'
  16. apply plugin: 'maven-publish'
  17. version = "${mod_version}"
  18. group = "malte0811.${modid}" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
  19. archivesBaseName = "${modid}"
  20. sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
  21. minecraft {
  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 channel: "snapshot", version: "${mapping}-${mcp_version}"
  28. // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
  29. //accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
  30. // Default run configurations.
  31. // These can be tweaked, removed, or duplicated as needed.
  32. runs {
  33. client {
  34. workingDirectory project.file('run')
  35. arg "-mixin.config="+archivesBaseName+".mixins.json"
  36. property 'mixin.env.disableRefMap', 'true'
  37. property 'mixin.debug.export', 'true'
  38. // Recommended logging level for the console
  39. property 'forge.logging.console.level', 'debug'
  40. mods {
  41. examplemod {
  42. source sourceSets.main
  43. }
  44. }
  45. }
  46. server {
  47. workingDirectory project.file('run')
  48. arg "-mixin.config="+archivesBaseName+".mixins.json"
  49. arg "-nogui"
  50. property 'mixin.env.disableRefMap', 'true'
  51. // Recommended logging level for the console
  52. property 'forge.logging.console.level', 'debug'
  53. mods {
  54. examplemod {
  55. source sourceSets.main
  56. }
  57. }
  58. }
  59. }
  60. }
  61. def customGradle = rootProject.file('custom.gradle');
  62. if (customGradle.exists()) {
  63. apply from: customGradle;
  64. }
  65. repositories{
  66. maven {
  67. // location of the maven that hosts JEI files
  68. name = "Progwml6 maven"
  69. url = "https://dvs1.progwml6.com/files/maven/"
  70. }
  71. maven {
  72. // location of a maven mirror for JEI files, as a fallback
  73. name = "ModMaven"
  74. url = "https://modmaven.k-4u.nl"
  75. }
  76. maven {
  77. name = "BlameJared"
  78. url = "https://maven.blamejared.com/"
  79. }
  80. jcenter()
  81. mavenCentral()
  82. }
  83. dependencies {
  84. minecraft "net.minecraftforge:forge:${mc_version}-${forge_version}"
  85. compile fg.deobf("blusunrize.immersiveengineering:ImmersiveEngineering:1.16.3-+")
  86. runtimeOnly fg.deobf("mezz.jei:jei-1.16.3:7.6.0.49")
  87. }
  88. // Example for how to get properties into the manifest for reading by the runtime..
  89. jar {
  90. manifest {
  91. attributes([
  92. "Specification-Title": "${modid}",
  93. "Specification-Version": "1", // We are version 1 of ourselves
  94. "Implementation-Title": project.name,
  95. "Implementation-Version": "${version}",
  96. "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
  97. "MixinConfigs": "${modid}.mixins.json"
  98. ])
  99. }
  100. }
  101. apply plugin: 'org.spongepowered.mixin'
  102. mixin {
  103. add sourceSets.main, "${modid}.refmap.json"
  104. }