Skip to content

ci: Update Dokka configuration and unify AboutLibraries JSON generation#4767

Merged
jamesarich merged 3 commits intomainfrom
fix/dokka
Mar 13, 2026
Merged

ci: Update Dokka configuration and unify AboutLibraries JSON generation#4767
jamesarich merged 3 commits intomainfrom
fix/dokka

Conversation

@jamesarich
Copy link
Collaborator

This pull request introduces improvements to how the AboutLibraries JSON data is generated, exported, and loaded for both Android and desktop platforms. It streamlines the process by exporting the JSON file directly during the build, removes redundant provider code, and ensures consistent loading of library license information in the app. Additionally, it updates build logic to support Compose Desktop applications and refines dependency management.

Enhancements to AboutLibraries JSON export and loading:

  • The AboutLibraries JSON file is now exported directly to src/main/resources/aboutlibraries.json during the build process, ensuring consistent access for both Android and desktop platforms. (app/build.gradle.kts, app/build.gradle.ktsL340-R343)
  • Workflow steps were added to export full library licenses as part of the CI/CD release process for Android, F-Droid, and desktop builds. (.github/workflows/release.yml, [1] [2] [3]
  • The redundant AboutLibrariesJsonProvider class was removed, and JSON loading in navigation code was simplified to directly read from the classpath resource. (app/src/main/kotlin/org/meshtastic/app/util/AboutLibrariesJsonProvider.kt, [1]; app/src/main/kotlin/org/meshtastic/app/navigation/SettingsNavigation.kt, [2] [3]; desktop/src/main/kotlin/org/meshtastic/desktop/navigation/DesktopSettingsNavigation.kt, [4]

Build logic and dependency updates:

Support for Compose Desktop applications in build logic:

  • Introduced a new plugin type for Compose Desktop applications and updated project graph configuration to recognize desktop modules. (build-logic/convention/src/main/kotlin/org/meshtastic/buildlogic/Graph.kt, [1] [2]

@jamesarich jamesarich added ci Pertains to ci/cd actions or workflows bugfix PR tag labels Mar 13, 2026
This commit updates the build logic for Dokka documentation generation to include additional Kotlin Multiplatform (KMP) source sets.

Specific changes include:
- Added `jvmMain` and `jvmAndroidMain` to the list of source sets processed by Dokka in `Dokka.kt`.

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit refactors the AboutLibraries configuration to unify library license generation across Android and Desktop platforms. The manual `AboutLibrariesJsonProvider` utility has been replaced by the standard `exportLibraryDefinitions` Gradle task, which now outputs the required JSON directly to resources.

Specific changes include:
- **Build Configuration**: Updated `aboutlibraries` plugin to use the base multiplatform-compatible version and applied it globally.
- **Dependency Management**: Added `aboutlibraries-core` and `aboutlibraries-compose-m3` to `core:common` and the `desktop` module to support license rendering in shared UI.
- **Automation**: Updated `app/build.gradle.kts` to export the library definitions to `src/main/resources/aboutlibraries.json` and added this generated file to `.gitignore`.
- **CI/CD**: Added the `exportLibraryDefinitions` task to the release workflow to ensure license data is updated during automated builds.
- **Refactoring**:
    - Deleted `AboutLibrariesJsonProvider.kt` in favor of direct resource loading via the classpath.
    - Updated `SettingsNavigation.kt` (Android) and `DesktopSettingsNavigation.kt` (Desktop) to load the JSON resource using standard Java resource fetching.

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
@codecov
Copy link

codecov bot commented Mar 13, 2026

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 12.18%. Comparing base (55cea44) to head (bcd27d4).
⚠️ Report is 3 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...rg/meshtastic/app/navigation/SettingsNavigation.kt 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4767   +/-   ##
=======================================
  Coverage   12.17%   12.18%           
=======================================
  Files         531      530    -1     
  Lines       17726    17714   -12     
  Branches     2647     2646    -1     
=======================================
  Hits         2158     2158           
+ Misses      15255    15243   -12     
  Partials      313      313           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
@jamesarich jamesarich added this pull request to the merge queue Mar 13, 2026
Merged via the queue into main with commit 3321c47 Mar 13, 2026
6 checks passed
@jamesarich jamesarich deleted the fix/dokka branch March 13, 2026 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix PR tag ci Pertains to ci/cd actions or workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant