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

Empty report when licenseReport is a dependency of another task #488

Open
oharaandrew314 opened this issue Apr 26, 2024 · 1 comment
Open

Comments

@oharaandrew314
Copy link

oharaandrew314 commented Apr 26, 2024

If I configure licenseReport to be a dependency of build, processResources, or compileKotlin, then the generated reports are empty if I run any task that directly or implicitly depends on licenseReport. This does not happen if I run the licenseReport task individually.

Ultimately, I need the reports to be present before the shadowJar task and ideally before compileKotlin so I can unit test the reports. Any idea how this can be done?

tasks.withType<ProcessResources> {
    dependsOn("licenseReport")
    from ("build/reports/licenses") {
        into("public/oss")
    }
}

This is a jpackaged desktop application, so the typical android workflow isn't going to work. I already use this strategy to include the assets of an SPA from a neighboring module, which works perfectly.

@Kuba15
Copy link

Kuba15 commented Oct 4, 2024

If it may help, I share a diff of the build log between running the task via a dependency (left) and directly (right)
image

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

No branches or pull requests

2 participants