Update build.gradle and add scripts for jenkins build