-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
111 lines (98 loc) · 4.08 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
/*
* This file is part of ElectionsPlus, licensed under the MIT License.
*
* Copyright (c) Lorenzo0111
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
import org.apache.tools.ant.filters.ReplaceTokens
plugins {
id 'com.github.johnrengelman.shadow' version '8.1.1'
id "io.github.slimjar" version "1.3.0"
id 'java'
}
ext {
libsBase = 'me.lorenzo0111.elections.libs'
}
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
subprojects {
apply plugin: 'java'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: "io.github.slimjar"
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
compileJava.options.encoding = "UTF-8"
compileTestJava.options.encoding = "UTF-8"
version = "1.7"
group = "me.lorenzo0111"
repositories {
mavenCentral()
maven {
name = 'sonatype'
url = 'https://oss.sonatype.org/content/groups/public/'
}
maven { url 'https://jitpack.io' }
maven { url 'https://dl.lorenzo0111.me/releases' }
}
dependencies {
implementation('org.quartz-scheduler:quartz:2.3.2')
implementation('org.spongepowered:configurate-yaml:4.1.2')
implementation("net.kyori:adventure-text-minimessage:4.17.0")
implementation('net.kyori:adventure-api:4.17.0')
implementation('net.kyori:adventure-text-serializer-legacy:4.17.0')
slim('org.slf4j:slf4j-simple:2.0.13')
slim("com.mysql:mysql-connector-j:8.4.0")
slim('org.xerial:sqlite-jdbc:3.46.0.0')
slim('com.zaxxer:HikariCP:4.0.3')
}
shadowJar {
relocate('org.yaml.snakeyaml',"${libsBase}.yaml")
relocate('net.kyori', "${libsBase}.kyori")
archiveVersion.set('')
archiveClassifier.set('')
// Remove META-INF
exclude 'META-INF', 'META-INF/**'
}
slimJar {
relocate('com.google.common', "${libsBase}.google.common")
relocate('com.google.errorprone', "${libsBase}.google.errorprone")
relocate('com.google.j2objc', "${libsBase}.j2obc")
relocate('com.google.thirdparty', "${libsBase}.thirdparty")
relocate('com.mchange', "${libsBase}.mchange")
relocate('org.checkerframework', "${libsBase}.checkerframework")
relocate('org.quartz', "${libsBase}.quartz")
relocate('org.spongepowered.configurate', "${libsBase}.configurate")
relocate('org.terracotta.quartz', "${libsBase}.terracotta")
relocate('io.github.slimjar', "${libsBase}.slimjar")
relocate('org.bstats', "${libsBase}.bstats")
relocate('dev.triumphteam',"${libsBase}")
relocate('google',"${libsBase}.google")
relocate('org.sqlite.native',"${libsBase}.jdbc.sqlite")
relocate('com.cryptomorin.xseries',"${libsBase}.xseries")
relocate('com.zaxxer.hikari',"${libsBase}.hikari")
}
processResources {
from(project.sourceSets.main.resources.srcDirs) {
duplicatesStrategy DuplicatesStrategy.INCLUDE
filter ReplaceTokens, tokens: [version: version]
}
}
tasks.build.dependsOn tasks.shadowJar
}