You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.0 KiB
Groovy
49 lines
1.0 KiB
Groovy
plugins {
|
|
id 'java'
|
|
id "com.github.johnrengelman.shadow" version "6.1.0"
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
mavenLocal()
|
|
maven {
|
|
name = "spigotmc-repo"
|
|
url = "https://hub.spigotmc.org/nexus/content/repositories/snapshots/"
|
|
}
|
|
maven {
|
|
name = "sonatype"
|
|
url = "https://oss.sonatype.org/content/groups/public/"
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
compileOnly 'org.spigotmc:spigot:1.16.1-R0.1-SNAPSHOT'
|
|
}
|
|
|
|
compileJava.options.encoding = 'UTF-8'
|
|
|
|
allprojects {
|
|
task buildPlugin(type: Copy) {
|
|
def shadow = !project.getTasksByName('shadowJar', true).isEmpty()
|
|
if(shadow) {
|
|
dependsOn 'shadowJar'
|
|
} else {
|
|
dependsOn 'build'
|
|
}
|
|
|
|
from project.buildDir.path + '/libs'
|
|
into destDir
|
|
|
|
if (shadow) {
|
|
include '*-all.jar'
|
|
} else {
|
|
include '*.jar'
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
shadowJar {
|
|
project.configurations.implementation.canBeResolved(true)
|
|
configurations = [project.configurations.implementation]
|
|
} |