65 lines
1.6 KiB
Groovy
65 lines
1.6 KiB
Groovy
plugins {
|
|
id 'java'
|
|
}
|
|
|
|
group = 'lee.code.tcf'
|
|
version = '1.2.4'
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven {
|
|
name = "paper-repo"
|
|
url = "https://repo.papermc.io/repository/maven-public/"
|
|
}
|
|
maven {
|
|
name = 'waterfall-repo'
|
|
url = 'https://repo.papermc.io/repository/maven-public/'
|
|
}
|
|
maven {
|
|
name = "spigotmc-repo"
|
|
url = "https://hub.spigotmc.org/nexus/content/repositories/snapshots/"
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
compileOnly 'org.projectlombok:lombok:1.18.28'
|
|
annotationProcessor 'org.projectlombok:lombok:1.18.28'
|
|
testCompileOnly 'org.projectlombok:lombok:1.18.28'
|
|
testAnnotationProcessor 'org.projectlombok:lombok:1.18.28'
|
|
|
|
compileOnly 'org.spigotmc:spigot-api:1.20.2-R0.1-SNAPSHOT'
|
|
compileOnly 'io.github.waterfallmc:waterfall-api:1.20.2-R0.1-SNAPSHOT'
|
|
}
|
|
|
|
def targetJavaVersion = 16
|
|
|
|
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
|
|
}
|
|
}
|
|
|
|
tasks.withType(JavaCompile).configureEach {
|
|
options.encoding = "UTF-8"
|
|
}
|
|
|
|
processResources {
|
|
inputs.property("version", project.version)
|
|
outputs.dir(destinationDir)
|
|
from(sourceSets.main.resources.srcDirs) {
|
|
include 'plugin.yml'
|
|
include 'bungee.yml'
|
|
expand 'version': project.version
|
|
}
|
|
duplicatesStrategy = 'warn'
|
|
}
|