From a7622bf68797732f31b38bbef81a294c3c0b1d0a Mon Sep 17 00:00:00 2001 From: Eyre_S Date: Thu, 17 Nov 2022 17:22:51 +0800 Subject: [PATCH] add submodule sekai-scores-db, update build.gradle --- .gitignore | 2 ++ build.gradle | 27 ++++++++++++++----- gradle.properties | 2 +- sekai-scores-db/build.gradle | 23 ++++++++++++++++ sekai-scores-db/gradle.properties | 4 +++ settings.gradle | 1 + .../cc/sukazyo/sekai_scores/ScoreBase.java | 1 - .../sukazyo/sekai_scores/ScoreBaseData.java | 1 - 8 files changed, 52 insertions(+), 9 deletions(-) create mode 100644 sekai-scores-db/build.gradle create mode 100644 sekai-scores-db/gradle.properties diff --git a/.gitignore b/.gitignore index a3b4f87..1d26366 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ .gradle .idea +build +src/test/java/test/ diff --git a/build.gradle b/build.gradle index 9c8e312..e0c70b9 100644 --- a/build.gradle +++ b/build.gradle @@ -1,14 +1,13 @@ +import java.nio.charset.Charset +import java.nio.charset.StandardCharsets + plugins { id 'java' id 'maven-publish' } -group 'cc.sukazyo' -version projVersion - repositories { mavenCentral() - maven { name '-ws'; url 'https://mvn.sukazyo.cc/releases' } } dependencies { @@ -21,19 +20,35 @@ dependencies { } +final JavaVersion proj_java = JavaVersion.VERSION_17 +final Charset proj_source_encoding = StandardCharsets.UTF_8 + +group 'cc.sukazyo' +version projVersion + test { useJUnitPlatform() } java { - sourceCompatibility JavaVersion.VERSION_17 - targetCompatibility JavaVersion.VERSION_17 + sourceCompatibility proj_java + targetCompatibility proj_java withSourcesJar() } +tasks.withType(JavaCompile) { + options.encoding = proj_source_encoding.name() +} + +tasks.withType(Javadoc) { + options.encoding = proj_source_encoding.name() + options.docEncoding = proj_source_encoding.name() + options.charSet = proj_source_encoding.name() +} + publishing { repositories{ maven { diff --git a/gradle.properties b/gradle.properties index d46ee87..809a296 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,4 +6,4 @@ projVersion = 0.1 # Dependencies lib_junit_v = 5.9.0 -lib_spotbugs_v = 4.7.2 +lib_spotbugs_v = 4.7.3 diff --git a/sekai-scores-db/build.gradle b/sekai-scores-db/build.gradle new file mode 100644 index 0000000..5cc6ce0 --- /dev/null +++ b/sekai-scores-db/build.gradle @@ -0,0 +1,23 @@ +plugins { + id 'java' +} + +group 'cc.sukazyo' +version moduleVersion + +repositories { + mavenCentral() +} + +dependencies { + + implementation rootProject + + testImplementation "org.junit.jupiter:junit-jupiter-api:${lib_junit_v}" + testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${lib_junit_v}" + +} + +test { + useJUnitPlatform() +} \ No newline at end of file diff --git a/sekai-scores-db/gradle.properties b/sekai-scores-db/gradle.properties new file mode 100644 index 0000000..4eafd05 --- /dev/null +++ b/sekai-scores-db/gradle.properties @@ -0,0 +1,4 @@ +## Project Configurations + +# Proj Metadata +moduleVersion = 0.1 diff --git a/settings.gradle b/settings.gradle index 5c01a11..cb5982e 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,3 +1,4 @@ rootProject.name = 'sekai-scores' include 'sekai-cli' +include 'sekai-scores-db' diff --git a/src/main/java/cc/sukazyo/sekai_scores/ScoreBase.java b/src/main/java/cc/sukazyo/sekai_scores/ScoreBase.java index 0fe170b..437e522 100644 --- a/src/main/java/cc/sukazyo/sekai_scores/ScoreBase.java +++ b/src/main/java/cc/sukazyo/sekai_scores/ScoreBase.java @@ -1,7 +1,6 @@ package cc.sukazyo.sekai_scores; /** - * 由于数据定义了好长所以数据定义被独立出来了,看下面的引用. * @see ScoreBaseData */ public class ScoreBase extends ScoreBaseData { diff --git a/src/main/java/cc/sukazyo/sekai_scores/ScoreBaseData.java b/src/main/java/cc/sukazyo/sekai_scores/ScoreBaseData.java index 8342dc8..9577c29 100644 --- a/src/main/java/cc/sukazyo/sekai_scores/ScoreBaseData.java +++ b/src/main/java/cc/sukazyo/sekai_scores/ScoreBaseData.java @@ -4,7 +4,6 @@ import javax.annotation.CheckForSigned; import javax.annotation.Nonnegative; /** - * 因为单写完数据感觉就太长了于是把数据模型独立出来了让本来的类里能好好写工具方法. * @see ScoreBase */ public class ScoreBaseData {