Skip to content

Commit

Permalink
feat: add Gradle retry.
Browse files Browse the repository at this point in the history
  • Loading branch information
credmond-git committed Nov 28, 2024
1 parent 884f254 commit ae639a5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ dependencies {
implementation(libs.gradle.git.versions)
implementation(libs.gradle.error.prone)
implementation(libs.gradle.publish)
implementation(libs.gradle.retry)

implementation(libs.gradle.kotlin)
implementation(libs.gradle.dokka)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
plugins {
id("gestalt.java-common-conventions")
`jvm-test-suite`
id("org.gradle.test-retry")
jacoco
}

Expand All @@ -32,8 +33,15 @@ testing {
useJUnitJupiter(libs.versions.junit5.get())
targets {
all {
testTask {
testTask.configure {
finalizedBy(tasks.jacocoTestReport)

retry {
maxRetries = 2
maxFailures = 10
failOnPassedAfterRetry = false
failOnSkippedAfterRetry = false
}
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,14 @@ checkStyle = "10.10.0"
jmh = "1.37"
gradleJmh = "0.7.2"
# @pin gestalt for integration tests.
gestalt = "0.35.0"
gestalt = "0.35.1"
# Gradle utility
gradleVersions = "0.51.0"
gitVersions = "3.1.0"
gradleVersionsUpdate = "0.8.5"
com-fasterxml-jackson-datatype = "2.18.2"
jakartaAnnotations = "3.0.0"
gradleRetry = "1.6.0"

[libraries]
# Kotlin
Expand Down Expand Up @@ -133,6 +134,7 @@ gradle-ben-manes-versions = { module = "com.github.ben-manes:gradle-versions-plu
gradle-versions-update = { module = "nl.littlerobots.vcu:plugin", version.ref = "gradleVersionsUpdate" }
gradle-error-prone = { module = "net.ltgt.gradle:gradle-errorprone-plugin", version.ref = "gradleErrorProne" }
gradle-publish = { module = "com.vanniktech:gradle-maven-publish-plugin", version.ref = "gradlePublish" }
gradle-retry = { module = "org.gradle:test-retry-gradle-plugin", version.ref = "gradleRetry" }
# Gestalt for integration tests
gestalt-aws = { module = "com.github.gestalt-config:gestalt-aws", version.ref = "gestalt" }
gestalt-azure = { module = "com.github.gestalt-config:gestalt-azure", version.ref = "gestalt" }
Expand Down

0 comments on commit ae639a5

Please sign in to comment.