plugins { id 'java' id 'com.gradleup.shadow' version '8.3.5' } group = 'us.tss3' version = '1.0.0' java { toolchain { languageVersion = JavaLanguageVersion.of(21) } } repositories { mavenCentral() maven { url = 'https://repo.papermc.io/repository/maven-public/' } maven { url = 'https://repo.extendedclip.com/content/repositories/placeholderapi/' } maven { url = 'https://jitpack.io' } maven { url = 'https://maven.enginehub.org/repo/' } } dependencies { compileOnly 'io.papermc.paper:paper-api:1.21.4-R0.1-SNAPSHOT' compileOnly 'me.clip:placeholderapi:2.11.6' compileOnly('com.github.MilkBowl:VaultAPI:1.7') { exclude group: 'org.bukkit', module: 'bukkit' } // transitive = false: we only need WorldEdit's API types at compile time (it's never // shaded/bundled - the real WorldEdit plugin provides everything at runtime), and its // transitive deps pin strict versions of guava/gson/fastutil that conflict with paper-api's. compileOnly('com.sk89q.worldedit:worldedit-bukkit:7.3.8') { transitive = false } compileOnly('com.sk89q.worldedit:worldedit-core:7.3.8') { transitive = false } implementation 'org.xerial:sqlite-jdbc:3.47.1.0' implementation 'com.mysql:mysql-connector-j:9.1.0' testImplementation platform('org.junit:junit-bom:5.11.3') testImplementation 'org.junit.jupiter:junit-jupiter' } def targetJavaVersion = 21 tasks.withType(JavaCompile).configureEach { options.encoding = 'UTF-8' options.release.set(targetJavaVersion) } processResources { def props = [version: version] inputs.properties props filteringCharset 'UTF-8' filesMatching('plugin.yml') { expand props } } shadowJar { archiveClassifier.set('') archiveBaseName.set('BlockParty') relocate 'org.sqlite', 'us.tss3.blockparty.libs.sqlite' // com.mysql is intentionally left unrelocated: mysql-connector-j is loaded by fully // qualified class name (com.mysql.cj.jdbc.Driver) at runtime via Class.forName. mergeServiceFiles() } test { useJUnitPlatform() } build { dependsOn shadowJar }