From b92ce66160301c0ffebb8b9426ae4e4d981a8cfb Mon Sep 17 00:00:00 2001 From: eryk-zarebski Date: Wed, 5 Jun 2024 16:32:26 +0200 Subject: [PATCH] Update dependencies --- gradle/wrapper/gradle-wrapper.properties | 2 +- jazon-core/build.gradle | 9 ++++---- .../com/zendesk/jazon/MatcherSpec.groovy | 23 +++++++++++-------- .../com/zendesk/jazon/MismatchPathSpec.groovy | 2 +- jazon-junit/build.gradle | 8 +++---- jazon-spock/build.gradle | 8 +++---- 6 files changed, 29 insertions(+), 23 deletions(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 44e7c4d..98debb8 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/jazon-core/build.gradle b/jazon-core/build.gradle index b57bbaf..c5e3a6e 100644 --- a/jazon-core/build.gradle +++ b/jazon-core/build.gradle @@ -6,10 +6,11 @@ ext { apply from: '../gradle/publishing.gradle' dependencies { - compile group: 'com.google.code.gson', name: 'gson', version: '2.9.1' + compileOnly 'com.google.code.gson:gson:2.11.0' + implementation 'org.apache.groovy:groovy-json:4.0.21' - compileOnly 'org.projectlombok:lombok:1.18.12' - annotationProcessor 'org.projectlombok:lombok:1.18.12' + compileOnly 'org.projectlombok:lombok:1.18.32' + annotationProcessor 'org.projectlombok:lombok:1.18.32' - testCompile group: 'org.spockframework', name: 'spock-core', version: '1.2-groovy-2.4' + testImplementation 'org.spockframework:spock-core:2.4-M4-groovy-4.0' } diff --git a/jazon-core/src/test/groovy/com/zendesk/jazon/MatcherSpec.groovy b/jazon-core/src/test/groovy/com/zendesk/jazon/MatcherSpec.groovy index 5819328..bb25a1a 100644 --- a/jazon-core/src/test/groovy/com/zendesk/jazon/MatcherSpec.groovy +++ b/jazon-core/src/test/groovy/com/zendesk/jazon/MatcherSpec.groovy @@ -489,17 +489,22 @@ class MatcherSpec extends Specification { match([a: anyNumberOf(expected)], [a: actual]).success() where: - expected | actual - '1' | [] - '1' | ['1'] - '1' | ['1', '1'] - true | [true] - 2 | [2] - [b: true, c: 1] | [[[b: true, c: 1]]] - [3, 4, 5] | [[3, 4, 5]] - { it -> it > 5 } as Predicate | [6, 7, 8] + [expected, actual] << () -> { + return [ + ['1', []], + ['1', ['1']], + ['1', ['1', '1']], + [true, [true]], + [2, [2]], + [[b: true, c: 1], [[[b: true, c: 1]]]], + [[3, 4, 5], [[[3, 4, 5]]]], + [{ it -> it > 5 } as Predicate, [6, 7, 8]] + ] + } } + + @Unroll def "array each element expectation - element mismatch"() { when: diff --git a/jazon-core/src/test/groovy/com/zendesk/jazon/MismatchPathSpec.groovy b/jazon-core/src/test/groovy/com/zendesk/jazon/MismatchPathSpec.groovy index 25e98c1..296d8b9 100644 --- a/jazon-core/src/test/groovy/com/zendesk/jazon/MismatchPathSpec.groovy +++ b/jazon-core/src/test/groovy/com/zendesk/jazon/MismatchPathSpec.groovy @@ -7,7 +7,7 @@ import com.zendesk.jazon.expectation.translator.TranslatorFacade import com.zendesk.jazon.mismatch.impl.PrimitiveValueMismatch import spock.lang.Specification -import static groovy.json.JsonOutput.toJson +import static groovy.json.JsonOutput.toJson; class MismatchPathSpec extends Specification { private static final TestActualFactory testActualFactory = new TestActualFactory() diff --git a/jazon-junit/build.gradle b/jazon-junit/build.gradle index dda2b70..69ae9c2 100644 --- a/jazon-junit/build.gradle +++ b/jazon-junit/build.gradle @@ -6,10 +6,10 @@ ext { apply from: '../gradle/publishing.gradle' dependencies { - compile project(':jazon-core') + implementation project(':jazon-core') - compileOnly 'org.projectlombok:lombok:1.18.12' - annotationProcessor 'org.projectlombok:lombok:1.18.12' + compileOnly 'org.projectlombok:lombok:1.18.32' + annotationProcessor 'org.projectlombok:lombok:1.18.32' - testCompile group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.5.1' + testImplementation 'org.junit.jupiter:junit-jupiter-api:5.11.0-M2' } diff --git a/jazon-spock/build.gradle b/jazon-spock/build.gradle index 76b5da4..b937934 100644 --- a/jazon-spock/build.gradle +++ b/jazon-spock/build.gradle @@ -6,8 +6,8 @@ ext { apply from: '../gradle/publishing.gradle' dependencies { - compile project(':jazon-core') - compile group: 'org.codehaus.groovy', name: 'groovy-all', version: '2.4.12' + implementation project(':jazon-core') + implementation 'org.apache.groovy:groovy-all:4.0.21' - testCompile group: 'org.spockframework', name: 'spock-core', version: '1.2-groovy-2.4' -} + testImplementation 'org.spockframework:spock-core:2.4-M4-groovy-4.0' +} \ No newline at end of file