Gradle, be gone!
(cherry picked from commit f26da02)
Fixed #451
Fixed issue #449 and fixed issue #450
Hope this still works