Skip to content

Commit 3a8c1c6

Browse files
committed
chore(build): clean up skipTests condition
When there is only one property to check, we do not need to iterate over a list.
1 parent 94831e5 commit 3a8c1c6

File tree

2 files changed

+3
-15
lines changed

2 files changed

+3
-15
lines changed

buildSrc/build.gradle

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,7 @@ dependencies {
6868

6969
tasks.withType(Test).configureEach {
7070
onlyIf {
71-
![
72-
'skipTests'
73-
].find {
74-
project.hasProperty(it)
75-
}
71+
!project.hasProperty('skipTests')
7672
}
7773

7874
useJUnitPlatform()

gradle/test-config.gradle

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,7 @@ dependencies {
2525

2626
tasks.withType(Test).configureEach {
2727
onlyIf {
28-
![
29-
'skipTests'
30-
].find {
31-
project.hasProperty(it)
32-
}
28+
!project.hasProperty('skipTests')
3329
}
3430

3531
useJUnitPlatform()
@@ -42,11 +38,7 @@ tasks.withType(Test).configureEach {
4238

4339
tasks.named('integrationTest', Test) {
4440
onlyIf {
45-
![
46-
'skipTests'
47-
].find {
48-
project.hasProperty(it)
49-
}
41+
!project.hasProperty('skipTests')
5042
}
5143

5244
systemProperty 'geb.build.reportsDir', reporting.file("$project.projectDir/build/geb-reports")

0 commit comments

Comments
 (0)