Beautify version comparisons

This commit is contained in:
FlorianMichael 2024-04-28 18:54:38 +02:00
parent 1f047f0a84
commit d19e57a98e
No known key found for this signature in database
GPG Key ID: C2FB87E71C425126

View File

@ -110,7 +110,7 @@ subprojects {
} }
dependencies { dependencies {
if (versionId >= 1171) { if (versionId >= 1_17_1) {
// Minecraft 1.17+ already includes slf4j, so we don't need to include it // Minecraft 1.17+ already includes slf4j, so we don't need to include it
compileOnly "org.slf4j:slf4j-api:${slf4j_version}" compileOnly "org.slf4j:slf4j-api:${slf4j_version}"
} else { } else {
@ -147,7 +147,7 @@ subprojects {
} }
java { java {
if (versionId >= 1171) { if (versionId >= 1_17_1) {
// Minecraft 1.17+ required Java 16/17 to compile // Minecraft 1.17+ required Java 16/17 to compile
toolchain.languageVersion = JavaLanguageVersion.of(17) toolchain.languageVersion = JavaLanguageVersion.of(17)
} }
@ -162,11 +162,11 @@ subprojects {
exclude("META-INF/maven/**") exclude("META-INF/maven/**")
exclude("META-INF/versions/**") exclude("META-INF/versions/**")
if (versionId >= 1132) { if (versionId >= 1_13_2) {
// We don't need to package mixins into Forge 1.13+ jars, since Forge already has it // We don't need to package mixins into Forge 1.13+ jars, since Forge already has it
exclude("org/spongepowered/**") exclude("org/spongepowered/**")
} }
if (versionId >= 1165) { if (versionId >= 1_16_5) {
// Get rid of the services folder, since Forge 1.16+ would conflict with some of the ForgeDev Environment's services // Get rid of the services folder, since Forge 1.16+ would conflict with some of the ForgeDev Environment's services
// And since we don't need them for Mixins anyway, we can just exclude them from the shadowJar // And since we don't need them for Mixins anyway, we can just exclude them from the shadowJar
exclude("META-INF/services/**") exclude("META-INF/services/**")