67 lines
1.7 KiB
Groovy
67 lines
1.7 KiB
Groovy
plugins {
|
|
id 'java'
|
|
}
|
|
|
|
group = 'cn.hamster3.mc.plugin'
|
|
version = '1.0.0-SNAPSHOT'
|
|
|
|
subprojects {
|
|
apply plugin: 'java'
|
|
|
|
group = rootProject.group
|
|
version = rootProject.version
|
|
|
|
repositories {
|
|
maven {
|
|
url = uri("https://maven.airgame.net/maven-public/")
|
|
}
|
|
}
|
|
|
|
configurations {
|
|
shade
|
|
api.extendsFrom apiShade
|
|
implementation.extendsFrom implementationShade
|
|
}
|
|
|
|
dependencies {
|
|
// https://mvnrepository.com/artifact/org.projectlombok/lombok
|
|
compileOnly 'org.projectlombok:lombok:1.18.24'
|
|
annotationProcessor 'org.projectlombok:lombok:1.18.24'
|
|
|
|
// https://mvnrepository.com/artifact/org.jetbrains/annotations
|
|
compileOnly 'org.jetbrains:annotations:23.0.0'
|
|
|
|
//noinspection VulnerableLibrariesLocal
|
|
compileOnly "org.spigotmc:spigot-api:${spigot_api_version}"
|
|
//noinspection VulnerableLibrariesLocal
|
|
compileOnly "net.md-5:bungeecord-api:${bungeecord_api_version}"
|
|
}
|
|
|
|
tasks.withType(JavaCompile).configureEach {
|
|
options.setEncoding("UTF-8")
|
|
}
|
|
|
|
tasks.withType(Jar).configureEach {
|
|
from([rootProject.file("LICENSE")])
|
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
|
}
|
|
|
|
java {
|
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
targetCompatibility = JavaVersion.VERSION_1_8
|
|
// withJavadocJar()
|
|
withSourcesJar()
|
|
}
|
|
|
|
jar {
|
|
destinationDirectory = rootProject.buildDir
|
|
}
|
|
|
|
processResources {
|
|
filesMatching(["plugin.yml", "bungee.yml"]) {
|
|
expand project.properties
|
|
}
|
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
|
}
|
|
}
|