123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195 |
- buildscript {
- repositories {
- maven { url = 'https://maven.minecraftforge.net/' }
- maven { url = 'https://maven.parchmentmc.org' }
- mavenCentral()
- }
- dependencies {
- classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
- classpath 'org.parchmentmc:librarian:1.+'
- }
- }
- apply plugin: 'java'
- apply plugin: 'idea'
- apply plugin: 'net.minecraftforge.gradle'
- apply plugin: 'org.parchmentmc.librarian.forgegradle'
- apply plugin: 'maven-publish'
- apply plugin: 'eclipse'
- version = (hasProperty("CIRevision") ? CIRevision : mod_version)
- group = group_name
- archivesBaseName = "${mod_id}-${minecraft_sub_version}"
- java.toolchain.languageVersion = JavaLanguageVersion.of(17)
- compileJava.options.compilerArgs << "-Xlint:all,-classfile,-processing,-deprecation" << "-Werror"
- minecraft {
- //mappings channel: "official", version: "1.19.4"
- // https://ldtteam.jfrog.io/ui/native/parchmentmc-public/org/parchmentmc/data
- mappings channel: 'parchment', version: '1.19.3-2023.03.12-1.19.4'
- //version = minecraft_version + "-" + forge_version // grab latest forge
- //makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
- accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
- runs {
- client {
- workingDirectory project.file('run')
- property 'forge.logging.markers', 'REGISTRIES'
- property 'forge.logging.console.level', 'debug'
- property 'fml.earlyprogresswindow', 'false'
- property 'mixin.env.disableRefMap', 'true'
- mods {
- twilightforest {
- source sourceSets.main
- }
- }
- }
- server {
- workingDirectory project.file('run')
- property 'forge.logging.console.level', 'debug'
- property 'mixin.env.disableRefMap', 'true'
- mods {
- twilightforest {
- source sourceSets.main
- }
- }
- }
- gameTestServer {
- workingDirectory project.file('run')
- property 'forge.logging.markers', 'REGISTRIES'
- property 'forge.logging.console.level', 'debug'
- property 'forge.enabledGameTestNamespaces', 'twilightforest'
- mods {
- twilightforest {
- source sourceSets.main
- }
- }
- }
- data {
- workingDirectory project.file('run')
- properties 'fml.earlyprogresswindow': 'false'
- property 'mixin.env.disableRefMap', 'true'
- mods {
- twilightforest {
- source sourceSets.main
- }
- }
- args '--mod', 'twilightforest', '--all',
- '--existing', '"' + file('src/main/resources/') + '"',
- '--existing', '"' + file('src/generated/resources/') + '"',
- '--output', '"' + file('src/generated/resources/') + '"'
- }
- }
- }
- sourceSets.main.resources {
- srcDir 'src/generated/resources'
- }
- compileJava {
- options.encoding = 'UTF-8'
- }
- jar {
- classifier = 'universal'
- manifest {
- attributes(["Specification-Title" : "Twilight Forest",
- "Specification-Vendor" : "TeamTwilight",
- "Specification-Version" : "${version}",
- "Implementation-Title" : project.name,
- "Implementation-Version" : "${version}",
- "Implementation-Vendor" : "TeamTwilight",
- "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")],)
- }
- }
- repositories {
- maven {
- name 'Jared\'s Maven' // JEI
- url 'https://maven.blamejared.com/'
- }
- maven {
- name 'tterrag\'s Maven' // CTM
- url 'https://maven.tterrag.com/'
- }
- maven {
- name 'theillusivec4\'s Maven' // Curios
- url 'https://maven.theillusivec4.top/'
- }
- maven {
- name 'Tama\'s Maven' // Cross-Dim Commands
- url "https://maven.tamaized.com/releases"
- }
- maven {
- name 'Curseforge Maven' // Jade
- url "https://www.cursemaven.com"
- content {
- includeGroup "curse.maven"
- }
- }
- }
- dependencies {
- // jared
- implementation fg.deobf("mezz.jei:jei-${project.minecraft_sub_version}-forge:${jei_version}")
- // tterrag
- //implementation fg.deobf("team.chisel.ctm:CTM:${minecraft_version}-${ctm_version}")
- // theillusivec4
- implementation fg.deobf("top.theillusivec4.curios:curios-forge:${project.minecraft_sub_version}-${curios_version}")
- //curse maven
- implementation fg.deobf("curse.maven:jade-324717:4439089-api-4439091")
- //runtimeOnly fg.deobf("curse.maven:just-enough-effect-descriptions-jeed-532286:3944903")
- compileOnly fg.deobf("curse.maven:the-one-probe-245211:4442439")
- //mods we dont have compat with but are nice to have
- //runtimeOnly fg.deobf("team-twilight:crossdimcommands:${project.minecraft_sub_version}-1.0")
- minecraft "net.minecraftforge:forge:${project.minecraft_sub_version}-${project.forge_version}"
- }
- jar.finalizedBy('reobfJar')
- publishing {
- publications {
- mavenJava(MavenPublication) {
- afterEvaluate {
- artifact project.jar
- artifact project.sourceJar
- }
- setGroupId 'teamtwilight'
- setArtifactId project.mod_id
- }
- }
- repositories {
- maven {
- //url "file:///${project.projectDir}/mcmodsrepo"
- url "https://modmaven.dev:443/artifactory/local-releases"
- credentials {
- username System.getenv('ARTIFACTORY_USER')
- password System.getenv('ARTIFACTORY_PASS')
- }
- }
- }
- }
- task sourceJar(type: Jar, dependsOn: 'classes') {
- from sourceSets.main.allSource
- classifier = 'sources'
- }
|