WorldSystem/build.gradle

150 lines
5.1 KiB
Groovy
Raw Normal View History

2023-04-21 12:28:24 +02:00
import org.apache.tools.ant.filters.ReplaceTokens
2022-07-16 21:30:53 +02:00
plugins {
2023-04-22 17:35:30 +02:00
id "com.github.johnrengelman.shadow" version "8.1.1"
id "io.freefair.lombok" version "8.0.1"
2023-04-21 12:28:24 +02:00
id "io.github.slimjar" version "1.3.0"
id "java"
2022-07-16 21:30:53 +02:00
}
2023-04-21 12:28:24 +02:00
//apply from: "$rootDir/gradle/jacoco.gradle"
2023-02-27 12:38:55 +01:00
//apply from: "$rootDir/gradle/publish.gradle"
2022-07-16 21:30:53 +02:00
2023-04-22 17:33:48 +02:00
//sourceCompatibility = 17
//targetCompatibility = 17
2022-07-16 21:30:53 +02:00
2023-04-21 12:28:24 +02:00
group = "de.butzlabben"
2023-04-22 17:33:48 +02:00
pluginName = "WorldSystem"
2023-04-21 12:28:24 +02:00
version = "2.4.34"
description = "WorldSystem is a world creator that allows you to easily create per player worlds"
2022-07-16 21:30:53 +02:00
2023-04-22 17:33:48 +02:00
ext {
mcVersion = ("mcVersion")
}
2023-04-21 12:28:24 +02:00
java {
withJavadocJar()
withSourcesJar()
}
2022-07-16 21:30:53 +02:00
2023-04-22 17:33:48 +02:00
archivesBaseName = ("pluginName")
2023-04-21 12:28:24 +02:00
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/" }
}
2023-04-22 17:33:48 +02:00
2023-04-21 12:28:24 +02:00
dependencies {
2023-04-22 17:25:53 +02:00
//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.13.1")
2023-04-21 12:28:24 +02:00
implementation('org.bstats:bstats-bukkit:3.0.0')
implementation("io.github.slimjar:slimjar:1.2.7")
implementation('dev.triumphteam:triumph-gui:3.2')
2023-04-22 17:25:53 +02:00
compileOnly("org.spigotmc:spigot-api:1.19.4-R0.1-SNAPSHOT")
2023-04-21 12:28:24 +02:00
compileOnly("com.github.MilkBowl:VaultAPI:1.7.1")
2023-04-22 17:33:48 +02:00
compileOnly("me.clip:placeholderapi:2.11.3")
2023-04-21 12:28:24 +02:00
compileOnly("org.jetbrains:annotations:23.0.0")
2023-04-22 17:25:53 +02:00
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")
2023-04-21 12:28:24 +02:00
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")
2023-04-22 17:25:53 +02:00
//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'
2023-04-21 12:28:24 +02:00
}
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()
}
2023-04-22 17:25:53 +02:00
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
}
ignoreFailures = false
}
2023-04-21 12:28:24 +02:00
processResources {
2023-04-22 17:25:53 +02:00
project.properties.put("version", this.version)
expand project.properties
2023-04-21 12:28:24 +02:00
from(sourceSets.main.resources.srcDirs) {
duplicatesStrategy DuplicatesStrategy.INCLUDE
filter ReplaceTokens, tokens: [version: version]
2022-07-16 21:30:53 +02:00
}
}
2023-04-21 12:28:24 +02:00
java.sourceCompatibility = JavaVersion.VERSION_17
tasks.withType(JavaCompile) {
2022-07-16 21:30:53 +02:00
options.encoding = 'UTF-8'
options.compilerArgs += ["-parameters"]
options.fork = true
2023-02-27 13:38:28 +01:00
//options.forkOptions.executable = 'javac'
2022-07-16 21:30:53 +02:00
}
2023-04-21 12:28:24 +02:00
tasks.build.dependsOn tasks.shadowJar
2022-07-16 21:30:53 +02:00
defaultTasks 'build'