Advertisement
Elrol

Untitled

Mar 8th, 2021
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.66 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.  
  12. apply plugin: 'net.minecraftforge.gradle'
  13. // Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
  14. apply plugin: 'eclipse'
  15. apply plugin: 'maven-publish'
  16.  
  17. version = '1.0'
  18. group = 'dev.elrol.blutechmecha' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
  19. archivesBaseName = 'blutechmecha'
  20.  
  21. sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
  22.  
  23. println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch'))
  24. minecraft {
  25. mappings channel: 'snapshot', version: '20201028-1.16.3'
  26. runs {
  27. client {
  28. workingDirectory project.file('run')
  29. property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
  30. property 'forge.logging.console.level', 'debug'
  31. mods {
  32. blutechmecha {
  33. source sourceSets.main
  34. }
  35. }
  36. }
  37. server {
  38. workingDirectory project.file('run')
  39. property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
  40. property 'forge.logging.console.level', 'debug'
  41. mods {
  42. blutechmecha {
  43. source sourceSets.main
  44. }
  45. }
  46. }
  47. data {
  48. workingDirectory project.file('run')
  49. property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
  50. property 'forge.logging.console.level', 'debug'
  51. args '--mod', 'blutechmecha', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')
  52. mods {
  53. blutechmecha {
  54. source sourceSets.main
  55. }
  56. }
  57. }
  58. }
  59. }
  60.  
  61. sourceSets.main.resources { srcDir 'src/generated/resources' }
  62.  
  63. repositories {
  64. mavenLocal()
  65. }
  66.  
  67. dependencies {
  68. minecraft 'net.minecraftforge:forge:1.16.4-35.1.37'
  69. // compile files("libs/Blutech-Materials-1.0.1.jar")
  70. compile fg.deobf('dev.elrol:blutech:1.0.1')
  71. }
  72.  
  73. // Example for how to get properties into the manifest for reading by the runtime..
  74. jar {
  75. manifest {
  76. attributes([
  77. "Specification-Title": "blutechmecha",
  78. "Specification-Vendor": "blutechmecha",
  79. "Specification-Version": "1", // We are version 1 of ourselves
  80. "Implementation-Title": project.name,
  81. "Implementation-Version": "${version}",
  82. "Implementation-Vendor" :"blutechmecha",
  83. "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
  84. ])
  85. }
  86. }
  87.  
  88. // Example configuration to allow publishing using the maven-publish task
  89. // This is the preferred method to reobfuscate your jar file
  90. jar.finalizedBy('reobfJar')
  91. // 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
  92. //publish.dependsOn('reobfJar')
  93.  
  94. publishing {
  95. publications {
  96. mavenJava(MavenPublication) {
  97. artifact jar
  98. }
  99. }
  100. repositories {
  101. maven {
  102. url "file:///${project.projectDir}/mcmodsrepo"
  103. }
  104. }
  105. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement