aboutsummaryrefslogtreecommitdiffhomepage
path: root/paper-api/build.gradle.kts
diff options
context:
space:
mode:
authorJason Penilla <[email protected]>2024-12-09 12:50:30 -0700
committerNassim Jahnke <[email protected]>2024-12-12 11:36:57 +0100
commitff75689b0802180538e6dba36d113e7529e43139 (patch)
tree26af9ebf89567b951de91bae3b15595f0d103fac /paper-api/build.gradle.kts
parent8da8d2991fad93aacdd3adcdf9ba0942cdf05616 (diff)
downloadPaper-ff75689b0802180538e6dba36d113e7529e43139.tar.gz
Paper-ff75689b0802180538e6dba36d113e7529e43139.zip
Adjust build for config cache compatdev/hard-fork-base
Diffstat (limited to 'paper-api/build.gradle.kts')
-rw-r--r--paper-api/build.gradle.kts12
1 files changed, 10 insertions, 2 deletions
diff --git a/paper-api/build.gradle.kts b/paper-api/build.gradle.kts
index 571534b42c..832a2b3e86 100644
--- a/paper-api/build.gradle.kts
+++ b/paper-api/build.gradle.kts
@@ -161,6 +161,12 @@ tasks.jar {
}
}
+abstract class Services {
+ @get:Inject
+ abstract val fileSystemOperations: FileSystemOperations
+}
+val services = objects.newInstance<Services>()
+
tasks.withType<Javadoc> {
val options = options as StandardJavadocDocletOptions
options.overview = "src/main/javadoc/overview.html"
@@ -192,17 +198,19 @@ tasks.withType<Javadoc> {
options.tags("apiNote:a:API Note:")
inputs.files(apiAndDocs).ignoreEmptyDirectories().withPropertyName(apiAndDocs.name + "-configuration")
+ val apiAndDocsElements = apiAndDocs.elements
doFirst {
options.addStringOption(
"sourcepath",
- apiAndDocs.elements.get().map { it.asFile }.joinToString(separator = File.pathSeparator, transform = File::getPath)
+ apiAndDocsElements.get().map { it.asFile }.joinToString(separator = File.pathSeparator, transform = File::getPath)
)
}
// workaround for https://github.com/gradle/gradle/issues/4046
inputs.dir("src/main/javadoc").withPropertyName("javadoc-sourceset")
+ val fsOps = services.fileSystemOperations
doLast {
- copy {
+ fsOps.copy {
from("src/main/javadoc") {
include("**/doc-files/**")
}