Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.56 KB | None | 0 0
  1. buildscript {
  2. repositories {
  3. jcenter()
  4. maven { url = 'https://files.minecraftforge.net/maven' }
  5. maven { url = 'https://repo.spongepowered.org/maven' }
  6. maven { url = 'https://plugins.gradle.org/m2' }
  7. }
  8. dependencies {
  9. classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
  10. classpath 'org.spongepowered:mixingradle:0.6-SNAPSHOT'
  11. classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.4'
  12. }
  13. }
  14. apply plugin: 'net.minecraftforge.gradle.forge'
  15. apply plugin: 'org.spongepowered.mixin'
  16. apply plugin: 'com.github.johnrengelman.shadow'
  17. //Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
  18.  
  19.  
  20. version = '1.0'
  21. group = 'matyk.aqarium2' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
  22. archivesBaseName = 'aqarium2'
  23.  
  24. sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
  25. compileJava {
  26. sourceCompatibility = targetCompatibility = '1.8'
  27. }
  28.  
  29. minecraft {
  30. version = '1.12.2-14.23.5.2847'
  31. runDir = 'run'
  32. coreMod = 'matyk.aqarium2.mixincode.AqariumLoadingPlugin'
  33. // the mappings can be changed at any time, and must be in the following format.
  34. // snapshot_YYYYMMDD snapshot are built nightly.
  35. // stable_# stables are built at the discretion of the MCP team.
  36. // Use non-default mappings at your own risk. they may not always work.
  37. // simply re-run your setup task after changing the mappings to update your workspace.
  38. mappings = 'stable_39'
  39. // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
  40. }
  41.  
  42. jar.manifest.attributes(
  43. 'FMLCorePluginContainsFMLMod': true,
  44. 'FMLCorePlugin': 'matyk.aqarium2.mixincode.AqariumLoadingPlugin',
  45. 'ForceLoadAsMod': true,
  46. 'TweakClass': 'org.spongepowered.asm.launch.MixinTweaker'
  47. )
  48.  
  49. repositories {
  50. mavenCentral()
  51. maven { url = 'https://repo.spongepowered.org/maven' }
  52. }
  53.  
  54. dependencies {
  55.  
  56. compile fileTree(include: ['*.jar'], dir: 'libs')
  57.  
  58. // you may put jars on which you depend on in ./libs
  59. // or you may define them like so..
  60. //compile 'some.group:artifact:version:classifier'
  61. //compile 'some.group:artifact:version'
  62.  
  63. // real examples
  64. //compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env
  65. //compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env
  66.  
  67. // the 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime.
  68. //provided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
  69.  
  70. // the deobf configurations: 'deobfCompile' and 'deobfProvided' are the same as the normal compile and provided,
  71. // except that these dependencies get remapped to your current MCP mappings
  72. //deobfCompile 'com.mod-buildcraft:buildcraft:6.0.8:dev'
  73. //deobfProvided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
  74.  
  75. // for more info...
  76. // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
  77. // http://www.gradle.org/docs/current/userguide/dependency_management.html
  78.  
  79. compile('org.spongepowered:mixin:0.7.11-SNAPSHOT') {
  80. exclude module: 'asm-commons'
  81. exclude module: 'asm-tree'
  82. exclude module: 'launchwrapper'
  83. exclude module: 'guava'
  84. exclude module: 'log4j-core'
  85. exclude module: 'gson'
  86. exclude module: 'commons-io'
  87. }
  88. }
  89.  
  90. mixin {
  91. add sourceSets.main, 'mixins.aqarium2.refmap.json'
  92. }
  93.  
  94. shadowJar {
  95. exclude 'dummyThing'
  96. exclude 'LICENSE.txt'
  97. exclude 'libs/*.jar'
  98.  
  99. dependencies {
  100. include(dependency('org.spongepowered:mixin'))
  101. }
  102.  
  103. classifier = ''
  104. }
  105.  
  106. build.dependsOn(shadowJar)
  107.  
  108. reobf {
  109. shadowJar {
  110. mappingType = 'SEARGE'
  111. classpath = sourceSets.main.compileClasspath
  112. }
  113. }
  114.  
  115. processResources {
  116. // this will ensure that this task is redone when the versions change.
  117. inputs.property 'version', project.version
  118. inputs.property 'mcversion', project.minecraft.version
  119.  
  120. // replace stuff in mcmod.info, nothing else
  121. from(sourceSets.main.resources.srcDirs) {
  122. include 'mcmod.info'
  123.  
  124. // replace version and mcversion
  125. expand 'version':project.version, 'mcversion':project.minecraft.version
  126. }
  127.  
  128. // copy everything else except the mcmod.info
  129. from(sourceSets.main.resources.srcDirs) {
  130. exclude 'mcmod.info'
  131. }
  132. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement