forked from Lorenzo0111/ElectionsPlus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
122 lines (108 loc) · 4.38 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
/*
* 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
buildscript {
repositories {
gradlePluginPortal()
mavenCentral()
}
dependencies {
classpath "io.github.slimjar:gradle-plugin:1.3.0"
}
}
plugins {
id 'com.github.johnrengelman.shadow' version '8.1.1'
id 'java'
}
ext {
libsBase = 'me.lorenzo0111.elections.libs'
}
sourceCompatibility = '1.17'
targetCompatibility = '1.17'
subprojects {
apply plugin: 'java'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: "io.github.slimjar"
sourceCompatibility = '1.17'
targetCompatibility = '1.17'
compileJava.options.encoding = "UTF-8"
compileTestJava.options.encoding = "UTF-8"
version = "MCPD-1.2.6"
group = "me.lorenzo0111"
repositories {
mavenCentral()
maven {
name = 'sonatype'
url = 'https://oss.sonatype.org/content/groups/public/'
}
maven { url 'https://jitpack.io' }
maven { url 'https://repo.repsy.io/mvn/lorenzo0111/public'}
maven { url 'https://dl.lorenzo0111.me/releases' }
}
dependencies {
compileOnly('com.github.TechFortress:GriefPrevention:16.18.1')
implementation('org.quartz-scheduler:quartz:2.3.2')
implementation('org.spongepowered:configurate-yaml:4.1.2')
implementation("net.kyori:adventure-text-minimessage:4.13.1")
implementation('net.kyori:adventure-api:4.13.1')
implementation('net.kyori:adventure-text-serializer-legacy:4.13.1')
implementation("com.github.cryptomorin:XSeries:9.6.1.1")
slim('org.slf4j:slf4j-simple:2.0.7')
slim('mysql:mysql-connector-java:8.0.33')
slim('org.xerial:sqlite-jdbc:3.43.2.1')
slim('com.zaxxer:HikariCP:5.0.1')
}
shadowJar {
relocate('org.yaml.snakeyaml',"${libsBase}.yaml")
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.gson', "${libsBase}.gson")
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]
}
}
}