:library:feature:licenses

Purpose

Owns the open-source licenses surface: the list of bundled libraries, its shell page, and the AboutLibraries metadata that backs them.

Owns

  • LicensesScreen, drawn inside the shell's page frame, and the stateless LicensesScreenContent.

  • licensesPage(), the registration of LicensesRoute, opened from About and Help.

  • LicensesViewModel and LicensesUiState, which turn metadata parsing into a loading and then ready Loadable library count, for tracking and the loadLibraries report.

  • The AboutLibraries Gradle plugin and its generated raw/aboutlibraries resource.

Does not own

  • The About list entry that opens this screen, owned by :library:feature:about.

  • The Help overflow entry that opens this screen, owned by :library:feature:faq.

  • The LicensesRoute key, owned by :library:navigation. Pages that open this one navigate to the key, so neither About nor Help depends on this module.

Depends on

  • :library:core:common and :library:core:ui for shared state, Compose, the page frame and, through :library:core:ui, the graph builder of :library:navigation.

  • aboutlibraries-compose-m3 for the library list rendering and metadata producer.

Used by

  • :library:apptoolkit, which calls licensesPage() from toolkitPages().

Flow chart

flowchart TD
    Entry[About / Help: navigate LicensesRoute] --> Page[licensesPage]
    Page --> Screen[LicensesScreen]
    Screen --> Producer[produceLibraries on raw metadata]
    Producer --> VM[LicensesViewModel]
    VM --> State[libraryCount: Loadable]
    Screen --> Content[LicensesScreenContent]
    Content --> Container[LibrariesContainer]

Architectural decisions

  • Metadata is parsed by the AboutLibraries Compose producer, which is inherently a composition-side API. The screen reports when parsing finishes and LicensesViewModel turns that into a Loadable library count, the status ScreenHost reports, instead of the screen building one inline. The list itself is drawn straight from the producer's result, which LibrariesContainer already shows as loading while it is null.

  • The module carries the AboutLibraries plugin so the generated metadata resource stays next to the screen that reads it, and so modules that only link to licenses do not inherit the plugin.

  • The page is PaneRole.None, not a detail: it opens from About, itself a detail beside the settings list, and a detail opened from a detail would replace it instead of stacking on it.

  • The screen pads its list by contentPadding() and draws no scaffold of its own; the shell's page frame supplies the app bar and title.

Public contracts

  • LicensesScreen, licensesPage(), LicensesViewModel, LicensesUiState, LicensesEvent, and licensesModule. LicensesScreenContent is internal.

Internal implementations

  • AboutLibraries metadata production and badge configuration.

Current risks

The bundled metadata is generated at build time by the AboutLibraries plugin, so a host that shadows or reconfigures that plugin changes what this screen lists.

Packages