Add workarounds for building Gradle