Archiviert
13
0

Configure javadoc overview and doc-files copying

closes #7462

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Dieser Commit ist enthalten in:
Jason Penilla 2022-02-28 21:38:49 -07:00
Ursprung 126ca7376e
Commit ab8a139612
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 0E75A301420E48F8
3 geänderte Dateien mit 35 neuen und 24 gelöschten Zeilen

Datei anzeigen

@ -27,10 +27,10 @@ index e431e3435737e28394d81b56568a08b3c3148b9b..b23bde3b5e881f146539a307d0a59f21
+/.factorypath
diff --git a/build.gradle.kts b/build.gradle.kts
new file mode 100644
index 0000000000000000000000000000000000000000..bf1f5a8151ac0a4b25370142fef37145033140ef
index 0000000000000000000000000000000000000000..d6b99d37c960a7d8de1852dbc74c3ce671101b14
--- /dev/null
+++ b/build.gradle.kts
@@ -0,0 +1,66 @@
@@ -0,0 +1,80 @@
+plugins {
+ `java-library`
+ `maven-publish`
@ -90,12 +90,26 @@ index 0000000000000000000000000000000000000000..bf1f5a8151ac0a4b25370142fef37145
+}
+
+tasks.withType<Javadoc> {
+ (options as StandardJavadocDocletOptions).links(
+ val options = options as StandardJavadocDocletOptions
+ options.overview = "src/main/javadoc/overview.html"
+ options.isDocFilesSubDirs = true
+ options.links(
+ "https://guava.dev/releases/31.0.1-jre/api/docs/",
+ "https://javadoc.io/doc/org.yaml/snakeyaml/1.30/",
+ "https://javadoc.io/doc/org.jetbrains/annotations-java5/23.0.0/",
+ "https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/",
+ )
+
+ // workaround for https://github.com/gradle/gradle/issues/4046
+ inputs.dir("src/main/javadoc").withPropertyName("javadoc-sourceset")
+ doLast {
+ copy {
+ from("src/main/javadoc") {
+ include("**/doc-files/**")
+ }
+ into("build/docs/javadoc")
+ }
+ }
+}
diff --git a/pom.xml b/pom.xml
deleted file mode 100644

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Build system changes
diff --git a/build.gradle.kts b/build.gradle.kts
index bf1f5a8151ac0a4b25370142fef37145033140ef..709f9c3a562729970813f47b531bfc51ba192f55 100644
index d6b99d37c960a7d8de1852dbc74c3ce671101b14..e49f4853e36f493754841231eeb5dd093b3788e0 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -15,15 +15,27 @@ dependencies {
@ -37,12 +37,12 @@ index bf1f5a8151ac0a4b25370142fef37145033140ef..709f9c3a562729970813f47b531bfc51
testImplementation("junit:junit:4.13.2")
testImplementation("org.hamcrest:hamcrest-library:1.3")
testImplementation("org.ow2.asm:asm-tree:9.2")
@@ -60,7 +72,7 @@ tasks.withType<Javadoc> {
(options as StandardJavadocDocletOptions).links(
@@ -63,7 +75,7 @@ tasks.withType<Javadoc> {
options.links(
"https://guava.dev/releases/31.0.1-jre/api/docs/",
"https://javadoc.io/doc/org.yaml/snakeyaml/1.30/",
- "https://javadoc.io/doc/org.jetbrains/annotations-java5/23.0.0/",
+ "https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/", // Paper - we don't want Java 5 annotations
"https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/",
)
}

Datei anzeigen

@ -7,7 +7,7 @@ Co-authored-by: zml <zml@stellardrift.ca>
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
diff --git a/build.gradle.kts b/build.gradle.kts
index 55ee0c6330e4dbba22b4044346d1e1dd39c745ce..19b65a9b56b73f873ef646d14a6cf091b69d3873 100644
index 98afa6a25131dc626ea7a5122f33df6bd2d39178..bacb5650f03827ac55f8c8c33f6ffda5b029a8a4 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -8,6 +8,19 @@ java {
@ -43,21 +43,7 @@ index 55ee0c6330e4dbba22b4044346d1e1dd39c745ce..19b65a9b56b73f873ef646d14a6cf091
// Paper end
compileOnly("org.apache.maven:maven-resolver-provider:3.8.4")
@@ -70,10 +89,25 @@ tasks.jar {
}
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/31.0.1-jre/api/docs/",
@@ -78,8 +97,22 @@ tasks.withType<Javadoc> {
"https://javadoc.io/doc/org.yaml/snakeyaml/1.30/",
"https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/", // Paper - we don't want Java 5 annotations
"https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/",
@ -68,7 +54,18 @@ index 55ee0c6330e4dbba22b4044346d1e1dd39c745ce..19b65a9b56b73f873ef646d14a6cf091
+ "https://jd.adventure.kyori.net/text-serializer-plain/$adventureVersion/",
+ // Paper end
)
}
+ inputs.files(apiAndDocs).ignoreEmptyDirectories().withPropertyName(apiAndDocs.name + "-configuration")
+ doFirst {
+ options.addStringOption(
+ "sourcepath",
+ apiAndDocs.resolvedConfiguration.files.joinToString(separator = File.pathSeparator, transform = File::getPath)
+ )
+ }
+
// workaround for https://github.com/gradle/gradle/issues/4046
inputs.dir("src/main/javadoc").withPropertyName("javadoc-sourceset")
doLast {
diff --git a/src/main/java/co/aikar/timings/TimingsReportListener.java b/src/main/java/co/aikar/timings/TimingsReportListener.java
index ef58a6c00f444bd498a2d8fc4e457236f393954f..ecd149157d4fb80444f34bf5633d74bcdb63dec5 100644
--- a/src/main/java/co/aikar/timings/TimingsReportListener.java