Revert "Simplify gradle setup"

This reverts commit 74e764940387c8b912ef7ebcafc206a3b21115cc.