Guest User

Untitled

a guest
Jul 25th, 2020
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.67 KB | None | 0 0
  1. buildscript {
  2. repositories {
  3. maven { url = 'https://files.minecraftforge.net/maven' }
  4. jcenter()
  5. mavenCentral()
  6. }
  7. dependencies {
  8. classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
  9. }
  10. }
  11. apply plugin: 'net.minecraftforge.gradle'
  12. // Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
  13. apply plugin: 'eclipse'
  14. apply plugin: 'maven-publish'
  15.  
  16. version = '1.0.0'
  17. group = 'com.pickleface.ruby' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
  18. archivesBaseName = 'ruby'
  19.  
  20. sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
  21.  
  22. println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch'))
  23. minecraft {
  24. // The mappings can be changed at any time, and must be in the following format.
  25. // snapshot_YYYYMMDD Snapshot are built nightly.
  26. // stable_# Stables are built at the discretion of the MCP team.
  27. // Use non-default mappings at your own risk. they may not always work.
  28. // Simply re-run your setup task after changing the mappings to update your workspace.
  29. mappings channel: 'snapshot', version: '20200723-1.16.1'
  30. // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
  31.  
  32. // accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
  33.  
  34. // Default run configurations.
  35. // These can be tweaked, removed, or duplicated as needed.
  36. runs {
  37. client {
  38. workingDirectory project.file('run')
  39.  
  40. // Recommended logging data for a userdev environment
  41. property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
  42.  
  43. // Recommended logging level for the console
  44. property 'forge.logging.console.level', 'debug'
  45.  
  46. mods {
  47. examplemod {
  48. source sourceSets.main
  49. }
  50. }
  51. }
  52.  
  53. server {
  54. workingDirectory project.file('run')
  55.  
  56. // Recommended logging data for a userdev environment
  57. property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
  58.  
  59. // Recommended logging level for the console
  60. property 'forge.logging.console.level', 'debug'
  61.  
  62. mods {
  63. examplemod {
  64. source sourceSets.main
  65. }
  66. }
  67. }
  68.  
  69. data {
  70. workingDirectory project.file('run')
  71.  
  72. // Recommended logging data for a userdev environment
  73. property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
  74.  
  75. // Recommended logging level for the console
  76. property 'forge.logging.console.level', 'debug'
  77.  
  78. args '--mod', 'examplemod', '--all', '--output', file('src/generated/resources/')
  79.  
  80. mods {
  81. examplemod {
  82. source sourceSets.main
  83. }
  84. }
  85. }
  86. }
  87. }
  88.  
  89. dependencies {
  90. // Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed
  91. // that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied.
  92. // The userdev artifact is a special name and will get all sorts of transformations applied to it.
  93. minecraft 'net.minecraftforge:forge:1.16.1-32.0.75'
  94.  
  95. // You may put jars on which you depend on in ./libs or you may define them like so..
  96. // compile "some.group:artifact:version:classifier"
  97. // compile "some.group:artifact:version"
  98.  
  99. // Real examples
  100. // compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env
  101. // compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env
  102.  
  103. // The 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime.
  104. // provided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
  105.  
  106. // These dependencies get remapped to your current MCP mappings
  107. // deobf 'com.mod-buildcraft:buildcraft:6.0.8:dev'
  108.  
  109. // For more info...
  110. // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
  111. // http://www.gradle.org/docs/current/userguide/dependency_management.html
  112.  
  113. }
  114.  
  115. // Example for how to get properties into the manifest for reading by the runtime..
  116. jar {
  117. manifest {
  118. attributes([
  119. "Specification-Title": "examplemod",
  120. "Specification-Vendor": "examplemodsareus",
  121. "Specification-Version": "1", // We are version 1 of ourselves
  122. "Implementation-Title": project.name,
  123. "Implementation-Version": "${version}",
  124. "Implementation-Vendor" :"examplemodsareus",
  125. "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
  126. ])
  127. }
  128. }
  129.  
  130. // Example configuration to allow publishing using the maven-publish task
  131. // This is the preferred method to reobfuscate your jar file
  132. jar.finalizedBy('reobfJar')
  133. // However if you are in a multi-project build, dev time needs unobfed jar files, so you can delay the obfuscation until publishing by doing
  134. //publish.dependsOn('reobfJar')
  135.  
  136. publishing {
  137. publications {
  138. mavenJava(MavenPublication) {
  139. artifact jar
  140. }
  141. }
  142. repositories {
  143. maven {
  144. url "file:///${project.projectDir}/mcmodsrepo"
  145. }
  146. }
  147. }
Advertisement
Add Comment
Please, Sign In to add comment