diff --git a/build.gradle.kts b/build.gradle.kts index 0252749c00..2a380b913a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -21,6 +21,15 @@ subprojects { languageVersion = JavaLanguageVersion.of(21) } } + + dependencies { + "testRuntimeOnly"("org.junit.platform:junit-platform-launcher") + } + + tasks.withType().configureEach { + isPreserveFileTimestamps = false + isReproducibleFileOrder = true + } } val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/" diff --git a/gradle.properties b/gradle.properties index aeeaa7b209..7a2b3bf89e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,6 +8,3 @@ updatingMinecraft=false org.gradle.caching=true org.gradle.parallel=true org.gradle.vfs.watch=false - -# TODO: this should be removed when we move things to forked JVMs -org.gradle.jvmargs=-Xmx2G diff --git a/paper-api-generator/build.gradle.kts b/paper-api-generator/build.gradle.kts index e1e434773a..67d1ae285a 100644 --- a/paper-api-generator/build.gradle.kts +++ b/paper-api-generator/build.gradle.kts @@ -1,18 +1,18 @@ -import io.papermc.paperweight.PaperweightSourceGeneratorHelper -import io.papermc.paperweight.extension.PaperweightSourceGeneratorExt import io.papermc.paperweight.util.defaultJavaLauncher plugins { java + id("io.papermc.paperweight.source-generator") } -plugins.apply(PaperweightSourceGeneratorHelper::class) - -extensions.configure(PaperweightSourceGeneratorExt::class) { - atFile.set(projectDir.toPath().resolve("wideners.at").toFile()) +paperweight { + atFile.set(layout.projectDirectory.file("wideners.at")) } dependencies { + minecraftJar(project(":paper-server", "mappedJarOutgoing")) + implementation(project(":paper-server", "macheMinecraftLibraries")) + implementation("com.squareup:javapoet:1.13.0") implementation(project(":paper-api")) implementation("io.github.classgraph:classgraph:4.8.47") diff --git a/paper-server/build.gradle.kts b/paper-server/build.gradle.kts index 4634193258..64c9c43dc9 100644 --- a/paper-server/build.gradle.kts +++ b/paper-server/build.gradle.kts @@ -11,19 +11,33 @@ val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/" dependencies { mache("io.papermc:mache:1.21.4+build.5") + paperclip("io.papermc:paperclip:3.0.3") } paperweight { - softSpoon = true - minecraftVersion = "1.21.4" + minecraftVersion = providers.gradleProperty("mcVersion") // macheOldPath = file("F:\\Projects\\PaperTooling\\mache\\versions\\1.21.4\\src\\main\\java") // gitFilePatches = true paper { - paperServerDir = file("./") + reobfMappingsPatch = layout.projectDirectory.file("../build-data/reobf-mappings-patch.tiny") + reobfPackagesToFix.addAll( + "co.aikar.timings", + "com.destroystokyo.paper", + "com.mojang", + "io.papermc.paper", + "ca.spottedleaf", + "net.kyori.adventure.bossbar", + "net.minecraft", + "org.bukkit.craftbukkit", + "org.spigotmc", + ) } - serverProject = project(":paper-server") + spigot { + buildDataRef = "3edaf46ec1eed4115ce1b18d2846cded42577e42" + packageVersion = "v1_21_R3" // also needs to be updated in MappingEnvironment" + } } tasks.generateDevelopmentBundle { diff --git a/settings.gradle.kts b/settings.gradle.kts index 9503dfc6a6..2cc62d3e5c 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -3,6 +3,7 @@ import java.util.Locale pluginManagement { repositories { gradlePluginPortal() + mavenLocal() maven("https://repo.papermc.io/repository/maven-public/") } }