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

Document git-lfs dependency in readme and/or check for git-lfs in gradlew #233

Open
joshuaulrich opened this issue Jun 14, 2023 · 2 comments

Comments

@joshuaulrich
Copy link

You must have git-lfs installed before cloning the repo in order to build from source. Otherwise only the pointer file is cloned.

For example, without git-lfs the gradle/wrapper/gradle-wrapper.jar local file contents are below, and ./gradlew build fails with an uninformative error.

# cat gradle/wrapper/gradle-wrapper.jar
version https://git-lfs.github.com/spec/v1
oid sha256:e996d452d2645e70c01c11143ca2d3742734a28da2bf61f25c82bdc288c9e637
size 59203

# ./gradlew build
Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain
Caused by: java.lang.ClassNotFoundException: org.gradle.wrapper.GradleWrapperMain

I'm on Ubuntu and can install git-lfs with sudo apt install git-lfs. I can check that it's installed with which git-lfs. I'm not sure how to make that portable across platforms though.

@alex-karpovich
Copy link
Contributor

Greeting @joshuaulrich. that's make sense. Will add instructions. Thank you!

Also will try to incorporate downloading gradle-wrapper in gradlew, but it can be tricky for different platforms

@joshuaulrich
Copy link
Author

joshuaulrich commented Jun 15, 2023

I wouldn't try downloading gradle-wrapper.jar because it may not be the only file affected by git-lfs.

Maybe you could check the file size of gradle-wrapper.jar to see if it's less than a few MB. If it's small, that means git-lfs isn't available. Then gradlew could exit with an error about git-lfs being required.

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

No branches or pull requests

2 participants