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
2020import org.gradle.api.Plugin
2121import org.gradle.api.Project
2222
23- import com.google.common.base.Preconditions
24-
2523class GitVersionPlugin implements Plugin<Project > {
2624
2725 private static final String NO_VERSION = ' unspecified-version'
2826
2927 void apply (Project project ) {
3028 project. ext. gitVersion = {
3129 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+ }
3333
3434 try {
3535 Git git = Git . wrap(new FileRepository (gitDir))
You can’t perform that action at this time.
0 commit comments