-
Notifications
You must be signed in to change notification settings - Fork 47
/
build.gradle
116 lines (93 loc) · 2.87 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
import org.apache.tools.ant.filters.ReplaceTokens
buildscript {
repositories {
mavenCentral()
gradlePluginPortal()
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.4'
}
}
plugins {
id 'java'
id 'com.github.johnrengelman.shadow' version '2.0.4'
}
group 'me.realized'
version '3.2.8'
compileJava.options.encoding = 'UTF-8'
processResources {
def group = project.group.toString() + "." + project.name.toLowerCase() + ".shaded"
from(sourceSets.main.resources.srcDirs) {
include '**/*.yml'
filter(ReplaceTokens, tokens: [NAME: project.name, VERSION: project.version, SHADED_GROUP: group])
}
}
repositories {
mavenCentral()
maven {
name 'spigot-repo'
url 'https://hub.spigotmc.org/nexus/content/repositories/public'
}
maven {
name 'bungeecord-repo'
url 'https://oss.sonatype.org/content/repositories/snapshots'
}
maven {
name 'mvdw-repo'
url 'http://repo.mvdw-software.be/content/groups/public/'
}
maven {
name 'clip-repo'
url 'http://repo.extendedclip.com/content/repositories/placeholderapi/'
}
maven {
name 'codemc-repo'
url 'https://repo.codemc.io/repository/maven-public/'
}
maven {
name 'inventive-repo'
url 'https://repo.inventivetalent.org/content/groups/public/'
}
flatDir {
dirs "$rootDir/libs/"
}
}
dependencies {
compile 'org.projectlombok:lombok:1.18.22'
compile 'org.spigotmc:spigot-api:1.14.4-R0.1-SNAPSHOT'
compile (name: 'MVdWPlaceholderAPI-3.1.1') {
transitive = false
}
compile name: 'Vault-1.6.7'
compile 'me.clip:placeholderapi:2.10.9'
// shaded dependencies
compile 'redis.clients:jedis:3.5.1'
compile 'org.apache.commons:commons-pool2:2.4.2'
compile 'com.zaxxer:HikariCP:4.0.2'
compile 'org.slf4j:slf4j-nop:1.7.32'
compile 'org.bstats:bstats-bukkit:1.7'
}
clean.doFirst {
delete "$rootDir/out/"
}
shadowJar {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
destinationDir = file("$rootDir/out/")
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8
baseName = 'TokenManager'
classifier = null
dependencies {
include(dependency('redis.clients:.*'))
include(dependency('org.apache.commons:.*'))
include(dependency('com.zaxxer:.*'))
include(dependency('org.slf4j:.*'))
include(dependency('org.bstats:.*'))
}
def group = project.group.toString() + "." + project.name.toLowerCase() + ".shaded."
relocate 'redis.clients', group + 'redis.clients'
relocate 'org.apache.commons.pool2', group + 'apache.commons.pool2'
relocate 'com.zaxxer.hikari', group + 'zaxxer.hikari'
relocate 'org.slf4j', group + "slf4j"
relocate 'org.bstats', group + 'bstats'
}
build.dependsOn(shadowJar)