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.66k stars 423 forks source link

iOS and MacOS for Compose Module Support #812

Closed Syer10 closed 1 year ago

Syer10 commented 1 year ago

I did not update the CI github action as it looks more complicated then I normally work with.

Add iOS and MacOS support

Revert updates to Compose Multiplatform and Jetpack Compose from 1.3.0 to 1.2.1, this is done for multiple reasons

  1. Kotlin native does not support compileOnly so you have to use api, but that makes it so if the consumer is not using the Compose Multiplatform Beta, it will conflict with the current dependencies.
  2. There were no api changes in the code that the compose module uses so there is no requirement to update them

Commonize Libraries composable and move dialog opening to LibrariesContainer in the android source-set

Remove useless OK string from android source-set, use the android.R one.

Make fakeData internal

Use produceState with background dispatcher instead of mutableStateOf + LaunchedEffect

mikepenz commented 1 year ago

Thank you very much for the PR. There's a chance I won't be able to review it this week, but I'll try to come to it as quick as possible

mikepenz commented 1 year ago

@Syer10 do you by coincidence also have a sample app, or would you be so kind to contribute a sample app so we can test the iOS and MacOS targets?

Syer10 commented 1 year ago

Sure I'll take a look into it, I have a few ios/mac samples in other libraries I work on and I can copy one from there.

Syer10 commented 1 year ago

I attempted a sample app here https://github.com/Syer10/AboutLibraries/tree/apple_sample But have run into issues actually loading aboutlibraries.json from the resources, there does not seem to be a good way. I tried to take the macos and ios resource loading from https://github.com/JetBrains/compose-jb/tree/master/components/resources but it doesn't seem to work.

mikepenz commented 1 year ago

Thank you. I'll give it a look