From 091b115aada5db9da3eb5171ae952dcf47fca7ac Mon Sep 17 00:00:00 2001 From: coolGi Date: Sat, 23 Dec 2023 15:31:41 +1030 Subject: [PATCH] Added neoforged to the ci --- .gitlab-ci.yml | 9 ++++++--- build.gradle | 7 ++++--- settings.gradle | 4 +++- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8097c0218..86f1e2fb7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -40,17 +40,20 @@ build: name: "NightlyBuild_${MC_VER}-${CI_COMMIT_SHORT_SHA}-${CI_COMMIT_TIMESTAMP}" paths: - Merged/*.jar + - quilt/build/libs/*.jar - fabric/build/libs/*.jar - forge/build/libs/*.jar - - quilt/build/libs/*.jar + - neoforged/build/libs/*.jar exclude: # TODO: There is a lot of duplicate stuff here, try to maybe make it smaller - fabric/build/libs/*-all.jar - fabric/build/libs/*-sources.jar - - forge/build/libs/*-all.jar - - forge/build/libs/*-sources.jar - quilt/build/libs/*-all.jar - quilt/build/libs/*-sources.jar + - forge/build/libs/*-all.jar + - forge/build/libs/*-sources.jar + - neoforged/build/libs/*-all.jar + - neoforged/build/libs/*-sources.jar expire_in: 14 days when: always extends: .build_java diff --git a/build.gradle b/build.gradle index 9a8144508..e9470acbb 100644 --- a/build.gradle +++ b/build.gradle @@ -327,7 +327,7 @@ subprojects { p -> def intoTargets = ["$buildDir/resources/main/"] // Location of the built resources folder // Fix forge version numbering system as it is weird - // For whatever reason forge uses [1.18, 1.18.1, 1.18.2) instead of the standard ["1.18", "1.18.1", "1.18.2"] which make more sense + // For whatever reason forge uses [1.18, 1.18.1, 1.18.2) instead of the standard ["1.18", "1.18.1", "1.18.2"] def compatible_forgemc_versions = "${compatible_minecraft_versions}".replaceAll("\"", "").replaceAll("]", ",)") // println compatible_forgemc_versions @@ -409,7 +409,7 @@ subprojects { p -> //// include "${accessWidenerVersion}.distanthorizons.accesswidener" // Jank solution to remove all unused accesswideners - // The line above would work..., except forge requires the original accesswidener file, meaning we require this jank solution to keep it + // The line above would work..., except that (neo)forge (well, mainly architectury) requires the original accesswidener file, meaning we require this jank solution to keep it exclude { file -> if (file.name.contains(".distanthorizons.accesswidener") && file.name != "${accessWidenerVersion}.distanthorizons.accesswidener") { return true @@ -455,7 +455,7 @@ subprojects { p -> } allprojects { p -> - // Does the same as "p == project(":common") || p == project(":fabric") || p == project(":quilt") || p == project(":forge")" + // Does the same as "p == project(":common") || p == project(":fabric") || p == project(":quilt") || p == project(":forge") || p == project("WhateverWeAddLaterOn")" // Useful later on so we dont have duplicated code def isMinecraftSubProject = p != project(":core") && p != project(":api") @@ -536,6 +536,7 @@ allprojects { p -> includeGroup "forge-mod" } } + // TODO: If neoforged is ever needed, should we use that, or call it a forge mod? } // Adds some dependencies that are in vanilla but not in core diff --git a/settings.gradle b/settings.gradle index 393a31af1..69a4656fc 100644 --- a/settings.gradle +++ b/settings.gradle @@ -88,7 +88,9 @@ project(":api").projectDir = file('coreSubProjects/api') include("common") // Enables or disables the subprojects depending on whats in the versionProperties/mcVer.properties for (loader in ((String) gradle.builds_for).split(",")) { - include(loader.strip()) // Strip it in case a space is added before or after the comma + def l = loader.strip() // Strip it in case a space is added before or after the comma + println "Adding loader " + l + include(l) } //if (gradle.builds_for.contains("fabric") || gradle.builds_for.contains("quilt")) // include("fabricLike")