google / play-services-plugins

Plugins to help with using Google Play services SDK.
https://developers.google.com/android/guides/overview
Apache License 2.0
471 stars 138 forks source link

OSS licences plugin displays all Jetpack Compose dependencies twice #279

Open marvineffing opened 1 year ago

marvineffing commented 1 year ago

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.

configurations {
    configureEach {
        resolutionStrategy {
            force '<specific-compose-dependency-version' (e.g. androidx.compose.animation:animation:1.5.4)
        }
    }
}

Steps to reproduce the behaviour:

  1. Create a new Android project with empty activity
  2. Add the OSS plugin
  3. 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'
  4. Add a button that launches the OssLicensesMenuActivity per the official Google example guideline.
  5. Build and install release variant of the app, click the button.
  6. If you scroll down to the Compose section, you should be able to see that all the Compose licences are displayed twice.

Screenshot:

WhatsApp Image 2023-10-26 at 10 38 27

Information

marvineffing commented 1 year ago

@PaulRashidi @caller9 any chance you can review this?

Garguy commented 1 year ago

Any update on this?