Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSS licences plugin displays all Jetpack Compose dependencies twice #279

Open
marvineffing opened this issue Oct 26, 2023 · 2 comments
Open
Labels
oss-licenses Issues related to com.google.android.gms:oss-licenses-plugin

Comments

@marvineffing
Copy link

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:

  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'
  1. Add a button that launches the OssLicensesMenuActivity per the official Google example guideline.
  2. Build and install release variant of the app, click the button.
  3. 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

  • 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)
@marvineffing
Copy link
Author

@PaulRashidi @caller9 any chance you can review this?

@Garguy
Copy link

Garguy commented Nov 28, 2023

Any update on this?

@davidmotson davidmotson added the oss-licenses Issues related to com.google.android.gms:oss-licenses-plugin label Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
oss-licenses Issues related to com.google.android.gms:oss-licenses-plugin
Projects
None yet
Development

No branches or pull requests

3 participants