Full and proper gradlization

This replaces the old hybrid system to properly run completely in Gradle, including FTP upload tasks.