Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump agp-version from 7.4.0 to 8.4.2 #392

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/gradle-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
16 changes: 7 additions & 9 deletions fladle-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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"
Expand All @@ -47,7 +47,7 @@ class FlankGradlePluginIntegrationTest {
GradleRunner.create()
.withProjectDir(testProjectRoot.root)
.withPluginClasspath()
.withGradleVersion("7.0")
.withGradleVersion("8.0")
.build()

assertThat(result.output).contains("SUCCESS")
Expand Down Expand Up @@ -273,7 +273,7 @@ class FlankGradlePluginIntegrationTest {
}

@Test
fun testGradleSevenCompat() {
fun testGradleEightCompat() {
writeBuildGradle(
"""plugins {
id "com.osacky.fladle"
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
Loading