play-services-plugins
play-services-plugins copied to clipboard
OSS licences plugin displays all Jetpack Compose dependencies twice
We have found out that most, if not all, Jetpack Compose dependencies are being displayed twice when showing the OssLicensesMenuActivity. See attached screenshot from my minimum reproducable project. Obviously you'd want to display the dependency licence only once.
I have tried so far to resolve it myself, unsuccessfully.
- output app dependency tree to a file, and analyze discrepancies, i.e. different depedency artifact versions being used
- force dependency version usage by adding to app's
build.gradle:
configurations {
configureEach {
resolutionStrategy {
force '<specific-compose-dependency-version' (e.g. androidx.compose.animation:animation:1.5.4)
}
}
}
- exclude sub-dependencies, like so
implementation ('androidx.compose.material3:material3:1.1.2') {
exclude group: 'androidx.compose.animation', module: 'animation'
}
Steps to reproduce the behaviour:
- Create a new Android project with empty activity
- Add the OSS plugin
- Add any compose dependency, in my relevant project I have added the following Jetpack Compose dependencies:
implementation 'androidx.compose.material3:material3:1.1.2'
implementation 'androidx.activity:activity-compose:1.8.0'
implementation 'androidx.compose.ui:ui-text-android:1.5.4'
// Android Studio Preview support
implementation 'androidx.compose.ui:ui-tooling-preview:1.5.4'
debugImplementation 'androidx.compose.ui:ui-tooling:1.5.4'
- Add a button that launches the
OssLicensesMenuActivityper the official Google example guideline. - Build and install release variant of the app, click the button.
- If you scroll down to the Compose section, you should be able to see that all the Compose licences are displayed twice.
Screenshot:
Information
- Gradle version: 8.2
- Android Studio version: AS Hedgehog | 2023.1.1 RC Build #AI-231.9392.1.2311.10949950, built on October 14, 2023,
- Runtime version: 17.0.7+0-17.0.7b1000.6-10550314 x86_64
- VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
- Plugin name and version: OSS licences 0.10.6 (
com.google.android.gms:oss-licenses-plugin:0.10.6)
@PaulRashidi @caller9 any chance you can review this?
Any update on this?