ben-manes/gradle-versions-plugin

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

joloto opened this issue · 2 comments

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.

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

Wow thank you very much for this information.