From 3fddf71c478c260295778e8e12686d1a96eb07aa Mon Sep 17 00:00:00 2001 From: Gold856 <117957790+Gold856@users.noreply.github.com> Date: Wed, 29 Apr 2026 17:57:31 -0400 Subject: [PATCH] [build] Remove Javadoc fonts (#8837) Javadoc now includes 4 MB of fonts for every Javadoc JAR, which we have 18 of, which causes unnecessary bloat to the installer size. This disables the inclusion of those fonts, using the built-in fallback included in the Javadoc stylesheet. This also increases the default font size by 10% after polling the FTC Discord resulted in people asking for a bigger font. --- build.gradle | 4 +++- docs/javadoc.css | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 docs/javadoc.css diff --git a/build.gradle b/build.gradle index 9dff5ed46a..3c438ce536 100644 --- a/build.gradle +++ b/build.gradle @@ -145,11 +145,13 @@ subprojects { options.encoding = 'UTF-8' } - // Enables UTF-8 support in Javadoc + // Enables UTF-8 support in Javadoc, disables 4 MB of fonts being added to every Javadoc JAR, add our styles tasks.withType(Javadoc) { options.addStringOption("charset", "utf-8") options.addStringOption("docencoding", "utf-8") options.addStringOption("encoding", "utf-8") + options.addBooleanOption("-no-fonts", true) + options.addStringOption("-add-stylesheet", "${rootDir}/docs/javadoc.css") } // Sign outputs with Developer ID diff --git a/docs/javadoc.css b/docs/javadoc.css new file mode 100644 index 0000000000..bd9a28500d --- /dev/null +++ b/docs/javadoc.css @@ -0,0 +1,6 @@ +:root { + --body-font-size: calc(14.2px * 1.1); + --block-font-size: calc(14.4px * 1.1); + --code-font-size: calc(14px * 1.1); + --nav-font-size: calc(13.4px * 1.1); +}