Skip to content

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

@oharaandrew314

Description

@oharaandrew314

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions