Added neoforged to the ci

This commit is contained in:
coolGi
2023-12-23 15:31:41 +10:30
parent c3bdc22e28
commit 091b115aad
3 changed files with 13 additions and 7 deletions
+6 -3
View File
@@ -40,17 +40,20 @@ build:
name: "NightlyBuild_${MC_VER}-${CI_COMMIT_SHORT_SHA}-${CI_COMMIT_TIMESTAMP}" name: "NightlyBuild_${MC_VER}-${CI_COMMIT_SHORT_SHA}-${CI_COMMIT_TIMESTAMP}"
paths: paths:
- Merged/*.jar - Merged/*.jar
- quilt/build/libs/*.jar
- fabric/build/libs/*.jar - fabric/build/libs/*.jar
- forge/build/libs/*.jar - forge/build/libs/*.jar
- quilt/build/libs/*.jar - neoforged/build/libs/*.jar
exclude: exclude:
# TODO: There is a lot of duplicate stuff here, try to maybe make it smaller # TODO: There is a lot of duplicate stuff here, try to maybe make it smaller
- fabric/build/libs/*-all.jar - fabric/build/libs/*-all.jar
- fabric/build/libs/*-sources.jar - fabric/build/libs/*-sources.jar
- forge/build/libs/*-all.jar
- forge/build/libs/*-sources.jar
- quilt/build/libs/*-all.jar - quilt/build/libs/*-all.jar
- quilt/build/libs/*-sources.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 expire_in: 14 days
when: always when: always
extends: .build_java extends: .build_java
+4 -3
View File
@@ -327,7 +327,7 @@ subprojects { p ->
def intoTargets = ["$buildDir/resources/main/"] // Location of the built resources folder def intoTargets = ["$buildDir/resources/main/"] // Location of the built resources folder
// Fix forge version numbering system as it is weird // 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("]", ",)") def compatible_forgemc_versions = "${compatible_minecraft_versions}".replaceAll("\"", "").replaceAll("]", ",)")
// println compatible_forgemc_versions // println compatible_forgemc_versions
@@ -409,7 +409,7 @@ subprojects { p ->
//// include "${accessWidenerVersion}.distanthorizons.accesswidener" //// include "${accessWidenerVersion}.distanthorizons.accesswidener"
// Jank solution to remove all unused accesswideners // 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 -> exclude { file ->
if (file.name.contains(".distanthorizons.accesswidener") && file.name != "${accessWidenerVersion}.distanthorizons.accesswidener") { if (file.name.contains(".distanthorizons.accesswidener") && file.name != "${accessWidenerVersion}.distanthorizons.accesswidener") {
return true return true
@@ -455,7 +455,7 @@ subprojects { p ->
} }
allprojects { 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 // Useful later on so we dont have duplicated code
def isMinecraftSubProject = p != project(":core") && p != project(":api") def isMinecraftSubProject = p != project(":core") && p != project(":api")
@@ -536,6 +536,7 @@ allprojects { p ->
includeGroup "forge-mod" 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 // Adds some dependencies that are in vanilla but not in core
+3 -1
View File
@@ -88,7 +88,9 @@ project(":api").projectDir = file('coreSubProjects/api')
include("common") include("common")
// Enables or disables the subprojects depending on whats in the versionProperties/mcVer.properties // Enables or disables the subprojects depending on whats in the versionProperties/mcVer.properties
for (loader in ((String) gradle.builds_for).split(",")) { 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")) //if (gradle.builds_for.contains("fabric") || gradle.builds_for.contains("quilt"))
// include("fabricLike") // include("fabricLike")