58 lines
1.4 KiB
Groovy
58 lines
1.4 KiB
Groovy
plugins {
|
|
id 'java'
|
|
id 'com.gradleup.shadow' version '8.3.1'
|
|
}
|
|
|
|
group = 'eu.mhsl.minecraft'
|
|
version = '1.0-SNAPSHOT'
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven {
|
|
name = "papermc-repo"
|
|
url = "https://repo.papermc.io/repository/maven-public/"
|
|
}
|
|
maven {
|
|
name = "sonatype"
|
|
url = "https://oss.sonatype.org/content/groups/public/"
|
|
}
|
|
maven {
|
|
url = "https://repo.aikar.co/content/groups/aikar/"
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
compileOnly "io.papermc.paper:paper-api:1.21-R0.1-SNAPSHOT"
|
|
implementation "co.aikar:taskchain-bukkit:3.7.2"
|
|
}
|
|
|
|
def targetJavaVersion = 21
|
|
java {
|
|
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
|
|
sourceCompatibility = javaVersion
|
|
targetCompatibility = javaVersion
|
|
if (JavaVersion.current() < javaVersion) {
|
|
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
|
|
}
|
|
}
|
|
|
|
processResources {
|
|
def props = [version: version]
|
|
inputs.properties props
|
|
filteringCharset 'UTF-8'
|
|
filesMatching('plugin.yml') {
|
|
expand props
|
|
}
|
|
}
|
|
|
|
tasks.register('copyJarToTestServer', Exec) {
|
|
commandLine 'cp', 'build/libs/PixelBlocks-1.0-SNAPSHOT-all.jar', '/home/elias/Dokumente/mcTestServer/plugins/pixelblocks.jar'
|
|
}
|
|
|
|
shadowJar {
|
|
relocate 'co.aikar.taskchain', 'eu.mhsl.minecraft.pixelblocks.taskchain'
|
|
}
|
|
|
|
jar.dependsOn shadowJar
|
|
copyJarToTestServer.dependsOn jar
|