Gradle build fixes