mirror of
https://github.com/trainerlord/WorldSystem.git
synced 2024-12-02 13:23:21 +01:00
150 lines
5.1 KiB
Groovy
150 lines
5.1 KiB
Groovy
import org.apache.tools.ant.filters.ReplaceTokens
|
|
|
|
plugins {
|
|
id "com.github.johnrengelman.shadow" version "7.1.2"
|
|
id "io.freefair.lombok" version "6.6.3"
|
|
id "io.github.slimjar" version "1.3.0"
|
|
id "java"
|
|
}
|
|
|
|
//apply from: "$rootDir/gradle/jacoco.gradle"
|
|
//apply from: "$rootDir/gradle/publish.gradle"
|
|
|
|
//sourceCompatibility = 17
|
|
//targetCompatibility = 17
|
|
|
|
group = "de.butzlabben"
|
|
pluginName = "WorldSystem"
|
|
version = "2.4.34"
|
|
description = "WorldSystem is a world creator that allows you to easily create per player worlds"
|
|
|
|
ext {
|
|
mcVersion = ("mcVersion")
|
|
}
|
|
|
|
java {
|
|
withJavadocJar()
|
|
withSourcesJar()
|
|
}
|
|
|
|
archivesBaseName = ("pluginName")
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven { url "https://hub.spigotmc.org/nexus/content/repositories/snapshots/" }
|
|
maven { url "https://papermc.io/repo/repository/maven-public/" }
|
|
maven { url "https://repo.extendedclip.com/content/repositories/placeholderapi/" }
|
|
maven { url "https://jitpack.io" }
|
|
maven { url "https://mvn.intellectualsites.com/content/repositories/releases/" }
|
|
maven { url "https://ci.athion.net/job/FastAsyncWorldEdit/ws" }
|
|
maven { url "https://repo.onarandombox.com/content/groups/public/" }
|
|
maven { url "https://maven.enginehub.org/repo/"}
|
|
maven { url "https://ci.athion.net/job/FastAsyncWorldEdit/changes/" }
|
|
maven { url "https://mvnrepository.com/artifact/commons-io/commons-io/" }
|
|
}
|
|
|
|
dependencies {
|
|
//compileOnly spigot('1.19.4')
|
|
//compileOnly lombok()
|
|
//annotationProcessor lombok()
|
|
implementation("io.papermc:paperlib:1.0.7")
|
|
implementation("org.yaml:snakeyaml:2.0")
|
|
implementation("net.kyori:adventure-text-minimessage:4.12.0")
|
|
implementation('org.bstats:bstats-bukkit:3.0.0')
|
|
implementation("io.github.slimjar:slimjar:1.2.7")
|
|
implementation('dev.triumphteam:triumph-gui:3.2')
|
|
compileOnly("org.spigotmc:spigot-api:1.19.4-R0.1-SNAPSHOT")
|
|
compileOnly("com.github.MilkBowl:VaultAPI:1.7.1")
|
|
compileOnly("me.clip:placeholderapi:2.11.3")
|
|
compileOnly("org.jetbrains:annotations:23.0.0")
|
|
compileOnly('com.mojang:authlib:1.5.25')
|
|
compileOnly('org.projectlombok:lombok:1.18.26')
|
|
compileOnly("com.sk89q.worldedit:worldedit-bukkit:7.2.14-SNAPSHOT")
|
|
compileOnly("com.sk89q.worldedit:worldedit-core:7.2.14-SNAPSHOT")
|
|
compileOnly("com.fastasyncworldedit:FastAsyncWorldEdit-Bukkit:2.6.0")
|
|
compileOnly("com.fastasyncworldedit:FastAsyncWorldEdit-Core:2.6.0")
|
|
slim("com.squareup.okhttp3:okhttp:4.9.3")
|
|
slim("com.zaxxer:HikariCP:4.0.3")
|
|
slim("com.github.cryptomorin:XSeries:8.7.1")
|
|
slim("mysql:mysql-connector-java:8.0.28")
|
|
slim("org.xerial:sqlite-jdbc:3.36.0.3")
|
|
slim("org.slf4j:slf4j-simple:1.7.36")
|
|
|
|
//Test dependencies
|
|
testImplementation 'org.junit.jupiter:junit-jupiter:5.+'
|
|
testImplementation "org.mockito:mockito-core:5.+"
|
|
testImplementation 'org.assertj:assertj-core:3.+'
|
|
//testImplementation lombok()
|
|
//testAnnotationProcessor lombok()
|
|
implementation group: 'commons-io', name: 'commons-io', version: '2.11.0'
|
|
}
|
|
|
|
slimJar {
|
|
relocate('dev.triumphteam',"${libsBase}")
|
|
relocate('com.cryptomorin.xseries',"${libsBase}.xseries")
|
|
relocate('com.zaxxer.hikari',"${libsBase}.hikari")
|
|
relocate('okhttp3', "${libsBase}.okhttp")
|
|
}
|
|
|
|
shadowJar {
|
|
minimize()
|
|
archiveFileName.set("${project.name}-${project.version}.jar")
|
|
relocate("io.github.slimjar","${libsBase}.slimjar")
|
|
relocate("dev.triumphteam","${libsBase}")
|
|
relocate("com.cryptomorin.xseries","${libsBase}.xseries")
|
|
relocate("net.kyori.adventure", "${libsBase}.adventure")
|
|
relocate("net.kyori.examination", "${libsBase}.examination")
|
|
relocate("com.google.j2objc", "${libsBase}.google.j2objc")
|
|
relocate("com.google.common", "${libsBase}.google.common")
|
|
relocate("com.google.errorprone", "${libsBase}.google.errorprone")
|
|
relocate("org.yaml.snakeyaml", "${libsBase}.yaml")
|
|
relocate("org.spongepowered.configurate", "${libsBase}.configurate")
|
|
relocate("org.bstats", "${libsBase}.bstats")
|
|
relocate("com.google.gson", "${libsBase}.google.gson")
|
|
}
|
|
|
|
|
|
javadoc {
|
|
options.links(
|
|
'https://javadoc.io/static/org.jetbrains/annotations/20.1.0/',
|
|
'https://docs.oracle.com/javase/17/docs/api/',
|
|
'https://papermc.io/javadocs/paper/1.19/'
|
|
)
|
|
source = sourceSets.main.allJava
|
|
include("**/api/*")
|
|
destinationDir = new File("build/javadocs")
|
|
}
|
|
|
|
signing {
|
|
sign configurations.archives
|
|
useGpgCmd()
|
|
}
|
|
|
|
test {
|
|
useJUnitPlatform()
|
|
testLogging {
|
|
events "passed", "skipped", "failed"
|
|
}
|
|
ignoreFailures = false
|
|
}
|
|
processResources {
|
|
project.properties.put("version", this.version)
|
|
expand project.properties
|
|
from(sourceSets.main.resources.srcDirs) {
|
|
duplicatesStrategy DuplicatesStrategy.INCLUDE
|
|
filter ReplaceTokens, tokens: [version: version]
|
|
}
|
|
}
|
|
|
|
java.sourceCompatibility = JavaVersion.VERSION_17
|
|
|
|
tasks.withType(JavaCompile) {
|
|
options.encoding = 'UTF-8'
|
|
options.compilerArgs += ["-parameters"]
|
|
options.fork = true
|
|
//options.forkOptions.executable = 'javac'
|
|
}
|
|
|
|
tasks.build.dependsOn tasks.shadowJar
|
|
defaultTasks 'build'
|