Skip to content

BuildInfo task not run in Gradle project when project's version number changes #20135

@ddebree

Description

@ddebree

If I disable the time property, the Gradle BuildInfo task indicates that it is up to date even when the project version number changes.

In our configuration, we have changed the build info configuration to exclude the time property as suggested in the documentation:

springBoot {
    buildInfo {
        properties {
             time = null
        }
    }
}

Now, when we alter the project version number, this task always indicates that it is up to date and so the incorrect version number is included in the build-info files.
Looking at the code, I suspect the problem is that the BuildInfoProperties class has a null value for the version number by default, and so each time the input is checked, Gradle only sees this null value. It never changes to reflect the changing version number.

Using version 2.2.2.RELEASE of the plugin.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions