This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch GROOVY_3_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git


The following commit(s) were added to refs/heads/GROOVY_3_0_X by this push:
     new 8b3af40  Grape usage not needed for this test
8b3af40 is described below

commit 8b3af40c57f268e7ff5d0d6a2d3103076a5601ba
Author: Paul King <[email protected]>
AuthorDate: Fri Nov 27 12:07:38 2020 +1000

    Grape usage not needed for this test
---
 subprojects/groovy-json/build.gradle                   |  2 ++
 .../src/spec/test/json/JsonBuilderTest.groovy          | 18 +-----------------
 2 files changed, 3 insertions(+), 17 deletions(-)

diff --git a/subprojects/groovy-json/build.gradle 
b/subprojects/groovy-json/build.gradle
index 9cb272b..57893d5 100644
--- a/subprojects/groovy-json/build.gradle
+++ b/subprojects/groovy-json/build.gradle
@@ -20,6 +20,8 @@ dependencies {
     api rootProject  // JsonBuilder extends GroovyObjectSupport...
     testImplementation project(':groovy-test')
     testImplementation project(':groovy-dateutil')
+    testImplementation 'net.javacrumbs.json-unit:json-unit:1.5.6'
+    testRuntime 'com.google.code.gson:gson:2.3.1' // json-unit requires gson, 
jackson1, or jackson2
     testRuntime "org.slf4j:slf4j-api:$slf4jVersion"
     testRuntime project(':groovy-ant') // for JavadocAssertionTests
 }
diff --git a/subprojects/groovy-json/src/spec/test/json/JsonBuilderTest.groovy 
b/subprojects/groovy-json/src/spec/test/json/JsonBuilderTest.groovy
index d05eedc..3ba224a 100644
--- a/subprojects/groovy-json/src/spec/test/json/JsonBuilderTest.groovy
+++ b/subprojects/groovy-json/src/spec/test/json/JsonBuilderTest.groovy
@@ -18,32 +18,16 @@
  */
 package json
 
-import org.junit.BeforeClass
 import org.junit.Test
 
-import static groovy.grape.Grape.resolve
 import static groovy.test.GroovyAssert.assertScript
 
 final class JsonBuilderTest {
-
-    @BeforeClass
-    static void setUpClass() {
-        // make sure files are installed locally
-        [
-            [groupId:'com.google.code.gson', artifactId:'gson', 
version:'2.3.1'],
-            [groupId:'net.javacrumbs.json-unit', artifactId:'json-unit', 
version:'1.5.6']
-        ].each { spec ->
-            resolve([autoDownload:true, classLoader:new GroovyClassLoader()], 
spec)
-        }
-    }
-
     @Test
     void testJsonBuilder() {
         assertScript """
-            @Grab('com.google.code.gson:gson:2.3.1') // json-unit requires 
gson, jackson1, or jackson2
-            @Grab('net.javacrumbs.json-unit:json-unit:1.5.6')
-            import net.javacrumbs.jsonunit.JsonAssert
             import groovy.json.*
+            import net.javacrumbs.jsonunit.JsonAssert
 
             // tag::json_string[]
             String carRecords = '''

Reply via email to