-
Notifications
You must be signed in to change notification settings - Fork 169
Local Development
Zac Sweers edited this page Jan 3, 2019
·
1 revision
We use google-java-format to format Java files. You can either install the IntelliJ plugin or use a pre commit hook to automatically re-format files.
To add a pre commit hook:
- Build
google-java-format
jar following instructions from github page. - Copy
config/git-hooks/pre-commit.template
to.git/hooks/pre-commit
- Make the script executable:
chmod +x .git/hooks/pre-commit
- Replace
<<PATH_TO_JAR>>
in.git/hooks/pre-commit
with the location of google-java-format jar.
Force rerun of okbuck
❯ ./gradlew okbuck -Dokbuck.wrapper=true --stacktrace
Build all targets/tests (this matches what CI does)
❯ ./buckw targets //... --type android_binary android_instrumentation_apk java_test groovy_test robolectric_test kotlin_test scala_test | xargs ./buckw build
- You should be able to open this in IntelliJ like a plain Gradle project.
- If you hit ErrorProne errors when building, just rebuild. This is due to a known flakiness issue in Rocker.