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