Lots of build system updates.

One of the most important updates is the addition of a buildscript block that can be included by URL. This simplifies all other build.gradle files.