Cloudfoundry support and Gradle build improvements