mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-11 01:59:14 +01:00
[ci skip] Resolve apiAndDocs sources during Javadoc task execution rather than during configuration time (#6836)
This commit is contained in:
parent
399444abda
commit
15350e1273
3 changed files with 15 additions and 6 deletions
|
@ -15,7 +15,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
}
|
||||
|
||||
+val adventureVersion = "4.9.2"
|
||||
+val apiAndDocs by configurations.creating {
|
||||
+val apiAndDocs: Configuration by configurations.creating {
|
||||
+ attributes {
|
||||
+ attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category.DOCUMENTATION))
|
||||
+ attribute(Bundling.BUNDLING_ATTRIBUTE, objects.named(Bundling.EXTERNAL))
|
||||
|
@ -45,8 +45,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
@@ -0,0 +0,0 @@ tasks.jar {
|
||||
}
|
||||
|
||||
tasks.withType<Javadoc>().configureEach {
|
||||
+ (options as CoreJavadocOptions).addStringOption("sourcepath", apiAndDocs.resolvedConfiguration.files.joinToString(separator = File.pathSeparator, transform = File::getPath))
|
||||
tasks.withType<Javadoc> {
|
||||
+ inputs.files(apiAndDocs)
|
||||
+ .ignoreEmptyDirectories()
|
||||
+ .withPropertyName(apiAndDocs.name + "-configuration")
|
||||
+ doFirst {
|
||||
+ (options as CoreJavadocOptions).addStringOption(
|
||||
+ "sourcepath",
|
||||
+ apiAndDocs.resolvedConfiguration.files.joinToString(separator = File.pathSeparator, transform = File::getPath)
|
||||
+ )
|
||||
+ }
|
||||
(options as StandardJavadocDocletOptions).links(
|
||||
"https://guava.dev/releases/21.0/api/docs/",
|
||||
"https://javadoc.io/doc/org.yaml/snakeyaml/1.28/",
|
||||
|
|
|
@ -37,7 +37,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
testImplementation("junit:junit:4.13.1")
|
||||
testImplementation("org.hamcrest:hamcrest-library:1.3")
|
||||
testImplementation("org.ow2.asm:asm-tree:9.2")
|
||||
@@ -0,0 +0,0 @@ tasks.withType<Javadoc>().configureEach {
|
||||
@@ -0,0 +0,0 @@ tasks.withType<Javadoc> {
|
||||
(options as StandardJavadocDocletOptions).links(
|
||||
"https://guava.dev/releases/21.0/api/docs/",
|
||||
"https://javadoc.io/doc/org.yaml/snakeyaml/1.28/",
|
||||
|
|
|
@ -72,6 +72,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+}
|
||||
+
|
||||
+val generateApiVersioningFile by tasks.registering {
|
||||
+ inputs.property("version", project.version)
|
||||
+ val pomProps = layout.buildDirectory.file("pom.properties")
|
||||
+ outputs.file(pomProps)
|
||||
+ doLast {
|
||||
|
@ -84,13 +85,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ into("META-INF/maven/${project.group}/${project.name.toLowerCase(Locale.ENGLISH)}")
|
||||
+ }
|
||||
+ manifest {
|
||||
+ attributes += mapOf(
|
||||
+ attributes(
|
||||
+ "Automatic-Module-Name" to "org.bukkit"
|
||||
+ )
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+tasks.withType<Javadoc>().configureEach {
|
||||
+tasks.withType<Javadoc> {
|
||||
+ (options as StandardJavadocDocletOptions).links(
|
||||
+ "https://guava.dev/releases/21.0/api/docs/",
|
||||
+ "https://javadoc.io/doc/org.yaml/snakeyaml/1.28/",
|
||||
|
|
Loading…
Add table
Reference in a new issue