mikepenz / AboutLibraries

AboutLibraries automatically collects all dependencies and licenses of any gradle project (Kotlin MultiPlatform), and provides easy to integrate UI components for Android and Compose-jb environments
http://mikepenz.github.io/AboutLibraries/
Apache License 2.0
3.62k stars 419 forks source link

LibrariesContainer fails to open in Multi-Module Compose App (v10.6.2) #865

Closed GoldenSoju closed 1 year ago

GoldenSoju commented 1 year ago

About this issue

java.lang.IllegalStateException: Please provide the required library data via the available APIs.
Depending on the platform this can be done for example via `LibsBuilder().withJson()`.
For Android there exists an `LibsBuilder.withContext()`, automatically loading the `aboutlibraries.json` file from the `raw` resources folder.
When using compose or other parent modules, please check their corresponding APIs.

I wasn't able to find any aboutlibraries.json file in the build folders. So I guess I have to adjust the gradle settings/setup (?), but I wasn't able to solve this on my own yet.

My app architecture is best compared to the Google Now In Android app architecture. So when I add the dependencies for the about libraries plugin aboutlibraries-plugin = {group = "com.mikepenz", name = "aboutlibraries-compose", version.ref = "aboutLibraries"} with version aboutLibraries = "10.6.2" and try to open the LibrariesContainer() in a feature module. The app crashes and I get the exception mentioned above.

Details

Checklist

mikepenz commented 1 year ago

This looks to be a duplicate of: https://github.com/mikepenz/AboutLibraries/issues/858

GoldenSoju commented 1 year ago

@mikepenz Ah indeed. Seems like the same problem. So let me close this one.

mikepenz commented 1 year ago

Thank you. There is sadly no direct answer yet on the other to fix it right away.

The assumption is that something in the gradle system breaks.

GoldenSoju commented 1 year ago

@mikepenz

For the time being I switched to google's oss plugin as it was implemented in nowinandroid #730. So far it works without problems in a multi module app.