mirror of
https://github.com/darksaid98/Builders-Utilities.git
synced 2026-12-02 14:38:47 +00:00
68 lines
1.9 KiB
Kotlin
68 lines
1.9 KiB
Kotlin
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
|
import org.cadixdev.gradle.licenser.LicenseExtension
|
|
|
|
plugins {
|
|
id("java")
|
|
id("java-library")
|
|
id("org.cadixdev.licenser") version "0.5.0"
|
|
id("com.github.johnrengelman.shadow") version "6.1.0"
|
|
}
|
|
|
|
configure<JavaPluginConvention> {
|
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
targetCompatibility = sourceCompatibility
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
jcenter()
|
|
maven {
|
|
name = "Spigot"
|
|
url = uri("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
|
|
}
|
|
maven {
|
|
name = "Mojang"
|
|
url = uri("https://libraries.minecraft.net/")
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
compileOnlyApi("org.spigotmc:spigot-api:1.16.5-R0.1-SNAPSHOT")
|
|
compileOnlyApi("com.mojang:authlib:1.5.25")
|
|
implementation("org.apache.logging.log4j:log4j-slf4j-impl:2.8.1")
|
|
implementation("org.bstats:bstats-bukkit:2.1.0")
|
|
implementation("com.github.cryptomorin:XSeries:7.8.0")
|
|
}
|
|
|
|
version = "2.0.0"
|
|
|
|
tasks.named<ShadowJar>("shadowJar") {
|
|
archiveClassifier.set(null as String?)
|
|
dependencies {
|
|
include(dependency("org.apache.logging.log4j:log4j-slf4j-impl"))
|
|
include(dependency("org.slf4j:slf4j-api"))
|
|
include(dependency("org.bstats:bstats-bukkit:1.8"))
|
|
include(dependency("com.github.cryptomorin:XSeries:7.8.0"))
|
|
relocate("com.cryptomorin.xseries", "net.arcaniax.utils")
|
|
relocate("org.apache.logging.slf4j", "net.arcaniax.logging.apache")
|
|
relocate("org.slf4j", "net.arcaniax.logging.slf4j")
|
|
relocate("org.bstats", "net.arcaniax.metrics")
|
|
}
|
|
}
|
|
|
|
configure<LicenseExtension> {
|
|
header = rootProject.file("HEADER")
|
|
newLine = false
|
|
include("**/*.java")
|
|
}
|
|
|
|
tasks.named<Copy>("processResources") {
|
|
filesMatching("plugin.yml") {
|
|
expand("version" to project.version)
|
|
}
|
|
}
|
|
|
|
tasks.named("build").configure {
|
|
dependsOn("shadowJar")
|
|
}
|