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

Switch okbuck to use prebuilt buck binaries #579

Merged
merged 3 commits into from
Jan 26, 2018
Merged

Switch okbuck to use prebuilt buck binaries #579

merged 3 commits into from
Jan 26, 2018

Conversation

kageiit
Copy link
Contributor

@kageiit kageiit commented Jan 25, 2018

okbuck {
  buckBinary = "com.github.facebook:buck:26845eb89ba4464586787533d08984a993f247d4@pex"
}
  • Okbuck will automatically add jitpack as a remote repository on the root project to fetch prebuilt buck binaries. The very first time a version is pulled, it can take a few minutes to build buck on jitpack, so you may experience timeouts fetching the binary. Just retry and from every next time, the artifact would be cached and served by jitpack as usual.
  • To download custom buck from a fork, if the fork is on github, you can change the maven coords appropriately. For example, for a fork at https://github.com/kageiit/buck one may use "com.github.kageiit:buck:26845eb89ba4464586787533d08984a993f247d4@pex"
  • If your fork is not on github, you can still configure okbuck to download prebuilt buck binaries from your maven server like so in your root build.gradle (you will have to manage uploading binaries to your maven server via your own infra as repos not on github are not visible to jitpack)
okbuck {
  buckBinary = null
}

repositories {
  maven { url <your-custom-maven-or-artifactory-url> }
}

dependencies {
  buckBinary "com.example:buck:26845eb89ba4464586787533d08984a993f247d4@pex"
}

@kageiit
Copy link
Contributor Author

kageiit commented Jan 25, 2018

@runningcode
Copy link
Contributor

This is nice! Not having the ant dependency makes it a bit nicer to use on CI as well.
Maybe worth updating this wiki page once merged: https://github.com/uber/okbuck/wiki/OkBuck-options-and-examples

@kageiit
Copy link
Contributor Author

kageiit commented Jan 25, 2018

Maybe worth updating this wiki page once merged: https://github.com/uber/okbuck/wiki/OkBuck-options-and-examples

Yep plan to update both wiki and readme

INSTALLED_WATCHMAN=`command -v watchman`

DEFAULT_BUCK_REPO="https://github.com/facebook/buck.git"
DEFAULT_BUCK_INSTALL_DIR="$HOME/.gradle/caches/okbuck/buck"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to provide some sort of cleanup? This leaves the old repo checked out.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about it, but I did not want to force folks to reclone the buck repo if they were building an older sha for some reason.

That should be upto the users (who can modify their buckw to do the cleanup if they like)

@kageiit kageiit merged commit a750688 into master Jan 26, 2018
@kageiit kageiit deleted the prebuilt_buck branch January 26, 2018 10:50
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

Successfully merging this pull request may close these issues.

4 participants