Gradle-License-Report
Gradle-License-Report copied to clipboard
Report does not rerun after changing renderer options
If I change the options (e.g. filename or name) of a renderer in the Gradle configuration and then generate a new report, these changed options are not taken into account. Instead, the old option values are reused.
Example
For example, say I start with configuration
licenseReport {
renderers = arrayOf<ReportRenderer>(InventoryHtmlReportRenderer("report.html", "Backend"))
filters = arrayOf<DependencyFilter>(LicenseBundleNormalizer())
}
and I run ./gradlew generateLicenseReport
. I will get a report in report.html
with title Backend
, as desired.
But if I then change my configuration to
licenseReport {
renderers = arrayOf<ReportRenderer>(InventoryHtmlReportRenderer("report2.html", "Backend"))
filters = arrayOf<DependencyFilter>(LicenseBundleNormalizer())
}
and again run ./gradlew generateLicenseReport
, the file report2.html
is not created. Similarly so for changing the name to, say, "New Backend"
.
What I expected
I expect that after any change in my configuration, a new license report with the desired changes is created. This way, I can try out various options to learn how the configuration affects the output.
Reproducability
Thing | Version |
---|---|
Gradle-License-Report | 2.7 |
Gradle | 8.7 |
Source code
build.gradle.kts
import com.github.jk1.license.filter.DependencyFilter
import com.github.jk1.license.filter.LicenseBundleNormalizer
import com.github.jk1.license.render.InventoryHtmlReportRenderer
import com.github.jk1.license.render.ReportRenderer
plugins {
kotlin("jvm") version "1.9.23"
id("com.github.jk1.dependency-license-report") version "2.7"
}
repositories {
mavenCentral()
}
kotlin {
jvmToolchain(21)
}
dependencies {
implementation("com.github.curious-odd-man", "rgxgen", "2.0")
}
licenseReport {
renderers = arrayOf<ReportRenderer>(InventoryHtmlReportRenderer("report.html", "Backend"))
filters = arrayOf<DependencyFilter>(LicenseBundleNormalizer())
}