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

Unable to make AboutLibraries work #1013

Closed alghe-global closed 1 month ago

alghe-global commented 1 month ago

I'm running Android Studio latest version with Jetpack Compose latest version and Kaitlin 2.0. I'm using the root Gradle (kts) implementation of the library as well as app level core and M3 Compose library.

I'm using LibraryContainer however my app crashes complaining I haven't supplied the data to it. I'm wondering from where to get this data? The build doesn't generate any JSON.

alghe-global commented 1 month ago

Do I've to specify the plugin in app's build.gradle.kts?

alghe-global commented 1 month ago

Have placed aboutLibraries in the app build.gradle.kts file, though upon build I get Unresolved reference error:

e: .../app/build.gradle.kts:41:1: Unresolved reference: aboutLibraries

in build.gradle.kts (app) I've:

/** AboutLibraries dependency */
    implementation(libs.aboutlibraries.core)
    implementation(libs.aboutlibraries.compose.m3)

and in build.gradle.kts (root), I've:

/** Dependency for AboutLibraries plugin */
    id("com.mikepenz.aboutlibraries.plugin") version "11.2.2" apply false

is KTS not supported?

mikepenz commented 1 month ago

Good day.

You want to apply the plugin to the module you are gonna use it in. And yes the plugin is supported for normal groovy based gradle files as well as kts ones.

1)

You can define it in the root:

Please remember, the plugin only links with the android build tasks (which can be disabled) for any other platforms you want to execute the task when you need the file generated:

alghe-global commented 1 month ago

Adding in the plugins section of app's build.gradle.kts did the job.

Thanks so much and great work!