bump Gradle version

This commit is contained in:
2022-01-16 15:36:55 +08:00
parent 47c33036d1
commit 139d160274
11 changed files with 37 additions and 49 deletions

5
.gitignore vendored
View File

@@ -1,2 +1,5 @@
.idea
build
target
.idea
.gradle

View File

@@ -59,6 +59,11 @@ java {
withSourcesJar()
}
compileJava {
options.release = 8
options.compilerArgs << '-parameters'
}
wrapper {
distributionType = Wrapper.DistributionType.BIN
gradleVersion = getProperty("version.gradle")

View File

@@ -13,3 +13,10 @@ dependencies {
application {
mainClassName = 'net.woggioni.wson.cli.MainKt'
}
compileKotlin {
kotlinOptions.with {
jvmTarget = '1.8'
}
}

View File

@@ -1,11 +1,11 @@
version.gradle=7.1.1
version.gradle=7.3.3
version.wson = 1.0
version.jwo = 1.0
version.junit.jupiter = 5.7.0
version.lombok = 1.18.16
version.slf4j = 1.7.30
version.jackson = 2.12.3
version.jcommander = 1.81
version.antlr = 4.9.2
version.xz = 1.8
version.kotlin=1.5.10
version.lombok = 1.18.22
version.slf4j = 1.7.32
version.jackson = 2.13.1
version.jcommander = 1.82
version.antlr = 4.9.3
version.xz = 1.9
version.kotlin=1.6.10

Binary file not shown.

View File

@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

2
gradlew vendored
View File

@@ -72,7 +72,7 @@ case "`uname`" in
Darwin* )
darwin=true
;;
MINGW* )
MSYS* | MINGW* )
msys=true
;;
NONSTOP* )

View File

@@ -1,29 +0,0 @@
package net.woggioni.wson;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.io.TempDir;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
public class Foo {
@TempDir
Path tempDir;
@BeforeEach
void beforeEach() {
Assertions.assertTrue(Files.isDirectory(this.tempDir));
}
@Test
void throwsErrorWhenTargetFileExists() throws IOException {
Path output = Files.createFile(
tempDir.resolve("output.txt")
);
}
}

View File

@@ -8,10 +8,12 @@ import net.woggioni.wson.test.JsonBomb;
import net.woggioni.wson.xface.Parser;
import net.woggioni.wson.xface.Value;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
public class JsonBombTest {
@Test
@Disabled
@SneakyThrows
public void jackson() {
ObjectMapper om = new ObjectMapper();

View File

@@ -76,7 +76,7 @@ public class ValueWalkerTest {
List<Value> preResult = new ArrayList<>();
List<Value> postResult = new ArrayList<>();
walk(preResult, postResult, root);
return new Tuple2<>(preResult, postResult);
return Tuple2.newInstance(preResult, postResult);
}
@Test
@@ -86,6 +86,6 @@ public class ValueWalkerTest {
ValueWalker.walk(v, visitor);
Assertions.assertFalse(visitor.preValues.isEmpty());
Assertions.assertFalse(visitor.postValues.isEmpty());
Assertions.assertEquals(recursiveWalk(v), new Tuple2<>(visitor.preValues, visitor.postValues));
Assertions.assertEquals(recursiveWalk(v), Tuple2.newInstance(visitor.preValues, visitor.postValues));
}
}

View File

@@ -12,10 +12,10 @@ public class ObjectValueImplementationTest {
private static List<Tuple2<ObjectValue.Implementation, Class<? extends ObjectValue>>> getImplementationMapping() {
return Arrays.asList(
new Tuple2<>(ObjectValue.Implementation.ArrayList, ListObjectValue.class),
new Tuple2<>(ObjectValue.Implementation.TreeMap, TreeMapObjectValue.class),
new Tuple2<>(ObjectValue.Implementation.HashMap, HashMapObjectValue.class),
new Tuple2<>(ObjectValue.Implementation.LinkedHashMap, LinkedHashMapObjectValue.class)
Tuple2.newInstance(ObjectValue.Implementation.ArrayList, ListObjectValue.class),
Tuple2.newInstance(ObjectValue.Implementation.TreeMap, TreeMapObjectValue.class),
Tuple2.newInstance(ObjectValue.Implementation.HashMap, HashMapObjectValue.class),
Tuple2.newInstance(ObjectValue.Implementation.LinkedHashMap, LinkedHashMapObjectValue.class)
);
}
@@ -26,15 +26,15 @@ public class ObjectValueImplementationTest {
ObjectValue.Implementation expectedImplementation =
ObjectValue.Implementation.valueOf(System.getProperty(ObjectValue.class.getName() + ".implementation", "TreeMap"));
Class<? extends ObjectValue> expectedClass =
mapping.stream().filter(t -> t._1 == expectedImplementation).findFirst().get()._2;
mapping.stream().filter(t -> t.get_1() == expectedImplementation).findFirst().get().get_2();
ObjectValue obj = ObjectValue.newInstance();
Assertions.assertEquals(expectedClass, obj.getClass());
mapping.forEach(tuple -> {
Value.Configuration cfg = Value.Configuration.builder()
.objectValueImplementation(tuple._1)
.objectValueImplementation(tuple.get_1())
.build();
ObjectValue obj2 = ObjectValue.newInstance(cfg);
Assertions.assertEquals(tuple._2, obj2.getClass());
Assertions.assertEquals(tuple.get_2(), obj2.getClass());
});
}