forked from BG-Software-LLC/WildInspect
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
98 lines (84 loc) · 2.76 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
group 'WildInspect'
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'base'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'maven-publish'
version = "2.3.3"
buildscript {
repositories {
jcenter()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:6.1.0'
}
}
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 {
// Spigot jar
compileOnly "org.spigotmc:v1_8_R3-Taco:latest"
// CoreProtect
compileOnly 'net.coreprotect:CoreProtect-5:latest'
compileOnly 'net.coreprotect:CoreProtect-6:latest'
// Plugin Hooks
compileOnly 'com.wasteofplastic:AcidIsland:latest'
compileOnly 'com.wasteofplastic:ASkyblock:latest'
compileOnly 'world.bentobox:BentoBox:latest'
compileOnly 'com.drtshock:FactionsUUID:latest'
compileOnly 'com.drtshock:FactionsUUID-New:latest'
compileOnly 'net.prosavage:FactionsX:latest'
compileOnly 'me.ryanhamshire:GriefPrevention:latest'
compileOnly 'me.angeschossen:Lands:latest'
compileOnly 'me.qiooip:Lazarus:latest'
compileOnly 'com.massivecraft:Factions:latest'
compileOnly 'com.massivecraft:MassiveCore:latest'
compileOnly 'com.bgsoftware:SuperiorSkyblockAPI:latest'
compileOnly 'com.palmergames:Towny:latest'
compileOnly 'com.stefthedev:Villages:latest'
}
jar {
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()
}
}