Advertisement
Scouter456

Untitled

Aug 20th, 2023
1,155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Groovy 4.63 KB | None | 0 0
  1. buildscript {
  2.     repositories {
  3.         maven { url = 'https://maven.minecraftforge.net' }
  4.         maven { url = 'https://maven.parchmentmc.org'}
  5.  
  6.         mavenCentral()
  7.     }
  8.     dependencies {
  9.         classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
  10.         classpath 'org.parchmentmc:librarian:1.+'
  11.  
  12.     }
  13. }
  14. plugins {
  15.     id 'eclipse'
  16.     id 'maven-publish'
  17. }
  18. apply plugin: 'net.minecraftforge.gradle'
  19. apply plugin: 'org.parchmentmc.librarian.forgegradle'
  20.  
  21.  
  22. version = '1.4.0.3'
  23. group = 'com.peeko32213.unusualprehistory'
  24. archivesBaseName = 'unusualprehistory'
  25.  
  26. java.toolchain.languageVersion = JavaLanguageVersion.of(17)
  27.  
  28. println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}"
  29. minecraft {
  30.     mappings channel: 'parchment', version: '2022.11.27-1.19.2'
  31.     accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
  32.  
  33.     runs {
  34.         client {
  35.             workingDirectory project.file('run')
  36.  
  37.             property 'forge.logging.markers', 'REGISTRIES'
  38.  
  39.             property 'forge.logging.console.level', 'debug'
  40.  
  41.             property 'forge.enabledGameTestNamespaces', 'unusualprehistory'
  42.  
  43.             mods {
  44.                 unusualprehistory {
  45.                     source sourceSets.main
  46.                 }
  47.             }
  48.         }
  49.  
  50.         server {
  51.             workingDirectory project.file('run')
  52.  
  53.             property 'forge.logging.markers', 'REGISTRIES'
  54.  
  55.             property 'forge.logging.console.level', 'debug'
  56.  
  57.             property 'forge.enabledGameTestNamespaces', 'unusualprehistory'
  58.  
  59.             mods {
  60.                 unusualprehistory {
  61.                     source sourceSets.main
  62.                 }
  63.             }
  64.         }
  65.  
  66.         gameTestServer {
  67.             workingDirectory project.file('run')
  68.  
  69.             property 'forge.logging.markers', 'REGISTRIES'
  70.  
  71.             property 'forge.logging.console.level', 'debug'
  72.  
  73.             property 'forge.enabledGameTestNamespaces', 'unusualprehistory'
  74.  
  75.             mods {
  76.                 unusualprehistory {
  77.                     source sourceSets.main
  78.                 }
  79.             }
  80.         }
  81.  
  82.         data {
  83.             workingDirectory project.file('run')
  84.  
  85.             property 'forge.logging.markers', 'REGISTRIES'
  86.  
  87.             property 'forge.logging.console.level', 'debug'
  88.  
  89.             args '--mod', 'unusualprehistory', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')
  90.  
  91.             mods {
  92.                 unusualprehistory {
  93.                     source sourceSets.main
  94.                 }
  95.             }
  96.         }
  97.     }
  98. }
  99.  
  100. // Include resources generated by data generators.
  101. sourceSets.main.resources { srcDir 'src/generated/resources' }
  102.  
  103. repositories {
  104.     maven {
  105.         url 'https://dl.cloudsmith.io/public/geckolib3/geckolib/maven/'
  106.     }
  107.  
  108.     maven {// location of the maven that hosts JEI files
  109.         name = "Progwml6 maven"
  110.         url = "https://dvs1.progwml6.com/files/maven/"
  111.     }
  112.     maven {
  113.         // location of a maven mirror for JEI files, as a fallback
  114.         name = "ModMaven"
  115.         url = "https://modmaven.dev"
  116.     }
  117. }
  118.  
  119. dependencies {
  120.     minecraft 'net.minecraftforge:forge:1.19.2-43.2.17'
  121.     implementation fg.deobf('software.bernie.geckolib:geckolib-forge-1.19:3.1.39')
  122.     compileOnly(fg.deobf("mezz.jei:jei-${mc_version}-common-api:${jei_version}"))
  123.     compileOnly(fg.deobf("mezz.jei:jei-${mc_version}-forge-api:${jei_version}"))
  124.     runtimeOnly(fg.deobf("mezz.jei:jei-${mc_version}-forge:${jei_version}"))
  125. }
  126.  
  127. jar {
  128.     manifest {
  129.         attributes([
  130.                 "Specification-Title"     : "unusualprehistory",
  131.                 "Specification-Vendor"    : "Peeko32213",
  132.                 "Specification-Version"   : "1.4.0.3", // We are version 1.4.0.3 of ourselves
  133.                 "Implementation-Title"    : project.name,
  134.                 "Implementation-Version"  : project.jar.archiveVersion,
  135.                 "Implementation-Vendor"   : "unusualprehistory",
  136.                 "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
  137.         ])
  138.     }
  139. }
  140.  
  141. jar.finalizedBy('reobfJar')
  142.  
  143. publishing {
  144.     publications {
  145.         mavenJava(MavenPublication) {
  146.             artifact jar
  147.         }
  148.     }
  149.     repositories {
  150.         maven {
  151.             url "file://${project.projectDir}/mcmodsrepo"
  152.         }
  153.     }
  154. }
  155.  
  156. tasks.withType(JavaCompile).configureEach {
  157.     options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
  158. }
  159.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement