feat: 使用 redission 作为消息中间件
This commit is contained in:
83
build.gradle.kts
Normal file
83
build.gradle.kts
Normal file
@@ -0,0 +1,83 @@
|
||||
plugins {
|
||||
id("java")
|
||||
id("maven-publish")
|
||||
id("com.github.johnrengelman.shadow") version "8+"
|
||||
}
|
||||
|
||||
group = "cn.hamster3.mc.plugin"
|
||||
version = "1.1.0-SNAPSHOT"
|
||||
|
||||
subprojects {
|
||||
apply {
|
||||
plugin("java")
|
||||
plugin("maven-publish")
|
||||
plugin("com.github.johnrengelman.shadow")
|
||||
}
|
||||
|
||||
group = rootProject.group
|
||||
version = rootProject.version
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
url = uri("https://maven.airgame.net/maven-public/")
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// https://mvnrepository.com/artifact/org.jetbrains/annotations
|
||||
implementation("org.jetbrains:annotations:24.0.1")
|
||||
// https://mvnrepository.com/artifact/org.projectlombok/lombok
|
||||
compileOnly("org.projectlombok:lombok:1.18.28")
|
||||
annotationProcessor("org.projectlombok:lombok:1.18.28")
|
||||
}
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
// withJavadocJar()
|
||||
withSourcesJar()
|
||||
}
|
||||
|
||||
tasks {
|
||||
withType<JavaCompile>().configureEach {
|
||||
options.encoding = "UTF-8"
|
||||
}
|
||||
withType<Jar>().configureEach {
|
||||
from(rootProject.file("LICENSE"))
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
}
|
||||
javadoc {
|
||||
options.jFlags("-Dfile.encoding=utf8")
|
||||
options.encoding = "UTF-8"
|
||||
options.quiet()
|
||||
val o: StandardJavadocDocletOptions = options as StandardJavadocDocletOptions
|
||||
o.addStringOption("Xdoclint:none", "-quiet")
|
||||
o.links(
|
||||
"https://javadoc.io/doc/org.jetbrains/annotations/23.0.0",
|
||||
"https://javadoc.io/doc/com.google.code.gson/gson/2.8.0",
|
||||
"https://bukkit.windit.net/javadoc"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
create<MavenPublication>("mavenJava") {
|
||||
from(components["java"])
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
maven {
|
||||
val releasesRepoUrl = uri("https://maven.airgame.net/maven-releases/")
|
||||
val snapshotsRepoUrl = uri("https://maven.airgame.net/maven-snapshots/")
|
||||
|
||||
url = if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl
|
||||
|
||||
credentials {
|
||||
username = rootProject.properties.getOrDefault("maven_username", "").toString()
|
||||
password = rootProject.properties.getOrDefault("maven_password", "").toString()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user