File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/main/groovy/com/palantir/gradle/gitversion Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -20,16 +20,16 @@ import org.eclipse.jgit.internal.storage.file.FileRepository
20
20
import org.gradle.api.Plugin
21
21
import org.gradle.api.Project
22
22
23
- import com.google.common.base.Preconditions
24
-
25
23
class GitVersionPlugin implements Plugin<Project > {
26
24
27
25
private static final String NO_VERSION = ' unspecified-version'
28
26
29
27
void apply (Project project ) {
30
28
project. ext. gitVersion = {
31
29
File gitDir = new File (project. rootDir, ' .git' )
32
- Preconditions . checkArgument(gitDir. exists(), ' Cannot find \' .git\' directory' )
30
+ if (! gitDir. exists()) {
31
+ throw new IllegalArgumentException (' Cannot find \' .git\' directory' )
32
+ }
33
33
34
34
try {
35
35
Git git = Git . wrap(new FileRepository (gitDir))
You can’t perform that action at this time.
0 commit comments