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.64k stars 420 forks source link

Build licenses json only for specific target in multiplatform module #991

Closed syt0r closed 4 months ago

syt0r commented 4 months ago

About this issue

I have a multiplatform module (app written with compose) with android and jvm targets. I want to use gradle command to generate json specifically for desktop target while using automatic task for android. The issue is that it looks like android dependencies appear in the output of this manually launched task and I can't find any configuration except for build variant, but it doesn't allow to specify target platform, right? Is it not possible at the moment to generate json only for one specific platform?

mikepenz commented 4 months ago

Good day.

Please have a look at the exportVariant property which you can pass to the CLI


# Filter exported definition by variant by passing `-PaboutLibraries.exportVariant==<VARIANT>`
./gradlew :app-wasm:exportLibraryDefinitions -PaboutLibraries.exportPath=src/main/resources/ -PaboutLibraries.exportVariant=wasmJs
./gradlew :app-wasm:exportLibraryDefinitions -PaboutLibraries.exportPath=src/main/resources/ -PaboutLibraries.exportVariant=jvm
syt0r commented 4 months ago

Thanks for the answer, it works!