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

Report does not rerun after changing renderer options #293

Open
FWDekker opened this issue Apr 16, 2024 · 0 comments
Open

Report does not rerun after changing renderer options #293

FWDekker opened this issue Apr 16, 2024 · 0 comments

Comments

@FWDekker
Copy link

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())
}
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

1 participant