Gradle-License-Report icon indicating copy to clipboard operation
Gradle-License-Report copied to clipboard

Contents of `CheckLicenseTask.allowedLicenseFile` rather than the absolute path should be treated as an input

Open erdi opened this issue 3 years ago • 0 comments

Currently only the absolute path of the allowed license file is treated as an input for CheckLicenseTask. This is not sufficient because the task should not be up-to-date if one of the allowed licenses has been removed from the config file. Secondly it causes the task to be non-relocatable.

This means that I have to resort to the following workaround

        project.tasks.named("checkLicense") {
            inputs.file(allowedLicensesConfigFile)
                    .withPathSensitivity(RELATIVE)
                    .withPropertyName("allowedLicensesConfiguration")
        }

That does unfortunately not solve the non-relocatability problem.

erdi avatar Feb 28 '23 11:02 erdi