mirror of
https://github.com/Xiao-MoMi/Custom-Nameplates.git
synced 2025-12-26 02:19:28 +00:00
87 lines
2.5 KiB
Groovy
87 lines
2.5 KiB
Groovy
plugins {
|
|
id 'java'
|
|
id 'com.github.johnrengelman.shadow' version '7.1.2'
|
|
}
|
|
|
|
group = 'net.momirealms'
|
|
version = '1.8.7'
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven {
|
|
name = 'papermc-repo'
|
|
url = 'https://papermc.io/repo/repository/maven-public/'
|
|
}
|
|
maven {
|
|
name = 'sonatype'
|
|
url = 'https://oss.sonatype.org/content/groups/public/'
|
|
}
|
|
maven {
|
|
name = "sonatype-oss-snapshots1"
|
|
url = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
|
|
}
|
|
maven {
|
|
name = "dmulloy2-repo"
|
|
url = "https://repo.dmulloy2.net/repository/public/"
|
|
}
|
|
maven {
|
|
name = "clip-repo"
|
|
url = 'https://repo.extendedclip.com/content/repositories/placeholderapi/'
|
|
}
|
|
maven {
|
|
name = "jitpack"
|
|
url = 'https://jitpack.io'
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
compileOnly fileTree(dir:'libs',includes:['*.jar'])
|
|
compileOnly 'com.destroystokyo.paper:paper-api:1.16.5-R0.1-SNAPSHOT'
|
|
compileOnly 'com.comphenix.protocol:ProtocolLib:4.8.0'
|
|
compileOnly 'me.clip:placeholderapi:2.11.1'
|
|
compileOnly 'com.zaxxer:HikariCP:5.0.1'
|
|
compileOnly 'commons-io:commons-io:2.11.0'
|
|
compileOnly 'dev.dejvokep:boosted-yaml:1.3'
|
|
implementation('net.kyori:adventure-api:4.11.0')
|
|
implementation('net.kyori:adventure-platform-bukkit:4.1.1')
|
|
implementation('net.kyori:adventure-text-minimessage:4.11.0')
|
|
implementation('net.kyori:adventure-text-serializer-gson:4.11.0')
|
|
}
|
|
|
|
def targetJavaVersion = 16
|
|
java {
|
|
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
|
|
sourceCompatibility = javaVersion
|
|
targetCompatibility = javaVersion
|
|
if (JavaVersion.current() < javaVersion) {
|
|
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
|
|
}
|
|
}
|
|
|
|
tasks.withType(JavaCompile).configureEach {
|
|
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
|
|
options.release = targetJavaVersion
|
|
}
|
|
}
|
|
|
|
processResources {
|
|
def props = [version: version]
|
|
inputs.properties props
|
|
filteringCharset 'UTF-8'
|
|
filesMatching('plugin.yml') {
|
|
expand props
|
|
}
|
|
}
|
|
|
|
tasks.withType(JavaCompile) {
|
|
options.encoding = "UTF-8"
|
|
}
|
|
|
|
shadowJar {
|
|
relocate ('net.kyori', 'libs.kyori')
|
|
}
|
|
tasks.register("delete", Delete).get().delete("build/libs/"+project.name+"-"+project.version+".jar")
|
|
tasks.named("build").get().dependsOn("shadowJar").finalizedBy("delete").doLast {
|
|
println("Deleting: "+ "build/libs/"+project.name+"-"+project.version+".jar")
|
|
}
|