ben-manes / gradle-versions-plugin

Gradle plugin to discover dependency updates
Apache License 2.0
3.82k stars 199 forks source link

outputFormatter setting has no effect - json, xml & txt report always generated #846

Closed joloto closed 4 months ago

joloto commented 4 months ago

Hello,

firstly thanks for this plugin. I am trying it out (latest version 0.51.0) but always get the same report types, however I try to configure the outputFormatter setting.

I have also experimented using the commandline setting, i.e.: gradle dependencyUpdates -DoutputFormatter=html

Here my example Gradle task configuration:

dependencyUpdates {

    checkForGradleUpdate = false
    revision = 'release'
    outputFormatter = 'html'

    rejectVersionIf {
        isNonStable(it.candidate.version)
    }
}

Attached a sample project (tried executed with both Gradle 8.5 & 8.6), including the output reports in the build folder. test-app.zip

The output always shows the generation of json, xml & txt reports as shown below.

gradle_dependencyUpdates

Thanks in advance for your assistance.

ben-manes commented 4 months ago

It looks like this is from se.patrikerdes.use-latest-versions which forces the output formatter.

    void apply(Project project) {
        System.setProperty('outputFormatter', 'json,xml,plain')
        Task rootAggregate = setupRootAggregateTask(project)
        setupUseLatestVersions(project, rootAggregate)
        setupUseLatestVersionsCheck(project)
    }
joloto commented 4 months ago

Wow thank you very much for this information.