fix(build): supply AboutLibraries license texts for offline builds#5818
Merged
Conversation
The AboutLibraries plugin runs in offlineMode for fdroid/reproducible builds and never bundles SPDX/remote license texts, so the open-source licenses screen was missing license bodies and the build logged "OFFLINE MODE" warnings for 13 licenses. Wire configPath to a shared config/aboutlibraries/licenses dir and add a hash-matched JSON file per license (OSS texts sourced from spdx/license-list-data and golang/go, the Android SDK License, and concise pointers for the non-SPDX ML Kit ToS and Public Domain entries). Embedding the content also makes google/release builds deterministic by avoiding the network license fetch. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves the
prepareLibraryDefinitions/exportLibraryDefinitionsbuild warnings where the AboutLibraries plugin reports that license texts are missing in OFFLINE MODE. The plugin runs inofflineModefor fdroid/reproducible builds and never bundles SPDX/remote license texts, so the in-app open-source-licenses screen was missing license bodies for 13 licenses (production google builds fetched them online, so they were already complete there).The plugin merges manually supplied license JSON from
<configPath>/licenses/*.json, matched by thehashfield — and each warning prints the exactname/hashto use, so the match is deterministic.🛠️ Refactoring & Architecture
configPathto a sharedconfig/aboutlibraries/licenses/directory inAboutLibrariesConventionPlugin, using the repo's config-cache-safeisolated.rootProject.projectDirectoryidiom. Covers both:androidAppand:desktopApp.contentalso makes google/release builds deterministic — the plugin no longer hits the network to fetch these license texts when content is already present.🧹 Chores
config/aboutlibraries/licenses/:spdx/license-list-data: Apache-2.0, MIT, MIT-0, BSD-2-Clause, BSD-3-Clause, CC0-1.0, EPL-2.0, GPL-3.0, LGPL-3.0golang/goMIT-0(MIT No Attribution) was surfaced during build verification — it's a real license in the dependency tree that wasn't in the originally reported warning list.Testing Performed
No unit tests changed. Verified at the build level by running both affected tasks fresh:
Result: build succeeds with zero "OFFLINE MODE" / "does not contain the license text" warnings (down from 13).