69 lines
No EOL
1.7 KiB
Groovy
69 lines
No EOL
1.7 KiB
Groovy
plugins {
|
|
id 'java'
|
|
id 'com.gradleup.shadow' version '8.3.5'
|
|
id 'io.papermc.paperweight.userdev' version '1.7.7'
|
|
id 'xyz.jpenilla.run-paper' version '2.3.1'
|
|
}
|
|
|
|
group = 'net.kuraczyk'
|
|
version = '1.0'
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven {
|
|
name = 'papermc'
|
|
url = 'https://repo.papermc.io/repository/maven-public/'
|
|
}
|
|
maven {
|
|
name = 'purpur'
|
|
url = 'https://repo.purpurmc.org/snapshots'
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
paperweight.paperDevBundle('1.21-R0.1-SNAPSHOT')
|
|
implementation 'org.postgresql:postgresql:42.7.7'
|
|
implementation 'org.flywaydb:flyway-core:10.7.2'
|
|
implementation 'org.flywaydb:flyway-database-postgresql:10.7.2'
|
|
implementation 'com.google.code.gson:gson:2.11.0'
|
|
}
|
|
|
|
shadowJar {
|
|
relocate 'org.postgresql', 'net.kuraczyk.libs.postgresql'
|
|
relocate 'org.flywaydb', 'net.kuraczyk.lib.flyway'
|
|
mergeServiceFiles()
|
|
archiveFileName.set("BanHammer-${project.version}.jar")
|
|
}
|
|
|
|
tasks.build.dependsOn(shadowJar)
|
|
|
|
def targetJavaVersion = 21
|
|
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)
|
|
}
|
|
}
|
|
|
|
processResources {
|
|
def props = [version: version]
|
|
inputs.properties props
|
|
filteringCharset 'UTF-8'
|
|
filesMatching('plugin.yml') {
|
|
expand props
|
|
}
|
|
}
|
|
|
|
tasks.named('runServer') {
|
|
minecraftVersion('1.21')
|
|
} |