AboutLibraries Kotlin Multiplatform License Management
AboutLibraries is a Gradle plugin and Compose UI toolkit that turns a Kotlin Multiplatform project's dependencies into an in-app open-source license screen. Collection happens at build time, so nothing scans while the app runs. Reach for it if you ship one Kotlin codebase to Android, iOS, desktop, or web and want one license screen for all of them; skip it if a hand-written credits page already covers your few dependencies.
The Challenge of In-App License Disclosure
Any app that pulls in more than a few open-source Gradle dependencies eventually has to show their licenses somewhere, and a hand-maintained list drifts out of date the moment a version bumps or a new library gets added. Nobody enjoys typing that list by hand. Matching each artifact to the right SPDX license and re-checking after every dependency change is tedious enough that plenty of side projects just skip it. AboutLibraries targets that specific gap for Kotlin Multiplatform and Android projects: the Gradle plugin regenerates the list from the real dependency graph on every build instead of you maintaining it by hand.
What AboutLibraries Does
AboutLibraries is a Gradle plugin paired with Compose UI components that build an open-source license screen for Kotlin Multiplatform and Android apps. At build time it walks the dependency graph, matches each artifact to a license, and writes the result to a JSON file the app loads through LibrariesContainer. Because collection happens once, at build time, the screen only renders data that already exists.
Core Capabilities for Dependency Reporting
- โOne generated dataset and mostly one Compose UI cover Android, iOS, JVM desktop, native, Wasm, and JS, per the README's platform list.
- โCollection happens during the Gradle build and gets cached, so the app doesn't scan dependencies at runtime.
- โCompose UI ships in Material 2, Material 3, or Wear styling, or you build your own screen on the core module.
- โThe Gradle plugin has shipped as two separate IDs since version 13.x.y: the main one exposes manual generation tasks, and the Android one wires that generation into the Android build automatically.
- โBuilt-in compliance tooling covers a license strict mode that can fail the build on a disallowed dependency, plus CSV and text exports for reporting.
- โThe exportFunding Gradle task can generate a funding.json file automatically with a GitHub API token, surfacing which dependencies list sponsorship options.
- โLibrary and license metadata can be overridden with plain JSON files dropped in a configured configPath, merging on a matching uniqueId.
- โLibrariesContainer takes variant (Refined/Traditional), density (Compact/Cozy), and actionMode (Chips/Icons), so one component covers several visual styles.
Who Benefits from AboutLibraries
Teams shipping a Kotlin Multiplatform or Android app to more than one target get the most out of AboutLibraries, since the same generated data and largely the same Compose UI cover Android, iOS, desktop, JS, and Wasm. It also suits teams under a compliance requirement, given the CSV/text exports and license strict mode. Skip it if your project isn't on Gradle or Compose, or if a handful of dependencies makes a static, hand-written credits screen simpler than wiring up a build plugin.
Integrating AboutLibraries into Your Project
The plugin lives on Gradle's own Plugin Portal; pull it in with the Kotlin plugins block DSL rather than the legacy apply plugin syntax. As of version 13.x.y there are two plugin IDs: com.mikepenz.aboutlibraries.plugin exposes manual Gradle tasks for generating library definitions, while com.mikepenz.aboutlibraries.plugin.android wires that same generation into the Android build automatically; the README points to the main plugin for most projects and the Android variant only when you specifically need that automatic hook. Add whichever Compose module lines up with the Material version you use, for example implementation("com.mikepenz:aboutlibraries-compose-m3:${latestAboutLibsRelease}"), and tune collection, export, and license behavior through the aboutLibraries { } extension block, whose full option list lives in the linked AboutLibrariesExtension.kt source file rather than the README itself.
Displaying Licenses with Compose UI
Once the plugin has generated the metadata file, load it with produceLibraries and pass the result to LibrariesContainer: `val libraries by produceLibraries(R.raw.aboutlibraries)`, then `LibrariesContainer(libraries, Modifier.fillMaxSize())`. That single component renders every visual style shown in the project's showcase: pass variant for a Refined or Traditional look, density for Compact or Cozy spacing, and actionMode for Chips or Icons on each row. Tap any row and its details expand, inline, as a dialog, or as a bottom sheet, based on the detailMode you set. If none of the bundled Material 2, Material 3, or Wear styling fits, the README points to building a custom screen on the core module instead.
Advantages of Using AboutLibraries
- โRegenerates the dependency and license list from the real Gradle graph on every build instead of a hand-maintained file.
- โNo runtime scanning: the README states collection happens at build time and gets cached, so the UI just renders that.
- โiOS, JVM desktop, native, JS, Wasm, and Android targets share one generated dataset and mostly one Compose UI.
- โCompliance features come bundled: a strict allow-list mode plus CSV and text reporting exports, so you don't need a separate tool.
- โPer-library overrides are plain JSON files in a configPath, so fixing a wrong description or license doesn't need a code change.
Considerations and Requirements
- โณFetching remote license text or funding data needs a GitHub API token; it isn't automatic out of the box.
- โณThe full Gradle extension option list isn't in the README itself; it's documented in the linked AboutLibrariesExtension.kt source file.
- โณLicense strict mode auto-fails the build only when you use the Android-specific plugin; other project types have to run exportLibraryDefinitions manually for the same enforcement.
- โณTwo plugin IDs exist for the main and Android variants, and picking the wrong one changes whether metadata generation happens automatically, so it's worth reading the migration guide before touching an older setup.
Other Tools for License Management
Frequently Asked Questions
AboutLibraries supports Compose Multiplatform: its README lists Android, iOS, native, JVM desktop, JS, and Wasm as targets sharing one generated dependency dataset and Compose UI.
AboutLibraries collects and caches dependency and license data during the Gradle build, per its README, so the generated screen loads that pre-built data instead of scanning dependencies while the app runs.
AboutLibraries is released under the Apache-2.0 license, per its GitHub repository listing.
AboutLibraries includes compliance-oriented tooling: CSV and text exports plus a license strict mode that can fail the build when a dependency's license falls outside an allowed list you configure.
AboutLibraries can show which dependencies list funding or sponsorship options, either fetched remotely with a GitHub API token or written manually to a funding.json file through the exportFunding task.
AboutLibraries' LibrariesContainer exposes variant, density, and action-mode options for the bundled Compose UI, and the core module lets you build a fully custom screen instead.
Best use cases
- โขAdding a required open-source attribution screen to a Kotlin Multiplatform app that ships to Android, iOS, and desktop from one codebase.
- โขPulling a CSV or text compliance export for a legal review instead of compiling a dependency list by hand.
- โขEnforcing a license allowlist at build time with strict mode, so a disallowed license breaks the Android build instead of shipping unnoticed.
- โขChecking which dependencies list funding options before deciding where a team directs open-source sponsorship.
- โขBuilding a fully custom license UI on the core module when the bundled Compose components don't match an app's design system.
Related repositories
Is AboutLibraries worth your time?
ChatGPT, Claude and Perplexity can all read this page. Ask one of them what it makes of AboutLibraries.
