added support to build via gradle

with this script you can build via gradle.