update project

use gradle to build
build with gradle
separate sample from lib project
format code