n0mer / gradle-git-properties

Gradle plugin for `git.properties` file generation
https://plugins.gradle.org/plugin/com.gorylenko.gradle-git-properties
Apache License 2.0
323 stars 55 forks source link

Gradle 7.0 Compatibility #149

Closed bellini-ea closed 4 years ago

bellini-ea commented 4 years ago

Using --warning-mode=all on a build results in the following warning:

Task :generateGitProperties Property 'gitProperties' is not annotated with an input or output annotation. This behaviour has been deprecated and is scheduled to be removed in Gradle 7.0. See https://docs.gradle.org/6.2.1/userguide/more_about_tasks.html#sec:up_to_date_checks for more details.

My configuration is like so:


gitProperties {
        extProperty = "gitProps"
    }

tasks {
        generateGitProperties {
            outputs.upToDateWhen { false }
        }
tha2015 commented 4 years ago

Just to confirm, which version are you using? This issue should not happen because there is an annotation @Internal on it. Reference: https://github.com/n0mer/gradle-git-properties/blob/2dd13d3c39ca646255fa2f62fb0f40c4951ce988/src/main/groovy/com/gorylenko/GenerateGitPropertiesTask.groovy#L34

bellini-ea commented 4 years ago

Ah yes, my apologies. I'm using Gradle 6.2.1 with the Kotlin DSL id("com.gorylenko.gradle-git-properties") version "2.2.0"

tha2015 commented 4 years ago

Try v2.2.2 to see if it is fixed. From https://github.com/n0mer/gradle-git-properties/releases it was fixed in 2.2.1

bellini-ea commented 4 years ago

Yup, that fixes it! Thanks so much.