mirror of
https://github.com/Eyre-S/Coeur-Morny-Cono.git
synced 2024-11-22 03:04:54 +08:00
添加 gradle 版本号代码内动态替换,添加欢迎语开关参数
This commit is contained in:
parent
c715287fb7
commit
cef31aa1fe
17
build.gradle
17
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}")
|
||||
|
@ -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();
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user