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
Per the unfixed (but closed) #14, the build breaks when run from a Git linked working tree. This issue has been waiting on JGit issue 477475 to add support for linked working trees, and has been closed in the interim. While there has been a recent (March 2022) renewal of interest in the JGit issue, it's not clear whether this issue will finally be resolved or not, and in either event it's certainly outside the control of the maintainers of the Gradle git.properties plugin.
Until the JGit issue and #14 are fixed, the current behavior of build breakage is probably reasonable when failOnNoGitDirectory is true (the default), since that implies that having the git.properties file is something the user wants to be present strongly enough to break the build on, so being unable to generate it should lead to a failure. However, when failOnNoGitDirectory is false, it would be nice if the build didn't break when run from a Git linked working tree, even if the Gradle git.properties plugin doesn't yet support generating properties in this scenario.
Workaround
Right now, I'm able to work around this issue by putting the following in my build.gradle, per #14 (comment). It's not ideal since it either requires me to have a different build.gradle locally, or to commit something that is only necessary because of my own local git checkout, and not something other developers on the project need.
Per the unfixed (but closed) #14, the build breaks when run from a Git linked working tree. This issue has been waiting on JGit issue 477475 to add support for linked working trees, and has been closed in the interim. While there has been a recent (March 2022) renewal of interest in the JGit issue, it's not clear whether this issue will finally be resolved or not, and in either event it's certainly outside the control of the maintainers of the Gradle git.properties plugin.
Until the JGit issue and #14 are fixed, the current behavior of build breakage is probably reasonable when
failOnNoGitDirectory
istrue
(the default), since that implies that having thegit.properties
file is something the user wants to be present strongly enough to break the build on, so being unable to generate it should lead to a failure. However, whenfailOnNoGitDirectory
isfalse
, it would be nice if the build didn't break when run from a Git linked working tree, even if the Gradle git.properties plugin doesn't yet support generating properties in this scenario.Workaround
Right now, I'm able to work around this issue by putting the following in my
build.gradle
, per #14 (comment). It's not ideal since it either requires me to have a differentbuild.gradle
locally, or to commit something that is only necessary because of my own local git checkout, and not something other developers on the project need.The text was updated successfully, but these errors were encountered: