mirror of
https://github.com/BG-Software-LLC/WildLoaders.git
synced 2024-11-12 10:23:59 +01:00
116 lines
2.8 KiB
Groovy
116 lines
2.8 KiB
Groovy
group 'WildLoaders'
|
|
apply plugin: 'java'
|
|
apply plugin: 'maven'
|
|
apply plugin: 'base'
|
|
apply plugin: 'com.github.johnrengelman.shadow'
|
|
apply plugin: 'maven-publish'
|
|
|
|
version = "0.3.2-Beta"
|
|
|
|
buildscript {
|
|
repositories {
|
|
jcenter()
|
|
maven { url "https://plugins.gradle.org/m2/" }
|
|
}
|
|
dependencies {
|
|
classpath 'com.github.jengelman.gradle.plugins:shadow:6.1.0'
|
|
}
|
|
}
|
|
|
|
subprojects {
|
|
apply plugin: 'java'
|
|
apply plugin: 'com.github.johnrengelman.shadow'
|
|
|
|
repositories {
|
|
maven { url 'https://repo.bg-software.com/repository/nms/' }
|
|
}
|
|
|
|
shadowJar {
|
|
archiveName = "${project.name}.jar"
|
|
destinationDir = file("../archive/")
|
|
}
|
|
|
|
build {
|
|
dependsOn shadowJar
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
maven { url 'https://repo.bg-software.com/repository/nms/' }
|
|
maven { url 'https://repo.bg-software.com/repository/api/' }
|
|
maven { url 'https://repo.bg-software.com/repository/public-libs/' }
|
|
|
|
String mavenUsername = project.hasProperty('mavenUsername') ? project.mavenUsername : System.getenv('mavenUsername');
|
|
String mavenPassword = project.hasProperty('mavenPassword') ? project.mavenPassword : System.getenv('mavenPassword');
|
|
|
|
if(mavenUsername != null && mavenPassword != null) {
|
|
maven {
|
|
url 'https://repo.bg-software.com/repository/private-libs/'
|
|
credentials {
|
|
username mavenUsername
|
|
password mavenPassword
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
dependencies {
|
|
compile project(":API")
|
|
compile fileTree("archive")
|
|
|
|
// Spigot jars
|
|
compileOnly "org.spigotmc:v1_7_R3:latest"
|
|
compileOnly 'org.spigotmc:v1_16_R3-Tuinity:latest'
|
|
|
|
// Plugin Hooks
|
|
compileOnly "com.massivecraft:Factions:latest"
|
|
compileOnly "com.drtshock:FactionsUUID:latest"
|
|
compileOnly "net.prosavage:FactionsX:latest"
|
|
compileOnly "com.massivecraft:MassiveCore:latest"
|
|
compileOnly "com.bgsoftware:SuperiorSkyblockAPI:latest"
|
|
compileOnly "com.songoda:EpicSpawners-6:latest"
|
|
}
|
|
|
|
jar {
|
|
from {
|
|
for (File file : new File("archive").listFiles()) {
|
|
zipTree(file)
|
|
}
|
|
}
|
|
|
|
processResources {
|
|
outputs.upToDateWhen {false}
|
|
eachFile { details ->
|
|
if (details.name.contentEquals('plugin.yml')) {
|
|
filter { String line ->
|
|
line.replace('${project.version}', version)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
shadowJar {
|
|
dependsOn(jar)
|
|
archiveName = rootProject.name + ".jar"
|
|
destinationDir = file("./target/")
|
|
from sourceSets.getByName("main").output
|
|
configurations = [project.configurations.getByName("runtimeClasspath")]
|
|
}
|
|
|
|
build {
|
|
dependsOn shadowJar
|
|
dependsOn publish
|
|
}
|
|
publish.shouldRunAfter shadowJar
|
|
shadowJar.shouldRunAfter build
|
|
|
|
publishing {
|
|
repositories {
|
|
mavenLocal()
|
|
}
|
|
} |