gradle-git-version
gradle-git-version copied to clipboard
submodule support
At the moment, versionDetails() fails when run against a submodule:
org.eclipse.jgit.api.errors.RefNotFoundException: Ref HEAD can not be resolved
Caused by: java.lang.NullPointerException
at com.palantir.gradle.gitversion.VersionDetails.descriptionIsPlainTag(VersionDetails.java:81)
at com.palantir.gradle.gitversion.VersionDetails.getLastTag(VersionDetails.java:94)
at build_7orv6hikjrwy1ujlilpcudjcn.run(<path_to_submodule...>/build.gradle:13)
at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:90)
... 102 more
To remarks: First, VersionDetails.descriptionIsPlainTag():81 should check if null is not coming from description(). The null return value can occur if the repository is empty.
Second, if I am not mistaken, JGit handles submodules differently from git repositories.
Would love to see this fixed.
Would love to see this fixed.
It is already fixed in #500 but Palantir refuses to process the PR in any way. I have a feeling that they need this bug for one of their backdoors.
Also, we should probably not trust a spyware manufacturer with providing build tools...