2021-10-07 20:50:59 +08:00
|
|
|
plugins {
|
|
|
|
id 'java'
|
2021-11-26 14:09:40 +08:00
|
|
|
id 'maven-publish'
|
|
|
|
id 'application'
|
|
|
|
id 'com.github.johnrengelman.shadow' version '7.1.0'
|
2021-10-07 20:50:59 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
group 'cc.sukazyo'
|
2021-11-26 22:26:02 +08:00
|
|
|
version '0.3.1'
|
2021-11-26 14:09:40 +08:00
|
|
|
project.ext.archiveBaseName = 'Coeur_Morny_Cono'
|
|
|
|
project.ext.artifactId = 'morny-coeur'
|
|
|
|
mainClassName = 'cc.sukazyo.cono.morny.MornyCoeur'
|
2021-10-07 20:50:59 +08:00
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2021-11-06 20:43:56 +08:00
|
|
|
|
|
|
|
implementation 'com.github.pengrad:java-telegram-bot-api:5.3.0'
|
|
|
|
|
2021-10-07 20:50:59 +08:00
|
|
|
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
|
|
|
|
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
|
2021-11-06 20:43:56 +08:00
|
|
|
|
2021-10-07 20:50:59 +08:00
|
|
|
}
|
|
|
|
|
2021-11-26 22:26:02 +08:00
|
|
|
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')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-10-07 20:50:59 +08:00
|
|
|
test {
|
|
|
|
useJUnitPlatform()
|
|
|
|
}
|
2021-11-09 17:33:56 +08:00
|
|
|
|
2021-11-26 14:09:40 +08:00
|
|
|
java {
|
|
|
|
withSourcesJar()
|
|
|
|
}
|
|
|
|
|
2021-11-09 17:33:56 +08:00
|
|
|
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()
|
|
|
|
}
|
|
|
|
|
2021-11-26 14:09:40 +08:00
|
|
|
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
|
|
|
|
}
|
|
|
|
}
|
2021-11-09 17:33:56 +08:00
|
|
|
}
|