Skip to content

fix(build): supply AboutLibraries license texts for offline builds#5818

Merged
jamesarich merged 1 commit into
release/2.8.0from
claude/beautiful-saha-3736e6
Jun 16, 2026
Merged

fix(build): supply AboutLibraries license texts for offline builds#5818
jamesarich merged 1 commit into
release/2.8.0from
claude/beautiful-saha-3736e6

Conversation

@jamesarich

Copy link
Copy Markdown
Collaborator

Resolves the prepareLibraryDefinitions/exportLibraryDefinitions build warnings where the AboutLibraries plugin reports that license texts are missing in OFFLINE MODE. The plugin runs in offlineMode for 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 the hash field — and each warning prints the exact name/hash to use, so the match is deterministic.

🛠️ Refactoring & Architecture

  • Wire configPath to a shared config/aboutlibraries/licenses/ directory in AboutLibrariesConventionPlugin, using the repo's config-cache-safe isolated.rootProject.projectDirectory idiom. Covers both :androidApp and :desktopApp.
  • Embedding content also makes google/release builds deterministic — the plugin no longer hits the network to fetch these license texts when content is already present.

🧹 Chores

  • Add 13 hash-matched license definition files under config/aboutlibraries/licenses/:
    • OSS texts sourced from 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.0
    • Go license from golang/go
    • Android Software Development Kit License (canonical text)
    • Concise reference pointers for the two non-SPDX, non-OSS entries that are blank even in online builds: ML Kit Terms of Service and Public Domain
  • MIT-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:

./gradlew :androidApp:prepareLibraryDefinitionsFdroidDebug :androidApp:exportLibraryDefinitions --rerun-tasks --warning-mode all

Result: build succeeds with zero "OFFLINE MODE" / "does not contain the license text" warnings (down from 13).

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>
@github-actions github-actions Bot added bugfix PR tag build Build system changes labels Jun 16, 2026
@jamesarich jamesarich changed the base branch from main to release/2.8.0 June 16, 2026 22:27
@jamesarich jamesarich merged commit 1d0dc8b into release/2.8.0 Jun 16, 2026
19 checks passed
@jamesarich jamesarich deleted the claude/beautiful-saha-3736e6 branch June 16, 2026 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix PR tag build Build system changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant