forked from Realizedd/TokenManager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
124 lines (99 loc) · 3.25 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
117
118
119
120
121
122
123
124
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.apache.tools.ant.filters.ReplaceTokens
buildscript {
repositories {
jcenter()
}
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.6-SNAPSHOT'
compileJava.options.encoding = 'UTF-8'
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8
shadowJar {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
clean.doFirst {
delete "$rootDir/out/"
}
tasks.withType(ShadowJar) {
destinationDir = file("$rootDir/out/")
}
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/snapshots'
}
maven {
name 'bungeecord-repo'
url 'https://oss.sonatype.org/content/repositories/snapshots'
}
maven {
name 'vault-repo'
url 'http://nexus.hc.to/content/repositories/pub_releases'
}
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 'bstats-repo'
url 'http://repo.bstats.org/content/repositories/releases/'
}
maven {
name 'inventive-repo'
url 'https://repo.inventivetalent.org/content/groups/public/'
}
}
dependencies {
compile 'org.spigotmc:spigot-api:1.13.2-R0.1-SNAPSHOT'
compile 'net.milkbowl.vault:VaultAPI:1.6'
compile 'me.clip:placeholderapi:2.10.5'
compile ('be.maximvdw:MVdWPlaceholderAPI:3.0.1-SNAPSHOT') { transitive = false }
compile 'org.projectlombok:lombok:1.16.20'
// shaded dependencies
compile 'redis.clients:jedis:2.9.0'
compile 'org.apache.commons:commons-pool2:2.4.2'
compile 'com.zaxxer:HikariCP:2.7.8'
compile 'org.slf4j:slf4j-nop:1.7.25'
compile 'org.bstats:bstats-bukkit:1.2'
compile 'org.inventivetalent.spiget-update:bukkit:1.4.2-SNAPSHOT'
}
shadowJar {
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:.*'))
include(dependency('org.inventivetalent.spiget-update:.*'))
}
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'
relocate 'org.inventivetalent.update.spiget', group + 'update.spiget'
}
build.dependsOn(shadowJar)