Advertisement
Guest User

Untitled

a guest
Jul 6th, 2019
396
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.81 KB | None | 0 0
  1. buildscript {
  2. repositories {
  3. jcenter()
  4. maven {
  5. url = "http://files.minecraftforge.net/maven"
  6. }
  7.  
  8. maven {
  9. name = 'sponge'
  10. url = 'http://repo.spongepowered.org/maven'
  11. }
  12.  
  13. }
  14. dependencies {
  15. classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
  16. classpath 'org.spongepowered:mixingradle:0.6-SNAPSHOT'
  17. }
  18. }
  19.  
  20.  
  21. apply plugin: 'net.minecraftforge.gradle.forge'
  22. apply plugin: 'org.spongepowered.mixin'
  23. //Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
  24.  
  25. repositories {
  26. mavenLocal()
  27. mavenCentral()
  28. maven {
  29. name = 'sponge'
  30. url = 'http://repo.spongepowered.org/maven'
  31. }
  32. }
  33.  
  34. configurations {
  35. embed
  36. compile.extendsFrom(embed)
  37. }
  38.  
  39. dependencies {
  40. embed('org.spongepowered:mixin:0.7.8-SNAPSHOT') {
  41. exclude module: 'asm-commons'
  42. exclude module: 'asm-tree'
  43. exclude module: 'launchwrapper'
  44. exclude module: 'guava'
  45. exclude module: 'log4j-core'
  46. }
  47. }
  48.  
  49. // Gradle default tasks
  50. defaultTasks 'build', 'install'
  51.  
  52.  
  53. //Project Information
  54. version = "0.1.0"
  55. group = "com.saomod.main"
  56. archivesBaseName = "saomod"
  57.  
  58.  
  59.  
  60.  
  61. sourceCompatibility = targetCompatibility = '1.8'
  62. compileJava {
  63. sourceCompatibility = targetCompatibility = '1.8'
  64. }
  65.  
  66. minecraft {
  67. version = "1.12.2-14.23.5.2768"
  68. runDir = "run"
  69.  
  70. mappings = "snapshot_20171003"
  71. }
  72.  
  73.  
  74. processResources {
  75. // this will ensure that this task is redone when the versions change.
  76. inputs.property "version", project.version
  77. inputs.property "mcversion", project.minecraft.version
  78.  
  79. from('src/main/resources/mcmod.info'){
  80.  
  81. expand 'modid': archivesBaseName,
  82. 'name': "Sword Art Online",
  83. 'version': version,
  84. 'mcversion': minecraft.version
  85.  
  86. }
  87.  
  88. }
  89.  
  90. mixin{
  91.  
  92. defaultObfuscationEnv searge
  93. }
  94.  
  95. jar{
  96.  
  97. manifest {
  98. attributes "FMLCorePlugin": "com.saomod.core.SAOFMLPlugin",
  99. "FMLCorePluginContainsFMLMod": true,
  100. "ForceLoadAsMod": true,
  101. "TweakClass": "org.spongepowered.asm.launch.MixinTweaker",
  102. "TweakOrder": 0,
  103. "MixinConfigs": "mixins.saomod.json"
  104. }
  105.  
  106. from configurations.embed.collect { it.isDirectory() ? it : zipTree(it) }
  107.  
  108. }
  109.  
  110.  
  111. task javadocJar(type: Jar, dependsOn: javadoc) {
  112. classifier = 'javadoc'
  113. from 'build/docs/javadoc'
  114. }
  115.  
  116. // Source JAR generation
  117. task sourcesJar(type: Jar) {
  118. classifier = 'sources'
  119. from sourceSets.main.java.srcDirs
  120. }
  121.  
  122. // Create a JAR based on deobfuscated code
  123. task deobfJar(type: Jar) {
  124. manifest.from jar.manifest
  125. from sourceSets.main.output
  126. classifier = 'dev'
  127. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement