Hi folks, I've got Iotivity building with Bazel. It was surprizingly easy and the result is surprizingly simple. You can get it on the Bazel branch of this fork <https://github.com/OpenOCF/iotivity/tree/bazel>. It's all in the following files:
- WORKSPACE - BUILD - the files in config/ - these cooperate with stuff in WORKSPACE to deal with external libs - java/BUILD - tools/bazel.rc Clone it, then: $ bazel build iotvitiy Copy tools/bazel.rc to .bazelrc and edit to turn on e.g. verbosity (build -s) etc. You can also do $ bazel build java:IotivityDroid Warning: is is PoC stuff only. It builds, but I have not yet built and run an application using it. Also, It does not yet support user-selected configs (like with_cloud, etc.) That stuff isn't hard to add, just tedious. Feature-based config also needs to be addressed. Noteworthy bits: automatically handles download and compile of external libs, including applying the patch for mbedtls. I wrote a blog article about this that may be helpful: Bazel: genrule patching an external repo <http://blog.mobileink.com/2018/05/bazel-genrule-patching-external-repo.html> . Sadly, only tested on Mac OS X, but it should be easy to adapt to Linux and Windows. I probably won't be able to get to that until next weekend. Enjoy, Gregg
