From 3d7da65a1aff8bc12e641a1a13a34fba70dc3ec1 Mon Sep 17 00:00:00 2001 From: SomeBottle Date: Fri, 16 Aug 2024 00:08:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E9=80=9A=E8=BF=87=EF=BC=8C?= =?UTF-8?q?=E5=B7=B2=E6=94=AF=E6=8C=81=20Java=208=20API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/PotatoPeeler/build.sh | 2 +- source/PotatoPeeler/dependency-reduced-pom.xml | 11 ++++++++++- source/PotatoPeeler/pom.multiple.xml | 17 +++++++++++++---- source/PotatoPeeler/pom.xml | 2 +- .../indi/somebottle/logger/LoggerFormatter.java | 1 - .../java/indi/somebottle/utils/ArgsUtils.java | 1 - .../java/indi/somebottle/utils/TimeUtils.java | 1 - 7 files changed, 25 insertions(+), 10 deletions(-) diff --git a/source/PotatoPeeler/build.sh b/source/PotatoPeeler/build.sh index 8a820bb..15d7d3b 100644 --- a/source/PotatoPeeler/build.sh +++ b/source/PotatoPeeler/build.sh @@ -8,7 +8,7 @@ mkdir -p $OUTPUT_DIR # Maven Profiles -for p in java11 java16 java17 java21; do +for p in java8 java11 java16 java17 java21; do # Skip tests mvn clean package -f pom.multiple.xml -DskipTests -P$p cp target/PotatoPeeler*java*.jar $OUTPUT_DIR diff --git a/source/PotatoPeeler/dependency-reduced-pom.xml b/source/PotatoPeeler/dependency-reduced-pom.xml index 26fe24a..5ba0fb7 100644 --- a/source/PotatoPeeler/dependency-reduced-pom.xml +++ b/source/PotatoPeeler/dependency-reduced-pom.xml @@ -3,7 +3,7 @@ 4.0.0 indi.somebottle potatopeeler - 1.0.0 + 1.0.1 @@ -37,6 +37,15 @@ + + java8 + + 1.8 + 1.8 + 8 + UTF-8 + + java11 diff --git a/source/PotatoPeeler/pom.multiple.xml b/source/PotatoPeeler/pom.multiple.xml index a7bdd53..92676ac 100644 --- a/source/PotatoPeeler/pom.multiple.xml +++ b/source/PotatoPeeler/pom.multiple.xml @@ -1,12 +1,12 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 indi.somebottle potatopeeler - 1.0.0 + 1.0.1 @@ -28,6 +28,15 @@ + + java8 + + 1.8 + 1.8 + UTF-8 + 8 + + java11 @@ -90,7 +99,7 @@ + implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> indi.somebottle.Main diff --git a/source/PotatoPeeler/pom.xml b/source/PotatoPeeler/pom.xml index 7b79a9a..9154717 100644 --- a/source/PotatoPeeler/pom.xml +++ b/source/PotatoPeeler/pom.xml @@ -6,7 +6,7 @@ indi.somebottle potatopeeler - 1.0.0 + 1.0.1 21 diff --git a/source/PotatoPeeler/src/main/java/indi/somebottle/logger/LoggerFormatter.java b/source/PotatoPeeler/src/main/java/indi/somebottle/logger/LoggerFormatter.java index 2b84884..8e02bb1 100644 --- a/source/PotatoPeeler/src/main/java/indi/somebottle/logger/LoggerFormatter.java +++ b/source/PotatoPeeler/src/main/java/indi/somebottle/logger/LoggerFormatter.java @@ -11,7 +11,6 @@ public class LoggerFormatter extends Formatter { private static final SimpleDateFormat dateFormatter = new SimpleDateFormat("[yyyy-MM-dd HH:mm:ss]"); - // TODO:待测试:Logger 格式化不输出中文字符 @Override public String format(LogRecord record) { StringBuilder sb = new StringBuilder("[PotatoPeeler] "); diff --git a/source/PotatoPeeler/src/main/java/indi/somebottle/utils/ArgsUtils.java b/source/PotatoPeeler/src/main/java/indi/somebottle/utils/ArgsUtils.java index 3ba273b..aea6709 100644 --- a/source/PotatoPeeler/src/main/java/indi/somebottle/utils/ArgsUtils.java +++ b/source/PotatoPeeler/src/main/java/indi/somebottle/utils/ArgsUtils.java @@ -45,7 +45,6 @@ public class ArgsUtils { * @throws IOException 文件读取失败时抛出;文件没有提供任何参数时也会抛出 */ public static String[] readArgsFromFile(String filePath) throws IOException { - // TODO: 待测试是否能正常工作 Path argFilePath = Paths.get(filePath); byte[] allBytes = Files.readAllBytes(argFilePath); String[] argList = new String(allBytes).split("\\s+"); diff --git a/source/PotatoPeeler/src/main/java/indi/somebottle/utils/TimeUtils.java b/source/PotatoPeeler/src/main/java/indi/somebottle/utils/TimeUtils.java index 618d180..ff3f6b9 100644 --- a/source/PotatoPeeler/src/main/java/indi/somebottle/utils/TimeUtils.java +++ b/source/PotatoPeeler/src/main/java/indi/somebottle/utils/TimeUtils.java @@ -17,7 +17,6 @@ public class TimeUtils { // 上次运行的时间 private static long lastRunTime = 0; - // TODO: 测试在 Java 8 API 下是否能正常工作 static { if (Files.exists(timeRecordFilePath)) { try {