puton/build.gradle

45 lines
1.0 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"
}
}
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)
}
}