@@ -49,6 +49,7 @@ plugins {
49
49
id ' opensearch.docker-support'
50
50
id ' opensearch.global-build-info'
51
51
id " com.diffplug.spotless" version " 6.3.0" apply false
52
+ id " org.gradle.test-retry" version " 1.3.1" apply false
52
53
}
53
54
54
55
apply from : ' gradle/build-complete.gradle'
@@ -232,7 +233,7 @@ allprojects {
232
233
tasks. withType(JavaCompile ). configureEach { JavaCompile compile ->
233
234
// See please https://bugs.openjdk.java.net/browse/JDK-8209058
234
235
if (BuildParams . runtimeJavaVersion > JavaVersion . VERSION_11 ) {
235
- compile. options. compilerArgs << ' -Werror'
236
+ compile. options. compilerArgs << ' -Werror'
236
237
}
237
238
compile. options. compilerArgs << ' -Xlint:auxiliaryclass'
238
239
compile. options. compilerArgs << ' -Xlint:cast'
@@ -386,6 +387,18 @@ gradle.projectsEvaluated {
386
387
}
387
388
}
388
389
390
+ // test retry configuration
391
+ subprojects {
392
+ apply plugin : " org.gradle.test-retry"
393
+ tasks. withType(Test ). configureEach {
394
+ retry {
395
+ failOnPassedAfterRetry = false
396
+ maxRetries = 3
397
+ maxFailures = 10
398
+ }
399
+ }
400
+ }
401
+
389
402
// eclipse configuration
390
403
allprojects {
391
404
apply plugin : ' eclipse'
@@ -445,9 +458,9 @@ allprojects {
445
458
tasks. named(' eclipse' ) { dependsOn ' cleanEclipse' , ' copyEclipseSettings' }
446
459
447
460
afterEvaluate {
448
- tasks. findByName(" eclipseJdt" )?. configure {
449
- dependsOn ' copyEclipseSettings'
450
- }
461
+ tasks. findByName(" eclipseJdt" )?. configure {
462
+ dependsOn ' copyEclipseSettings'
463
+ }
451
464
}
452
465
}
453
466
0 commit comments