Update build script to use Kotlin extensions
Update build script to use Kotlin extensions

This makes it less likely for build issues to creep in when updating or
downgrading Gradle versions.  This will likely be very useful when
Gradle Script Kotlin 1.0 is released.

floralvikings/nightshade