Fix for build scripts with gradle 2.0, as well as adding more restrictions/contrains into the build system