Skip to content

Commit 46f1723

Browse files
committed
Merge pull request #1 from palantir/feature/remove-guava
Remove Guava call
2 parents e6149ac + c875623 commit 46f1723

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/groovy/com/palantir/gradle/gitversion/GitVersionPlugin.groovy

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@ import org.eclipse.jgit.internal.storage.file.FileRepository
2020
import org.gradle.api.Plugin
2121
import org.gradle.api.Project
2222

23-
import com.google.common.base.Preconditions
24-
2523
class 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))

0 commit comments

Comments
 (0)