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

Create variant specific output folders #339

Closed
sergeys-opera opened this issue Aug 3, 2023 · 2 comments
Closed

Create variant specific output folders #339

sergeys-opera opened this issue Aug 3, 2023 · 2 comments

Comments

@sergeys-opera
Copy link
Contributor

LicenseReportTask needs to run per variant (as variant dependencies might differ), thus, there might be multiple LicenseReportTask tasks defined in the project, e.g. licenseDebugReport or licenseReleaseReport. But all such tasks mark the same folder as their output making it impossible to add new tasks that depend on them. Gradle would think, for example, that a custom task processLicenseDebugReport is dependent on both licenseDebugReport and licenseReleaseReport as it uses files from the output folder of those tasks, while in reality it only depends on licenseDebugReport:

Reason: Task 'processLicenseDebugReport' uses this output of task
  'licenseReleaseReport' without declaring an explicit or implicit dependency
  This can lead to incorrect results being produced, depending on what order the
  tasks are executed.

There are two ways to fix this I think:

  1. Declare each output file of LicenseReportTask as @Output
  2. Create different output folders per build variant, e.g. licencesDebug and licensesRelease
@realdadfish
Copy link
Contributor

Kind of a duplicate of #226

@jaredsburrows
Copy link
Owner

Closed on duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants