jayhillx

build.gradle

May 31st, 2022 (edited)
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.96 KB | None | 0 0
  1. buildscript {
  2. repositories {
  3. maven { url = 'https://maven.minecraftforge.net' }
  4. maven { url = 'https://repo.spongepowered.org/repository/maven-public/' }
  5. }
  6. dependencies {
  7. classpath(group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true) { exclude group: 'org.apache.log4j' }
  8. classpath 'org.spongepowered:mixingradle:0.7-SNAPSHOT'
  9. }
  10. }
  11.  
  12. plugins {
  13. id 'eclipse'
  14. id 'maven-publish'
  15. }
  16. apply plugin: 'net.minecraftforge.gradle'
  17. apply plugin: 'org.spongepowered.mixin'
  18.  
  19. version = '1.18.2-1.0'
  20. group = 'com.mysticsbiomes'
  21. archivesBaseName = 'mysticsbiomes'
  22.  
  23. java.toolchain.languageVersion = JavaLanguageVersion.of(17)
  24.  
  25. println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}"
  26. minecraft {
  27. mappings channel: 'official', version: '1.18.2'
  28. accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
  29.  
  30. runs {
  31. client {
  32. workingDirectory project.file('run')
  33. property 'forge.logging.markers', 'REGISTRIES'
  34. property 'forge.logging.console.level', 'debug'
  35. property 'forge.enabledGameTestNamespaces', 'mysticsbiomes'
  36.  
  37. mods {
  38. mysticsbiomes {
  39. source sourceSets.main
  40. }
  41. }
  42. }
  43.  
  44. data {
  45. workingDirectory project.file('run')
  46. property 'forge.logging.markers', 'REGISTRIES'
  47. property 'forge.logging.console.level', 'debug'
  48. args '--mod', 'mysticsbiomes', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')
  49.  
  50. mods {
  51. mysticsbiomes {
  52. source sourceSets.main
  53. }
  54. }
  55. }
  56. }
  57. }
  58.  
  59. sourceSets.main.resources {
  60. srcDir 'src/generated/resources'
  61. }
  62.  
  63. dependencies {
  64. minecraft 'net.minecraftforge:forge:1.18.2-40.1.0'
  65.  
  66. implementation fg.deobf('com.github.glitchfiend:TerraBlender-forge:1.18.2-1.1.0.101')
  67. }
  68.  
  69. jar {
  70. manifest {
  71. attributes([
  72. "Specification-Title" : project.name,
  73. "Specification-Vendor" : "jay",
  74. "Specification-Version" : "1",
  75. "Implementation-Title" : project.name,
  76. "Implementation-Version" : project.jar.archiveVersion,
  77. "Implementation-Vendor" : "jay",
  78. "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
  79. ])
  80. }
  81. }
  82.  
  83. jar.finalizedBy('reobfJar')
  84.  
  85. publishing {
  86. publications {
  87. mavenJava(MavenPublication) {
  88. artifact jar
  89. }
  90. }
  91. repositories {
  92. maven {
  93. url "file://${project.projectDir}/mcmodsrepo"
  94. }
  95. }
  96. }
  97.  
  98. tasks.withType(JavaCompile).configureEach {
  99. options.encoding = 'UTF-8'
  100. }
Add Comment
Please, Sign In to add comment