You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While working on #209 to make use of inferred task dependencies on the processResources task (instead of depending on the dependent classes task), it seems there is an issue with the default location with regards to recommended practices(1):
... this is not a recommended practice (I guess this is the root cause of #128/#131).
I think this is not detected by the existing unit test because of a combination of:
That test only verifies the behavior of the :generateGitProperties task, with no regards to the Java plugin integration (i.e. that test does not execute tasks from the Java plugin)
... the test fails because the task is not cached, and the following warning can be seen in the build output:
Caching disabled for task ':generateGitProperties' because:
Gradle does not know how file 'build\resources\main\git.properties' was created (output property 'output'). Task output caching requires exclusive access to output paths to guarantee correctness (i.e. multiple tasks are not allowed to produce output in the same location).
The text was updated successfully, but these errors were encountered:
While working on #209 to make use of inferred task dependencies on the
processResources
task (instead of depending on the dependentclasses
task), it seems there is an issue with the default location with regards to recommended practices(1):gradle-git-properties/README.md
Line 40 in 80fd874
gradle-git-properties/src/main/groovy/com/gorylenko/GenerateGitPropertiesTask.groovy
Line 27 in 80fd874
gradle-git-properties/src/main/groovy/com/gorylenko/GenerateGitPropertiesTask.groovy
Line 164 in 80fd874
By default, that task is using the same output location as the Java plugin:
build/resources/main
.(1) However, as documented at
... this is not a recommended practice (I guess this is the root cause of #128/#131).
I think this is not detected by the existing unit test because of a combination of:
:generateGitProperties
task, with no regards to the Java plugin integration (i.e. that test does not execute tasks from the Java plugin)gitPropertiesResourceDir
#209, somehow doesn't give Gradle a proper picture about tasks inputs/outputsIf I "fix" #209 with inferred task dependencies, and modify the unit test as follows:
Tentative fix for #209
Build cache unit test changes
... the test fails because the task is not cached, and the following warning can be seen in the build output:
The text was updated successfully, but these errors were encountered: