Take a look at these informational slides to learn about Bazel.
- Edit:
java/src/main/java/bazel/bootcamp/BUILD - Add a
java_binarytarget for theHelloBazelBootcamp.javafile - Run the binary using
bazel run //java/src/main/java/bazel/bootcamp:HelloBazelBootcamp
- The Go
BUILDfiles can be fully generated by Gazelle. Run gazelle withbazel run //:gazelle - Run the go binary using
bazel run //go/cmd/server - Go to http://localhost:8081 to see results (there won't be any logs yet):
curl http://localhost:8081
- Edit the
BUILDfile forlogger.protojava_proto_librarydocumentationjava_grpc_librarydocumentation (look towards the bottom of the page for Bazel related documentation)
- Edit the
BUILDfile forJavaLoggingClientLibrary.java - Edit the
BUILDfile forJavaLoggingClient.java bazel runthe Java binary you wrotebazel runthe Go binary from Section 2- Send messages from the client to the server and view them on http://localhost:8081
- Edit the
BUILDfile forJavaLoggingClientLibraryTest.javaHint
Names matter for tests. Thejava_testfor this file should be namedJavaLoggingClientLibraryTest - Edit the
BUILDfile forJavaLoggingClientTest.java - Run the tests using
bazel test
- Edit the
BUILDfile forintegrationtest.sh - Run the test using
bazel testand make sure that it passes - Run the test using
bazel test <target> --runs_per_test=10and make sure that it passesHint
You may need to modify theBUILDfile again to make this work