From cef31aa1fea16cc61daf910c8c775dc9a5991215 Mon Sep 17 00:00:00 2001 From: Eyre_S Date: Fri, 26 Nov 2021 22:26:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20gradle=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E5=8F=B7=E4=BB=A3=E7=A0=81=E5=86=85=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E6=9B=BF=E6=8D=A2=EF=BC=8C=E6=B7=BB=E5=8A=A0=E6=AC=A2=E8=BF=8E?= =?UTF-8?q?=E8=AF=AD=E5=BC=80=E5=85=B3=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 17 +++++++---------- .../java/cc/sukazyo/cono/morny/MornyCoeur.java | 5 ++++- .../java/cc/sukazyo/cono/morny/MornySystem.java | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/build.gradle b/build.gradle index fb0257b..709257b 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ plugins { } group 'cc.sukazyo' -version '0.3.0' +version '0.3.1' project.ext.archiveBaseName = 'Coeur_Morny_Cono' project.ext.artifactId = 'morny-coeur' mainClassName = 'cc.sukazyo.cono.morny.MornyCoeur' @@ -24,6 +24,12 @@ dependencies { } +compileJava.doFirst { + ant.replaceregexp(match:'VERSION = ["a-zA-Z0-9.\\-_+@]+;', replace:"VERSION = \"$project.version\";", flags:'g', byline:true) { + fileset(dir: 'src/main/java/cc/sukazyo/cono/morny', includes: 'MornySystem.java') + } +} + test { useJUnitPlatform() } @@ -46,15 +52,6 @@ tasks.test { useJUnitPlatform() } -apply plugin: 'com.github.johnrengelman.shadow' -apply plugin: 'application' - -shadowJar { - archiveBaseName.set("${project.ext.archiveBaseName}") - archiveVersion.set("${project.version}") - archiveClassifier.set("fat") -} - shadowJar { archiveBaseName.set("${project.ext.archiveBaseName}") archiveVersion.set("${project.version}") diff --git a/src/main/java/cc/sukazyo/cono/morny/MornyCoeur.java b/src/main/java/cc/sukazyo/cono/morny/MornyCoeur.java index e6fd6cd..f652188 100644 --- a/src/main/java/cc/sukazyo/cono/morny/MornyCoeur.java +++ b/src/main/java/cc/sukazyo/cono/morny/MornyCoeur.java @@ -15,7 +15,10 @@ public class MornyCoeur { public static void main (String[] args) { - logger.info(MornyHello.MORNY_PREVIEW_IMAGE_ASCII); + if (!(args.length > 1 && "--no-hello".equals(args[1]))) + logger.info(MornyHello.MORNY_PREVIEW_IMAGE_ASCII); + if (args.length > 1 && "--only-hello".equals(args[1])) + return; logger.info("System Starting"); configureSafeExit(); diff --git a/src/main/java/cc/sukazyo/cono/morny/MornySystem.java b/src/main/java/cc/sukazyo/cono/morny/MornySystem.java index bedb6b3..4fbfe17 100644 --- a/src/main/java/cc/sukazyo/cono/morny/MornySystem.java +++ b/src/main/java/cc/sukazyo/cono/morny/MornySystem.java @@ -6,7 +6,7 @@ import java.net.URISyntaxException; public class MornySystem { - public static final String VERSION = "0.3.0"; + public static final String VERSION = "@G_DEV_VERSION@"; public static String getJarMd5() { try {