66 lines
1.5 KiB
Groovy
66 lines
1.5 KiB
Groovy
plugins {
|
|
id 'java'
|
|
id("xyz.jpenilla.run-paper") version "2.3.1"
|
|
}
|
|
|
|
group = 'de.winniepat'
|
|
version = '1.5'
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven { url = 'https://repo.papermc.io/repository/maven-public/' }
|
|
maven { url = 'https://jitpack.io' }
|
|
}
|
|
|
|
def mcApiGroup = project.findProperty('mcApiGroup') ?: 'com.destroystokyo.paper'
|
|
def mcVersion = project.findProperty('mcVersion') ?: '1.16.5-R0.1-SNAPSHOT'
|
|
def deployDir = project.findProperty('deployDir') ?: 'C:/Users/winnie/Documents/lunaris/server/plugins'
|
|
def minJavaVersion = 11
|
|
|
|
dependencies {
|
|
compileOnly("${mcApiGroup}:paper-api:${mcVersion}")
|
|
|
|
compileOnly('com.github.MilkBowl:VaultAPI:1.7') {
|
|
exclude group: 'org.bukkit', module: 'bukkit'
|
|
}
|
|
}
|
|
|
|
tasks {
|
|
runServer {
|
|
minecraftVersion("1.21")
|
|
}
|
|
}
|
|
|
|
java {
|
|
def javaVersion = JavaVersion.toVersion(minJavaVersion)
|
|
sourceCompatibility = javaVersion
|
|
targetCompatibility = javaVersion
|
|
if (JavaVersion.current() < javaVersion) {
|
|
toolchain.languageVersion = JavaLanguageVersion.of(minJavaVersion)
|
|
}
|
|
}
|
|
|
|
tasks.withType(JavaCompile).configureEach {
|
|
options.encoding = 'UTF-8'
|
|
|
|
if (minJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
|
|
options.release.set(minJavaVersion)
|
|
}
|
|
}
|
|
|
|
processResources {
|
|
def props = [version: version]
|
|
inputs.properties props
|
|
filteringCharset 'UTF-8'
|
|
filesMatching('plugin.yml') {
|
|
expand props
|
|
}
|
|
}
|
|
|
|
build.doLast {
|
|
copy {
|
|
from("$buildDir/libs/${rootProject.name}-${version}.jar")
|
|
into(deployDir)
|
|
}
|
|
}
|