build.gradle 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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. // Recommended logging level for the console
  37. property 'forge.logging.console.level', 'debug'
  38. mods {
  39. examplemod {
  40. source sourceSets.main
  41. }
  42. }
  43. }
  44. server {
  45. workingDirectory project.file('run')
  46. arg "-mixin.config="+archivesBaseName+".mixins.json"
  47. arg "-nogui"
  48. // Recommended logging level for the console
  49. property 'forge.logging.console.level', 'debug'
  50. mods {
  51. examplemod {
  52. source sourceSets.main
  53. }
  54. }
  55. }
  56. }
  57. }
  58. def customGradle = rootProject.file('custom.gradle');
  59. if (customGradle.exists()) {
  60. apply from: customGradle;
  61. }
  62. repositories{
  63. maven {
  64. // location of the maven that hosts JEI files
  65. name = "Progwml6 maven"
  66. url = "https://dvs1.progwml6.com/files/maven/"
  67. }
  68. maven {
  69. // location of a maven mirror for JEI files, as a fallback
  70. name = "ModMaven"
  71. url = "https://modmaven.k-4u.nl"
  72. }
  73. maven {
  74. name = "BlameJared"
  75. url = "https://maven.blamejared.com/"
  76. }
  77. jcenter()
  78. mavenCentral()
  79. }
  80. dependencies {
  81. minecraft "net.minecraftforge:forge:${mc_version}-${forge_version}"
  82. compile fg.deobf("blusunrize.immersiveengineering:ImmersiveEngineering:1.16.3-+")
  83. runtimeOnly fg.deobf("mezz.jei:jei-1.16.3:7.6.0.49")
  84. }
  85. // Example for how to get properties into the manifest for reading by the runtime..
  86. jar {
  87. manifest {
  88. attributes([
  89. "Specification-Title": "${modid}",
  90. "Specification-Version": "1", // We are version 1 of ourselves
  91. "Implementation-Title": project.name,
  92. "Implementation-Version": "${version}",
  93. "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
  94. "MixinConfigs": "${modid}.mixins.json"
  95. ])
  96. }
  97. }
  98. apply plugin: 'org.spongepowered.mixin'
  99. mixin {
  100. add sourceSets.main, "${modid}.refmap.json"
  101. }