Migrate to the latest gradle plugins and dependencies