From 9e1ee41b6dc5313ae9a125cda9c31065fbc942b9 Mon Sep 17 00:00:00 2001 From: bconlon Date: Sun, 10 Nov 2024 10:33:20 -0800 Subject: [PATCH] build(version): 1.1.19->1.1.20 --- .circleci/config.yml | 2 +- .circleci/continue_config.yml | 2 +- build.gradle | 70 +++++++++++++++--------- docs/README.md | 2 + gradle.properties | 4 +- gradle/wrapper/gradle-wrapper.properties | 2 +- 6 files changed, 52 insertions(+), 30 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f9bd86c..7203918 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,7 +9,7 @@ orbs: jobs: publish: machine: - image: ubuntu-2204:2024.05.1 + image: ubuntu-2404:2024.08.1 resource_class: medium environment: _JAVA_OPTIONS: -Xmx3200m diff --git a/.circleci/continue_config.yml b/.circleci/continue_config.yml index 4e356d0..dbc41cf 100644 --- a/.circleci/continue_config.yml +++ b/.circleci/continue_config.yml @@ -6,7 +6,7 @@ orbs: jobs: build: machine: - image: ubuntu-2204:2024.05.1 + image: ubuntu-2404:2024.08.1 resource_class: medium environment: _JAVA_OPTIONS: -Xmx3200m diff --git a/build.gradle b/build.gradle index 8b214ac..ce11ebe 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ plugins { id 'eclipse' id 'idea' id 'maven-publish' - id 'net.neoforged.gradle.userdev' version "${neogradle_version}" + id 'net.neoforged.moddev' version "${moddevgradle_version}" id 'com.matthewprenger.cursegradle' version '[1.4,1.5)' id 'com.modrinth.minotaur' version '[2,3)' } @@ -21,29 +21,41 @@ base { java.toolchain.languageVersion = JavaLanguageVersion.of(21) -runs { - configureEach { - systemProperty 'forge.logging.markers', 'REGISTRIES' - systemProperty 'forge.logging.console.level', 'debug' +neoForge { + version = project.neo_version - modSource project.sourceSets.main - } + runs { + configureEach { + systemProperty 'forge.logging.markers', 'REGISTRIES' + logLevel = org.slf4j.event.Level.DEBUG + } - client { - systemProperty 'forge.enabledGameTestNamespaces', mod_id - } + client { + client() + systemProperty 'forge.enabledGameTestNamespaces', mod_id + } - server { - systemProperty 'forge.enabledGameTestNamespaces', mod_id - programArgument '--nogui' - } + server { + server() + systemProperty 'forge.enabledGameTestNamespaces', mod_id + programArgument '--nogui' + } + + gameTestServer { + type = "gameTestServer" + systemProperty 'neoforge.enabledGameTestNamespaces', mod_id + } - gameTestServer { - systemProperty 'neoforge.enabledGameTestNamespaces', mod_id + data { + data() + programArguments.addAll '--mod', mod_id, '--all', '--output', file('src/generated/resources/').getAbsolutePath(), '--existing', file('src/main/resources/').getAbsolutePath(), '--existing', file('src/generated/resources/').getAbsolutePath() + } } - data { - programArguments.addAll '--mod', mod_id, '--all', '--output', file('src/generated/resources/').getAbsolutePath(), '--existing', file('src/main/resources/').getAbsolutePath(), '--existing', file('src/generated/resources/').getAbsolutePath() + mods { + "${mod_id}" { + sourceSet(sourceSets.main) + } } } @@ -51,9 +63,15 @@ sourceSets.main.resources { srcDir 'src/generated/resources' } -dependencies { - implementation "net.neoforged:neoforge:${project.neo_version}" +processResources { + exclude '.cache/' +} + +configurations { + runtimeClasspath.extendsFrom localRuntime +} +dependencies { compileOnly "mezz.jei:jei-${project.minecraft_version}-common:${project.jei_version}" compileOnly "mezz.jei:jei-${project.minecraft_version}-neoforge:${project.jei_version}" @@ -69,7 +87,7 @@ repositories { maven { url = "https://maven.architectury.dev/" } } -tasks.withType(ProcessResources).configureEach { +var generateModMetadata = tasks.register("generateModMetadata", ProcessResources) { var replaceProperties = [ mod_id : mod_id, mod_name : mod_name, @@ -87,14 +105,16 @@ tasks.withType(ProcessResources).configureEach { loader_version_range : loader_version_range ] inputs.properties replaceProperties - - filesMatching(['META-INF/neoforge.mods.toml']) { - expand replaceProperties - } + expand replaceProperties + from "src/main/templates" + into "build/generated/sources/modMetadata" } +sourceSets.main.resources.srcDir generateModMetadata +neoForge.ideSyncTask generateModMetadata tasks.withType(JavaCompile).configureEach { options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation + options.compilerArgs << "-Xmaxerrs" << "9000" } tasks.register('sourceJar', Jar) { diff --git a/docs/README.md b/docs/README.md index a6d08c7..59e5c76 100644 --- a/docs/README.md +++ b/docs/README.md @@ -2,6 +2,8 @@ # Nitrogen [![Modloader: Forge](https://img.shields.io/badge/mod%20loader-forge-CC974D?style=flat-square)](https://files.minecraftforge.net/net/minecraftforge/forge/) +[![Modloader: NeoForge](https://img.shields.io/badge/mod%20loader-neoforge-E08234?style=flat-square)](https://neoforged.net/) +[![Modloader: Fabric](https://img.shields.io/badge/mod%20loader-fabric-1F6FEB?style=flat-square)](https://fabricmc.net/use/installer/) [![CircleCI](https://circleci.com/gh/The-Aether-Team/Nitrogen/tree/1.20.1-develop.svg?style=shield)](https://app.circleci.com/pipelines/github/The-Aether-Team/Nitrogen?branch=1.20.1-develop) [![Code license (LGPL v3.0)](https://img.shields.io/badge/code%20license-LGPL%20v3.0-green.svg?style=flat-square)](https://github.com/The-Aether-Team/Nitrogen/blob/1.20.1-develop/LICENSE.txt) diff --git a/gradle.properties b/gradle.properties index 5c67280..79afb74 100644 --- a/gradle.properties +++ b/gradle.properties @@ -11,7 +11,7 @@ neogradle.subsystems.parchment.mappingsVersion=2024.07.28 mod_id=nitrogen_internals mod_group=com.aetherteam.nitrogen mod_name=Nitrogen -mod_version=1.1.19 +mod_version=1.1.20 mod_license=Assets: All Rights Reserved; Code: LGPL-3.0 mod_url=https://github.com/The-Aether-Team/Nitrogen mod_tracker=https://github.com/The-Aether-Team/Nitrogen/issues @@ -22,7 +22,7 @@ mod_description=A library used for the Aether series of mods. minecraft_version=1.21.1 minecraft_version_range=[1.21.1,1.21.2) -neogradle_version=7.0.145 +moddevgradle_version=2.0.42-beta neo_version=21.1.47 neo_version_range=[21.1.47,) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 48c0a02..0d18421 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists