Gradle version: 8.13.
Plugin version: 2.5.0.
When extProperty setting is configured:
gitProperties {
extProperty = 'gitProperties'
}
and project is built with displaying warnings:
./gradlew build --warning-mode all
The following warning is displayed:
> Task :generateGitProperties
Invocation of Task.project at execution time has been deprecated. This will fail with an error in Gradle 10.0. This API is incompatible with the configuration cache, which will become the only mode supported by Gradle in a future release. Consult the upgrading guide for further information: https://docs.gradle.org/8.13/userguide/upgrading_version_7.html#task_project
Note:
I want to use extProperty to access the git commit id and write it to application.yml. Is there any better way to do it?
processResources {
filesMatching('**application.yml') {
filter {
it.replace('last-commit-hash', project.ext.gitProperties['git.commit.id.abbrev'].toString())
}
}
}
Gradle version: 8.13.
Plugin version: 2.5.0.
When
extPropertysetting is configured:and project is built with displaying warnings:
./gradlew build --warning-mode allThe following warning is displayed:
Note:
I want to use
extPropertyto access the git commit id and write it toapplication.yml. Is there any better way to do it?