mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-04 16:34:44 +01:00
85f704e537
Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
43 lines
1.4 KiB
Diff
43 lines
1.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
|
|
Date: Sun, 3 Mar 2024 18:05:10 +0100
|
|
Subject: [PATCH] server gen test
|
|
|
|
|
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
|
index eed7b4bedee8da20179bd8e5890400db5e7eee3c..d952cb036080f43ee66358ef543538e208cf158e 100644
|
|
--- a/build.gradle.kts
|
|
+++ b/build.gradle.kts
|
|
@@ -210,17 +210,31 @@ fun TaskContainer.registerRunTask(
|
|
}
|
|
|
|
// Paper start
|
|
+val generatedServerDir: File = rootProject.file("paper-generator/generatedServer")
|
|
+
|
|
sourceSets.main {
|
|
java {
|
|
+ srcDir(generatedServerDir)
|
|
exclude("excluded/**")
|
|
}
|
|
}
|
|
|
|
idea {
|
|
module {
|
|
+ generatedSourceDirs.add(generatedServerDir)
|
|
excludeDirs.add(projectDir.resolve("src/main/java/excluded"))
|
|
}
|
|
}
|
|
+
|
|
+val scanJarForOldGeneratedCode = tasks.register("scanJarForOldGeneratedCode", io.papermc.paperweight.tasks.ScanJarForOldGeneratedCode::class) {
|
|
+ mcVersion.set(providers.gradleProperty("mcVersion"))
|
|
+ annotation.set("Lio/papermc/paper/generated/GeneratedFrom;")
|
|
+ jarToScan.set(tasks.jar.flatMap { it.archiveFile })
|
|
+ classpath.from(configurations.compileClasspath)
|
|
+}
|
|
+tasks.check {
|
|
+ dependsOn(scanJarForOldGeneratedCode)
|
|
+}
|
|
// Paper end
|
|
|
|
val runtimeClasspathWithoutVanillaServer = configurations.runtimeClasspath.flatMap { it.elements }
|