Comments (2)
Am facing the same issue for the same plugin & Gradle version.
Observation, the git.properties
is build alternatively for every clean & build.
The following pattern is observed. Note that I'm not sure if the it's the first build that's skipping, or the second one.
...
clean
build -> generated
clean
build -> not generated
clean
build -> generated
clean
build -> not generated
...
Build log when git.properties
isn't generated
Executing 'build'...
> Task :generateEffectiveLombokConfig FROM-CACHE
> Task :compileJava FROM-CACHE
> Task :generateGitProperties FROM-CACHE
> Task :processResources
> Task :classes
> Task :resolveMainClassName
> Task :bootJar
> Task :bootStartScripts
> Task :bootDistTar
> Task :bootDistZip
> Task :jar SKIPPED
> Task :startScripts
> Task :distTar
> Task :distZip
> Task :assemble
> Task :generateTestEffectiveLombokConfig FROM-CACHE
> Task :compileTestJava NO-SOURCE
> Task :processTestResources NO-SOURCE
> Task :testClasses UP-TO-DATE
> Task :test NO-SOURCE
> Task :check UP-TO-DATE
> Task :build
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.7/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
BUILD SUCCESSFUL in 7s
13 actionable tasks: 9 executed, 4 from cache
Execution finished 'build'.
Build log when git.properties
is generated
Executing 'build'...
> Task :generateEffectiveLombokConfig FROM-CACHE
> Task :compileJava FROM-CACHE
> Task :generateGitProperties FROM-CACHE
> Task :processResources
> Task :classes
> Task :resolveMainClassName
> Task :bootJar
> Task :bootStartScripts
> Task :bootDistTar
> Task :bootDistZip
> Task :jar SKIPPED
> Task :startScripts
> Task :distTar
> Task :distZip
> Task :assemble
> Task :generateTestEffectiveLombokConfig FROM-CACHE
> Task :compileTestJava NO-SOURCE
> Task :processTestResources NO-SOURCE
> Task :testClasses UP-TO-DATE
> Task :test NO-SOURCE
> Task :check UP-TO-DATE
> Task :build
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.7/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
BUILD SUCCESSFUL in 5s
13 actionable tasks: 9 executed, 4 from cache
Execution finished 'build'.
from gradle-git-properties.
We are facing the same issue. When downgrading to Gradle 8.5
it's works again, but with 8.6
up to the last night build 8.10-20240723003427+0000
it behaves as described above.
Workaround for now:
generateGitProperties {
outputs.upToDateWhen { false }
}
alternative: turn of caching e.g. via org.gradle.caching=false
in gradle.properties
Reproducible on ever second/ third execution of clean assemble
(as also described above)
(you can find a minimal example at https://github.com/fabianlinz/2024_07_git_properties_issue):
gradle clean assemble --console=plain
ls my-module/build/resources/main/git.properties => file exists
gradle clean assemble --console=plain
ls my-module/build/resources/main/git.properties => file DOES NOT exists
gradle clean assemble --console=plain
ls my-module/build/resources/main/git.properties => file exists
gradle clean assemble --console=plain
ls my-module/build/resources/main/git.properties => file DOES NOT exists
(and so on)
Some further observations
- Just executing
build
orassemble
without aclean
does not result in the issue - Removing the
git.properties
file manually instead of callingclean
does not result in the issuegradle assemble --console=plain ls my-module/build/resources/main/git.properties => file exists rm my-module/build/resources/main/git.properties gradle my-module:assemble --console=plain ls my-module/build/resources/main/git.properties => file still exists => for some reason deleting the file is not the same as clean
- Calling
generateGitProperties
directly instead ofassemble
orbuild
does not result in the issue - Issue also occurs when gradle daemon is stopped in between
- If
main/resources
is completely empty the issue can't be observed (so this might be some interference with Gradles java plugin?) - If caching is turned off e.g. via
org.gradle.caching=false
ingradle.properties
the issue can't be observed
from gradle-git-properties.
Related Issues (20)
- Gradle 8 compatiblity: Missing task dependency on processResources when setting `gitPropertiesResourceDir`
- Plugin should not default to using overlapping task outputs
- Issue with Spring Boot when we create Image HOT 2
- com.gorylenko.GenerateGitPropertiesTask' property 'gitProperties' is missing an input or output annotation? HOT 1
- how can i put the properties file into the jar using johnrengelman shadowJar
- Some properties make builds non incremental when it's expected to be HOT 1
- Deprecation warning for unreadable inputs
- Plugin not accessible using https://plugins.gradle.org/m2/ repo HOT 1
- No artifact of plugin at plugins.gradle.org above version 2.2.4 HOT 1
- Can this be published to maven central
- HEAD instead of branch name in TeamCity
- Upgrade to grgit 5 https://github.com/ajoberstar/grgit/releases/tag/5.0.0
- jgit save config lock file exception on CI
- Configuration cache problems in Gradle 8.1 HOT 8
- Document which files are used in order to get the functionality to work
- Better communication of exceptions in GitDirLocator
- Disable generateGitProperties task when executing only for tests
- `generateGitProperties` fails when Git's `core.fsmonitor` is enabled HOT 2
- Provide mechanism to configure length of git commit abbrev
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gradle-git-properties.