64 lines
1.7 KiB
Groovy
64 lines
1.7 KiB
Groovy
plugins {
|
|
id 'java'
|
|
id("com.github.johnrengelman.shadow") version "8.1.1"
|
|
id("xyz.jpenilla.run-paper") version "2.1.0"
|
|
}
|
|
|
|
group = 'com.the5gi'
|
|
version = '1.0.0'
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven {
|
|
name = "spigotmc-repo"
|
|
url = "https://hub.spigotmc.org/nexus/content/repositories/snapshots/"
|
|
}
|
|
maven {
|
|
name = "sonatype"
|
|
url = "https://oss.sonatype.org/content/groups/public/"
|
|
}
|
|
maven { url 'https://jitpack.io' }
|
|
maven {
|
|
url = 'https://repo.extendedclip.com/content/repositories/placeholderapi/'
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
compileOnly "org.spigotmc:spigot-api:1.20.1-R0.1-SNAPSHOT"
|
|
implementation 'com.github.Carleslc.Simple-YAML:Simple-Yaml:1.8.4'
|
|
compileOnly 'me.clip:placeholderapi:2.11.3'
|
|
}
|
|
|
|
def targetJavaVersion = 17
|
|
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 {
|
|
runServer {
|
|
// Configure the Minecraft version for our task.
|
|
// This is the only required configuration besides applying the plugin.
|
|
// Your plugin's jar (or shadowJar if present) will be used automatically.
|
|
minecraftVersion("1.20.1")
|
|
}
|
|
} |