Use gradle to build library and demo