Skip to content

Commit 59f7f46

Browse files
committed
Merge branch 'version/7.4.x'
2 parents ed4a31a + b6c1a8c commit 59f7f46

147 files changed

Lines changed: 2118 additions & 8673 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

build-logic/src/main/kotlin/buildlogic.adapter-mojmap.gradle.kts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,10 @@ plugins {
88
paperweight {
99
reobfArtifactConfiguration = ReobfArtifactConfiguration.MOJANG_PRODUCTION
1010
}
11+
12+
tasks
13+
.withType<JavaCompile>()
14+
.matching { it.name == "compileJava" || it.name == "compileTestJava" }
15+
.configureEach {
16+
options.release.set(25)
17+
}

build-logic/src/main/kotlin/buildlogic.adapter-reobf.gradle.kts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,24 @@ plugins {
66

77
paperweight {
88
reobfArtifactConfiguration = ReobfArtifactConfiguration.REOBF_PRODUCTION
9+
javaLauncher = javaToolchains.launcherFor {
10+
languageVersion = JavaLanguageVersion.of(21)
11+
}
912
}
1013

1114
tasks.named("assemble") {
1215
dependsOn("reobfJar")
1316
}
17+
18+
java {
19+
// Required when we de-sync release option and declared Java versions.
20+
disableAutoTargetJvm()
21+
}
22+
23+
tasks
24+
.withType<JavaCompile>()
25+
.matching { it.name == "compileJava" || it.name == "compileTestJava" }
26+
.configureEach {
27+
// We use Java 21 for most of the pre-existing adapters.
28+
options.release.set(21)
29+
}

build-logic/src/main/kotlin/buildlogic.adapter.gradle.kts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,6 @@ plugins {
99
id("io.papermc.paperweight.userdev")
1010
}
1111

12-
java {
13-
// Required when we de-sync release option and declared Java versions.
14-
disableAutoTargetJvm()
15-
}
16-
17-
tasks
18-
.withType<JavaCompile>()
19-
.matching { it.name == "compileJava" || it.name == "compileTestJava" }
20-
.configureEach {
21-
// We use Java 21 for most of the pre-existing adapters.
22-
options.release.set(21)
23-
}
24-
2512
repositories {
2613
maven {
2714
name = "Minecraft Libraries"

build-logic/src/main/kotlin/buildlogic.common-java.gradle.kts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@ tasks
1414
.withType<JavaCompile>()
1515
.matching { it.name == "compileJava" || it.name == "compileTestJava" }
1616
.configureEach {
17-
// TODO: re-enable this-escape when ANTLR suppresses it properly
1817
val disabledLint = listOf(
19-
"processing", "path", "fallthrough", "serial", "overloads", "this-escape",
18+
"processing", "path", "fallthrough", "serial", "overloads",
2019
)
2120
options.release.set(25)
2221
options.compilerArgs.addAll(listOf("-Xlint:all") + disabledLint.map { "-Xlint:-$it" })
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// "Publish" (only to local projects) a resources variant for other projects to consume
2+
configurations.consumable("resourcesVariant") {
3+
// Similar to mainSourceElements
4+
attributes {
5+
attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category::class, Category.VERIFICATION))
6+
attribute(Bundling.BUNDLING_ATTRIBUTE, objects.named(Bundling::class, Bundling.EXTERNAL))
7+
attribute(VerificationType.VERIFICATION_TYPE_ATTRIBUTE, objects.named(VerificationType::class, "resources"))
8+
}
9+
outgoing.artifact(tasks.named("processResources"))
10+
}

build-logic/src/main/kotlin/buildlogic.platform.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ tasks.named<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar>("shadowJ
2828
include(project(":worldedit-libs:core"))
2929
include(project(":worldedit-libs:${project.name.replace("worldedit-", "")}"))
3030
include(project(":worldedit-core"))
31+
include(project(":worldedit-core-mc"))
3132
include(dependency(jchronic))
3233
linBusDeps.forEach {
3334
include(dependency(it))

build-logic/src/main/kotlin/buildlogic/GradleExtras.kt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,5 @@ fun RepositoryHandler.addEngineHubRepository() {
3434
maven {
3535
name = "EngineHub (Non-Mirrored)"
3636
url = URI.create("https://repo.enginehub.org/libs-release/")
37-
metadataSources {
38-
mavenPom()
39-
artifact()
40-
}
4137
}
4238
}

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ errorprone-core = { module = "com.google.errorprone:error_prone_core", version.r
4848
errorprone-annotations = { module = "com.google.errorprone:error_prone_annotations", version.ref = "errorprone" }
4949

5050
# https://maven.fabricmc.net/net/fabricmc/sponge-mixin/
51-
fabric-mixin = "net.fabricmc:sponge-mixin:0.17.0+mixin.0.8.7"
51+
fabric-mixin = "net.fabricmc:sponge-mixin:0.17.1+mixin.0.8.7"
5252

5353
paperweight = "io.papermc.paperweight.userdev:io.papermc.paperweight.userdev.gradle.plugin:2.0.0-beta.21"
5454

gradle/shared-scripts/repo-reconfiguration.settings.gradle.kts

Lines changed: 47 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
// This file is responsible for reconfiguring repositories to use EngineHub's mirrors
22
// In addition, it configures content filtering to speed up dependency resolution
33

4-
import org.gradle.api.artifacts.dsl.RepositoryHandler
5-
import org.gradle.api.artifacts.repositories.UrlArtifactRepository
6-
import org.gradle.api.logging.Logging
74
import java.net.URI
85

96
data class RepositoryReconfiguration(
107
val newUri: URI,
11-
val contentConfiguration: (MavenRepositoryContentDescriptor.() -> Unit)? = null,
8+
val contentConfiguration: (MavenArtifactRepository.() -> Unit)? = null,
129
) {
13-
constructor(newUri: String, contentConfiguration: (MavenRepositoryContentDescriptor.() -> Unit)? = null) :
10+
constructor(newUri: String, contentConfiguration: (MavenArtifactRepository.() -> Unit)? = null) :
1411
this(URI.create(newUri), contentConfiguration)
1512
}
1613

@@ -30,67 +27,97 @@ object Isolated {
3027
private val REPO_RECONFIGURATIONS = listOf(
3128
"https://repo.maven.apache.org/maven2/" to
3229
RepositoryReconfiguration("https://repo.enginehub.org/internal/maven-central-proxy/") {
33-
releasesOnly()
30+
mavenContent {
31+
releasesOnly()
32+
}
3433
},
3534
"https://plugins.gradle.org/m2" to
3635
RepositoryReconfiguration("https://repo.enginehub.org/internal/plugin-portal-proxy/") {
37-
releasesOnly()
36+
mavenContent {
37+
releasesOnly()
38+
}
3839
},
3940
"https://libraries.minecraft.net/" to
4041
RepositoryReconfiguration("https://repo.enginehub.org/internal/minecraft/") {
41-
releasesOnly()
42+
mavenContent {
43+
releasesOnly()
44+
}
4245
},
4346
"https://maven.neoforged.net/releases/" to
4447
RepositoryReconfiguration("https://repo.enginehub.org/internal/neoforged/") {
48+
mavenContent {
4549
releasesOnly()
4650
includeGroupAndSubgroups("net.minecraftforge")
47-
includeGroupAndSubgroups("net.neoforged")
51+
includeGroupAndSubgroups("net.neoforged")
52+
}
4853
},
4954
"https://maven.minecraftforge.net/" to
5055
RepositoryReconfiguration("https://repo.enginehub.org/internal/forge/") {
56+
mavenContent {
5157
releasesOnly()
52-
includeGroupAndSubgroups("net.minecraftforge")
58+
includeGroupAndSubgroups("net.minecraftforge")
59+
}
5360
},
5461
"https://maven.parchmentmc.org/" to
5562
RepositoryReconfiguration("https://repo.enginehub.org/internal/parchment/") {
63+
mavenContent {
5664
releasesOnly()
57-
includeGroup("org.parchmentmc.data")
65+
includeGroup("org.parchmentmc.data")
66+
}
5867
},
5968
"https://repo.papermc.io/repository/maven-public/" to
6069
RepositoryReconfiguration("https://repo.enginehub.org/internal/papermc-proxy/") {
70+
mavenContent {
6171
includeGroupAndSubgroups("io.papermc")
6272
includeGroupAndSubgroups("com.velocitypowered")
6373
includeGroupAndSubgroups("ca.spottedleaf")
6474
includeGroupAndSubgroups("me.lucko")
65-
includeModule("net.md-5", "bungeecord-chat")
75+
includeModule("net.md-5", "bungeecord-chat")
76+
}
6677
},
6778
"https://maven.fabricmc.net/" to
6879
RepositoryReconfiguration("https://repo.enginehub.org/internal/fabricmc/") {
80+
mavenContent {
6981
releasesOnly()
7082
includeGroupAndSubgroups("fabric-loom")
7183
includeGroupAndSubgroups("net.fabricmc")
72-
excludeModule("net.fabricmc", "yarn")
84+
excludeModule("net.fabricmc", "yarn")
85+
}
7386
},
7487
"https://maven.fabricmc.net/#yarn-only" to
7588
RepositoryReconfiguration("https://repo.enginehub.org/internal/fabricmc-yarn/") {
89+
mavenContent {
7690
releasesOnly()
77-
includeModule("net.fabricmc", "yarn")
91+
includeModule("net.fabricmc", "yarn")
92+
}
7893
},
7994
"https://repo.spongepowered.org/repository/maven-releases/" to
8095
RepositoryReconfiguration("https://repo.enginehub.org/internal/spongepowered-releases/") {
96+
mavenContent {
8197
releasesOnly()
82-
includeGroupAndSubgroups("org.spongepowered")
98+
includeGroupAndSubgroups("org.spongepowered")
99+
}
83100
},
84101
"https://repo.spongepowered.org/repository/maven-snapshots/" to
85102
RepositoryReconfiguration("https://repo.enginehub.org/internal/spongepowered-snapshots/") {
103+
mavenContent {
86104
snapshotsOnly()
87-
includeGroupAndSubgroups("org.spongepowered")
105+
includeGroupAndSubgroups("org.spongepowered")
106+
}
88107
},
89108
"https://repo.enginehub.org/libs-release/" to
90109
RepositoryReconfiguration("https://repo.enginehub.org/libs-release/") {
91-
releasesOnly()
92-
includeGroupAndSubgroups("com.sk89q")
93-
includeGroupAndSubgroups("org.enginehub")
110+
mavenContent {
111+
releasesOnly()
112+
includeGroupAndSubgroups("com.sk89q")
113+
includeGroupAndSubgroups("org.enginehub")
114+
}
115+
116+
metadataSources {
117+
gradleMetadata()
118+
mavenPom()
119+
artifact()
120+
}
94121
},
95122
).associate { (k, v) -> URI.create(k) to v }
96123
private val LOGGER = Logging.getLogger("enginehub-reconfiguring-repositories")
@@ -119,9 +146,7 @@ object Isolated {
119146
if (!(repo is MavenArtifactRepository)) {
120147
error("Cannot configure content on non-Maven repository: ${repo.name} ${repo.url}")
121148
}
122-
repo.mavenContent {
123-
reconfiguration.contentConfiguration.invoke(this)
124-
}
149+
repo.run(reconfiguration.contentConfiguration)
125150
}
126151
}
127152
}

settings.gradle.kts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,6 @@ dependencyResolutionManagement {
3535
maven {
3636
name = "EngineHub (Non-Mirrored)"
3737
url = URI.create("https://repo.enginehub.org/libs-release/")
38-
metadataSources {
39-
gradleMetadata()
40-
mavenPom()
41-
artifact()
42-
}
4338
}
4439
ivy {
4540
url = uri("https://repo.enginehub.org/language-files/")
@@ -87,7 +82,7 @@ listOf("1.21.4", "1.21.5", "1.21.6", "1.21.9", "1.21.11", "26.1").forEach {
8782
include("worldedit-bukkit:adapters:adapter-$it")
8883
}
8984

90-
listOf("bukkit", "core", "fabric", "neoforge", "sponge", "cli").forEach {
85+
listOf("bukkit", "core", "core-mc", "fabric", "neoforge", "sponge", "cli").forEach {
9186
include("worldedit-libs:$it")
9287
include("worldedit-$it")
9388
}

0 commit comments

Comments
 (0)