mirror of
https://github.com/Eyre-S/Coeur-Morny-Cono.git
synced 2024-11-24 20:17:38 +08:00
Eyre_S
dc332de50c
- 项目的版本数据现在由 gradle.properties 管理 - 修复 outdated-block 的实现中单位计算出现错误导致的全部消息都会被阻止的问题 - EventAPI 添加 ChatJoinRequest 事件支持 - 更改 TrackerDataManager 守护线程的关机清理的消息和优先级 - 修订 MornyCoeur 类 javadoc 换行,删除 ServerMain javadoc无用信息
98 lines
2.1 KiB
Groovy
98 lines
2.1 KiB
Groovy
plugins {
|
|
id 'java'
|
|
id 'java-library'
|
|
id 'maven-publish'
|
|
id 'application'
|
|
id 'com.github.johnrengelman.shadow' version '7.1.0'
|
|
}
|
|
|
|
group 'cc.sukazyo'
|
|
version VERSION
|
|
project.ext.archiveBaseName = 'Coeur_Morny_Cono'
|
|
project.ext.artifactId = 'morny-coeur'
|
|
mainClassName = 'cc.sukazyo.cono.morny.ServerMain'
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
|
|
compileOnlyApi "com.github.spotbugs:spotbugs-annotations:${libSpotbugsVersion}"
|
|
|
|
implementation "com.github.pengrad:java-telegram-bot-api:${libJavaTelegramBotApiVersion}"
|
|
|
|
testImplementation "org.junit.jupiter:junit-jupiter-api:${libJunitVersion}"
|
|
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${libJunitVersion}"
|
|
|
|
}
|
|
|
|
task updateVersionCode {
|
|
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: 'GradleProjectConfigures.java')
|
|
}
|
|
ant.replaceregexp(match:'COMPILE_TIMESTAMP = [0-9]+L;', replace:"COMPILE_TIMESTAMP = ${System.currentTimeMillis()}L;", flags:'g', byline:true) {
|
|
fileset(dir: 'src/main/java/cc/sukazyo/cono/morny', includes: 'GradleProjectConfigures.java')
|
|
}
|
|
}
|
|
|
|
compileJava.dependsOn updateVersionCode
|
|
|
|
test {
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
java {
|
|
|
|
sourceCompatibility JavaVersion.VERSION_17
|
|
targetCompatibility JavaVersion.VERSION_17
|
|
|
|
withSourcesJar()
|
|
|
|
}
|
|
|
|
tasks.withType(JavaCompile) {
|
|
options.encoding = "UTF-8"
|
|
}
|
|
|
|
tasks.withType(Javadoc) {
|
|
options.encoding = 'UTF-8'
|
|
options.docEncoding = 'UTF-8'
|
|
options.charSet = 'UTF-8'
|
|
}
|
|
|
|
tasks.test {
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
shadowJar {
|
|
archiveBaseName.set("${project.ext.archiveBaseName}")
|
|
archiveVersion.set("${project.version}")
|
|
archiveClassifier.set("fat")
|
|
}
|
|
|
|
publishing {
|
|
repositories{
|
|
maven {
|
|
name 'builds'
|
|
url = "file://" + new File("./build/publishing").getAbsolutePath()
|
|
}
|
|
maven {
|
|
name '-ws-'
|
|
url publishMvnRepoUrl
|
|
credentials {
|
|
username publishMvnRepoUsername
|
|
password publishMvnRepoPassword
|
|
}
|
|
}
|
|
}
|
|
publications {
|
|
main (MavenPublication) {
|
|
from components.java
|
|
groupId = project.group
|
|
artifactId = project.ext.artifactId
|
|
version = project.version
|
|
}
|
|
}
|
|
}
|