Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No .git directory found! #105

Open
ndeso17 opened this issue Jun 27, 2022 · 1 comment
Open

No .git directory found! #105

ndeso17 opened this issue Jun 27, 2022 · 1 comment

Comments

@ndeso17
Copy link

ndeso17 commented Jun 27, 2022

Error build gradle : Caused by: java.lang.IllegalStateException: No .git directory found!
In script-git-version.gradle

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'org.ajoberstar.grgit:grgit-core:4.1.1'
    }
}

import org.ajoberstar.grgit.Grgit

ext {
    git = Grgit.open(currentDir: projectDir)
    gitCommitHash = git.head().abbreviatedId
    gitNumberOfCommits = git.log().size()
    gitTagDescription = git.describe(tags: true)
    git.close()
}
@LukasPaczos
Copy link

Hey @ndeso17! Did you check out the git repository correctly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants