diff --git a/.github/workflows/gradle-build.yml b/.github/workflows/gradle-build.yml index 4a81caf6..f4e3e1d6 100644 --- a/.github/workflows/gradle-build.yml +++ b/.github/workflows/gradle-build.yml @@ -7,11 +7,11 @@ jobs: steps: - uses: actions/checkout@v4 - uses: gradle/actions/wrapper-validation@v3 - - name: "Set up JDK 11" + - name: "Set up JDK 17" uses: actions/setup-java@v4 with: distribution: 'temurin' - java-version: '11' + java-version: '17' - uses: gradle/actions/setup-gradle@v3 name: Setup Gradle - name: Check Fladle diff --git a/docs/changelog.md b/docs/changelog.md index 4ab70757..c0493d00 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,6 +1,7 @@ # Changelog ## Unreleased +* Minimum supported Gradle version is now 8.0 ## 0.17.5 * Support Develocity JUnit XML Reporting [PR](https://github.com/runningcode/fladle/pull/386) Thanks [ZacSweers](https://github.com/ZacSweers) diff --git a/fladle-plugin/build.gradle.kts b/fladle-plugin/build.gradle.kts index 14412bcb..8c26310f 100644 --- a/fladle-plugin/build.gradle.kts +++ b/fladle-plugin/build.gradle.kts @@ -132,17 +132,15 @@ tasks.withType(ValidatePlugins::class.java).configureEach { enableStricterValidation.set(true) } -// Ensure Java 11 Compatibility. See https://github.com/runningcode/fladle/issues/246 -tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile::class.java).configureEach { - kotlinOptions { - jvmTarget = "11" - languageVersion = "1.7" - apiVersion = "1.7" - } -} +//tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile::class.java).configureEach { +// kotlinOptions { +// languageVersion = "1.8" +// apiVersion = "1.8" +// } +//} java { toolchain { - languageVersion.set(JavaLanguageVersion.of(11)) + languageVersion.set(JavaLanguageVersion.of(17)) } } diff --git a/fladle-plugin/src/main/java/com/osacky/flank/gradle/FladlePluginDelegate.kt b/fladle-plugin/src/main/java/com/osacky/flank/gradle/FladlePluginDelegate.kt index ea878e0f..6bb79d7e 100644 --- a/fladle-plugin/src/main/java/com/osacky/flank/gradle/FladlePluginDelegate.kt +++ b/fladle-plugin/src/main/java/com/osacky/flank/gradle/FladlePluginDelegate.kt @@ -219,7 +219,7 @@ class FladlePluginDelegate { get() = configurations.getByName(FLADLE_CONFIG) companion object { - val GRADLE_MIN_VERSION: GradleVersion = GradleVersion.version("6.5") + val GRADLE_MIN_VERSION: GradleVersion = GradleVersion.version("8.0") const val TASK_GROUP = "fladle" const val FLADLE_CONFIG = "fladle" diff --git a/fladle-plugin/src/test/java/com/osacky/flank/gradle/integration/ConfigurationCacheTest.kt b/fladle-plugin/src/test/java/com/osacky/flank/gradle/integration/ConfigurationCacheTest.kt index 2f9b5582..6f4e265b 100644 --- a/fladle-plugin/src/test/java/com/osacky/flank/gradle/integration/ConfigurationCacheTest.kt +++ b/fladle-plugin/src/test/java/com/osacky/flank/gradle/integration/ConfigurationCacheTest.kt @@ -115,19 +115,19 @@ class ConfigurationCacheTest { settings.writeText( """ plugins { - id 'com.gradle.enterprise' version '3.7' + id 'com.gradle.develocity' version '3.17.5' } """.trimIndent(), ) testProjectRoot.newFile("flank-gradle-service-account.json").writeText("{ \"project_id\": \"foo\" }") val result = configCachingRunner("runFlank").buildAndFail() - assertThat(result.output).contains("Error: Failed to read service account credential.") + assertThat(result.output).contains("Caused by: com.google.api.client.http.HttpResponseException: 400 Bad Request") assertThat(result.output).contains("Configuration cache entry stored.") val secondResult = configCachingRunner("runFlank").buildAndFail() - assertThat(secondResult.output).contains("Error: Failed to read service account credential.") + assertThat(secondResult.output).contains("Caused by: com.google.api.client.http.HttpResponseException: 400 Bad Request") assertThat(secondResult.output).contains("Reusing configuration cache.") } diff --git a/fladle-plugin/src/test/java/com/osacky/flank/gradle/integration/FlankGradlePluginIntegrationTest.kt b/fladle-plugin/src/test/java/com/osacky/flank/gradle/integration/FlankGradlePluginIntegrationTest.kt index 66f8cd8f..295fafe2 100644 --- a/fladle-plugin/src/test/java/com/osacky/flank/gradle/integration/FlankGradlePluginIntegrationTest.kt +++ b/fladle-plugin/src/test/java/com/osacky/flank/gradle/integration/FlankGradlePluginIntegrationTest.kt @@ -11,8 +11,8 @@ class FlankGradlePluginIntegrationTest { @get:Rule var testProjectRoot = TemporaryFolder() - val minSupportGradleVersion = "6.5" - val oldVersion = "6.4" + val minSupportGradleVersion = "8.0" + val oldVersion = "7.6.4" fun writeBuildGradle(build: String) { testProjectRoot.writeBuildDotGradle(build) @@ -32,11 +32,11 @@ class FlankGradlePluginIntegrationTest { .withPluginClasspath() .withGradleVersion(oldVersion) .buildAndFail() - assertThat(result.output).contains("Fladle requires at minimum version Gradle 6.5. Detected version Gradle 6.4") + assertThat(result.output).contains("Fladle requires at minimum version Gradle 8.0. Detected version Gradle 7.6.4") } @Test - fun testGradleSevenOh() { + fun testGradleEightOh() { writeBuildGradle( """plugins { | id "com.osacky.fladle" @@ -47,7 +47,7 @@ class FlankGradlePluginIntegrationTest { GradleRunner.create() .withProjectDir(testProjectRoot.root) .withPluginClasspath() - .withGradleVersion("7.0") + .withGradleVersion("8.0") .build() assertThat(result.output).contains("SUCCESS") @@ -273,7 +273,7 @@ class FlankGradlePluginIntegrationTest { } @Test - fun testGradleSevenCompat() { + fun testGradleEightCompat() { writeBuildGradle( """plugins { id "com.osacky.fladle" @@ -292,7 +292,7 @@ class FlankGradlePluginIntegrationTest { testProjectRoot.writeEmptyServiceCredential() val result = testProjectRoot.gradleRunner() - .withGradleVersion("7.0-rc-1") + .withGradleVersion("8.0") .withArguments("printYmlFooConfig") .build() assertThat(result.task(":printYmlFooConfig")!!.outcome).isEqualTo(TaskOutcome.SUCCESS) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 13bc9b76..ab9bf635 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -28,7 +28,7 @@ androidx-test-rules = "1.5.0" junit-version = "4.13.2" kotlin = "2.0.0" -agp-version = "7.4.0" +agp-version = "8.4.2" flank-version = "23.10.1" [libraries]