mirror of
https://github.com/Eyre-S/Coeur-Morny-Cono.git
synced 2024-11-22 11:14:55 +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'
|
group 'cc.sukazyo'
|
||||||
version '0.3.0'
|
version '0.3.1'
|
||||||
project.ext.archiveBaseName = 'Coeur_Morny_Cono'
|
project.ext.archiveBaseName = 'Coeur_Morny_Cono'
|
||||||
project.ext.artifactId = 'morny-coeur'
|
project.ext.artifactId = 'morny-coeur'
|
||||||
mainClassName = 'cc.sukazyo.cono.morny.MornyCoeur'
|
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 {
|
test {
|
||||||
useJUnitPlatform()
|
useJUnitPlatform()
|
||||||
}
|
}
|
||||||
@ -46,15 +52,6 @@ tasks.test {
|
|||||||
useJUnitPlatform()
|
useJUnitPlatform()
|
||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: 'com.github.johnrengelman.shadow'
|
|
||||||
apply plugin: 'application'
|
|
||||||
|
|
||||||
shadowJar {
|
|
||||||
archiveBaseName.set("${project.ext.archiveBaseName}")
|
|
||||||
archiveVersion.set("${project.version}")
|
|
||||||
archiveClassifier.set("fat")
|
|
||||||
}
|
|
||||||
|
|
||||||
shadowJar {
|
shadowJar {
|
||||||
archiveBaseName.set("${project.ext.archiveBaseName}")
|
archiveBaseName.set("${project.ext.archiveBaseName}")
|
||||||
archiveVersion.set("${project.version}")
|
archiveVersion.set("${project.version}")
|
||||||
|
@ -15,7 +15,10 @@ public class MornyCoeur {
|
|||||||
|
|
||||||
public static void main (String[] args) {
|
public static void main (String[] args) {
|
||||||
|
|
||||||
|
if (!(args.length > 1 && "--no-hello".equals(args[1])))
|
||||||
logger.info(MornyHello.MORNY_PREVIEW_IMAGE_ASCII);
|
logger.info(MornyHello.MORNY_PREVIEW_IMAGE_ASCII);
|
||||||
|
if (args.length > 1 && "--only-hello".equals(args[1]))
|
||||||
|
return;
|
||||||
logger.info("System Starting");
|
logger.info("System Starting");
|
||||||
|
|
||||||
configureSafeExit();
|
configureSafeExit();
|
||||||
|
@ -6,7 +6,7 @@ import java.net.URISyntaxException;
|
|||||||
|
|
||||||
public class MornySystem {
|
public class MornySystem {
|
||||||
|
|
||||||
public static final String VERSION = "0.3.0";
|
public static final String VERSION = "@G_DEV_VERSION@";
|
||||||
|
|
||||||
public static String getJarMd5() {
|
public static String getJarMd5() {
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user