9
0
mirror of https://github.com/WiIIiam278/HuskSync.git synced 2025-12-19 14:59:21 +00:00

build: Use multi-version and preprocessor to build all target versions from one branch (#463)

* feat: convert Fabric to use essential-multi-version

* fix: populate compatibility.yml with mc version

* feat: start WIP work on doing the same for bukkit

* refactor: use preprocessor plugin to multi-version bukkit

* docs: update README to mention multi-version stuff

* build: also include javadocs for Bukkit

* build: update CI workflows

also slightly simplifies buildscript
This commit is contained in:
William
2025-03-05 16:52:21 +00:00
committed by GitHub
parent 1ff4cab88d
commit be6bebe361
46 changed files with 594 additions and 398 deletions

View File

@@ -1,14 +1,50 @@
pluginManagement {
repositories {
gradlePluginPortal()
maven { url 'https://repo.william278.net/releases' }
maven { url 'https://maven.fabricmc.net/' }
maven { url 'https://maven.architectury.dev/' }
maven { url 'https://maven.minecraftforge.net' }
maven { url 'https://repo.essential.gg/repository/maven-public' }
}
plugins {
def egtVersion = "0.6.5"
id("gg.essential.defaults") version egtVersion
id("gg.essential.multi-version.root") version egtVersion
}
}
// Common
rootProject.name = 'HuskSync'
include(
'common',
'bukkit',
'paper',
'fabric'
)
include("common")
// Bukkit
include("bukkit")
project(":bukkit").with {
projectDir = file("bukkit/")
buildFileName = "root.gradle"
}
file('bukkit').listFiles((FileFilter) ((File file) -> file.isDirectory() && file.name ==~ /(\d+)\.(\d+)(\.(\d+))?/)).each {
include("bukkit:$it.name")
project(":bukkit:$it.name").with {
projectDir = file("bukkit/${it.name}")
buildFileName = '../build.gradle'
}
}
// Fabric
include("fabric")
project(":fabric").with {
projectDir = file("fabric/")
buildFileName = "root.gradle"
}
file('fabric').listFiles((FileFilter) ((File file) -> file.isDirectory() && file.name ==~ /(\d+)\.(\d+)(\.(\d+))?/)).each {
include("fabric:$it.name")
project(":fabric:$it.name").with {
projectDir = file("fabric/${it.name}")
buildFileName = '../build.gradle'
}
}