Skip to content

oss-licenses-plugin fails clean build #356

@bubenheimer

Description

@bubenheimer

Describe the bug
oss-licenses-plugin does not work for clean builds in 0.10.9 (and 0.10.8). Worked in 0.10.7.

To Reproduce
Steps to reproduce the behavior:

  1. https://github.com/bubenheimer/osslicensespluginbugs
  2. ./gradlew :app:clean :app:assembleDebug
  3. Build output:
FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':app:debugOssDependencyTask' (type 'DependencyTask').
  - Gradle detected a problem with the following location: '/Users/uli/Documents/Developer/Android/bugsNtests/osslicensespluginbugs/app/build/generated/third_party_licenses/debug/dependencies.json'.
    
    Reason: Task ':app:debugOssLicensesCleanUp' uses this output of task ':app:debugOssDependencyTask' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
    
    Possible solutions:
      1. Declare task ':app:debugOssDependencyTask' as an input of ':app:debugOssLicensesCleanUp'.
      2. Declare an explicit dependency on ':app:debugOssDependencyTask' from ':app:debugOssLicensesCleanUp' using Task#dependsOn.
      3. Declare an explicit dependency on ':app:debugOssDependencyTask' from ':app:debugOssLicensesCleanUp' using Task#mustRunAfter.
    
    For more information, please refer to https://docs.gradle.org/9.1.0/userguide/validation_problems.html#implicit_dependency in the Gradle documentation.

* Try:
> Declare task ':app:debugOssDependencyTask' as an input of ':app:debugOssLicensesCleanUp'
> Declare an explicit dependency on ':app:debugOssDependencyTask' from ':app:debugOssLicensesCleanUp' using Task#dependsOn
> Declare an explicit dependency on ':app:debugOssDependencyTask' from ':app:debugOssLicensesCleanUp' using Task#mustRunAfter
> Run with --scan to generate a Build Scan (Powered by Develocity).

Desktop (please complete the following information):

  • Gradle version: 9.1.0
  • Android Studio version: Narwhal 4 Feature Drop
  • Plugin name and version: oss-licenses-plugin 0.10.9

Additional context
This is essentially the most minimal Android app. Seeing this plugin break on it across several releases is rather suggestive.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions