65 lines
1.5 KiB
Groovy
65 lines
1.5 KiB
Groovy
plugins {
|
|
id 'java'
|
|
id 'fr.il_totore.manadrop' version '0.4.3'
|
|
id 'com.github.johnrengelman.shadow' version '7.1.2'
|
|
}
|
|
|
|
group = 'ru.themixray.puton'
|
|
version = '0.1.0'
|
|
|
|
spigot {
|
|
desc {
|
|
main "ru.themixray.puton.Main"
|
|
apiVersion "1.17"
|
|
named "PutOn"
|
|
|
|
command {
|
|
named "helmet"
|
|
description "Puts on item from your hand as helmet"
|
|
}
|
|
|
|
command {
|
|
named "chestplate"
|
|
description "Puts on item from your hand as chestplate"
|
|
}
|
|
|
|
command {
|
|
named "leggings"
|
|
description "Puts on item from your hand as leggings"
|
|
}
|
|
|
|
command {
|
|
named "boots"
|
|
description "Puts on item from your hand as boots"
|
|
}
|
|
}
|
|
}
|
|
|
|
processResources.finalizedBy(spigotPlugin)
|
|
|
|
repositories {
|
|
mavenLocal()
|
|
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
|
|
}
|
|
|
|
dependencies {
|
|
compileOnly "org.spigotmc:spigot-api:1.17.1-R0.1-SNAPSHOT"
|
|
}
|
|
|
|
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 {
|
|
options.encoding = 'UTF-8'
|
|
|
|
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
|
|
options.release.set(targetJavaVersion)
|
|
}
|
|
} |