diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e577f4f..5968dfa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,6 +23,8 @@ jobs: uses: openrewrite/gh-automation/.github/workflows/ci-gradle.yml@main secrets: gradle_enterprise_access_key: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} + gradle_enterprise_cache_username: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USERNAME }} + gradle_enterprise_cache_password: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }} ossrh_username: ${{ secrets.OSSRH_USERNAME }} ossrh_token: ${{ secrets.OSSRH_TOKEN }} ossrh_signing_key: ${{ secrets.OSSRH_SIGNING_KEY }} diff --git a/build.gradle.kts b/build.gradle.kts index 4508208..84d4e56 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -137,7 +137,6 @@ tasks.named("compileJava") { targetCompatibility = JavaVersion.VERSION_1_8.toString() options.isFork = true - options.forkOptions.executable = "javac" options.compilerArgs.addAll(listOf("--release", "8")) options.encoding = "UTF-8" options.compilerArgs.add("-parameters") diff --git a/gradle.properties b/gradle.properties index 792d600..aec0a55 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1 +1,2 @@ -# +org.gradle.caching=true +org.gradle.parallel=true diff --git a/settings.gradle.kts b/settings.gradle.kts index b6d44f0..f57167f 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -8,11 +8,19 @@ plugins { gradleEnterprise { val isCiServer = System.getenv("CI")?.equals("true") ?: false server = "https://ge.openrewrite.org/" + val gradleCacheRemoteUsername: String? = System.getenv("GRADLE_ENTERPRISE_CACHE_USERNAME") + val gradleCacheRemotePassword: String? = System.getenv("GRADLE_ENTERPRISE_CACHE_PASSWORD") buildCache { remote(HttpBuildCache::class) { url = uri("https://ge.openrewrite.org/cache/") isPush = isCiServer + if (!gradleCacheRemoteUsername.isNullOrBlank() && !gradleCacheRemotePassword.isNullOrBlank()) { + credentials { + username = gradleCacheRemoteUsername + password = gradleCacheRemotePassword + } + } } }