-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathbuild.gradle
155 lines (121 loc) · 4.12 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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
import org.apache.tools.ant.filters.ReplaceTokens
plugins {
id 'com.github.johnrengelman.shadow' version '8.1.1'
id 'maven-publish'
id 'eclipse'
id 'java'
}
compileJava.options.encoding = 'UTF-8'
compileTestJava.options.encoding = 'UTF-8'
tasks.withType(JavaCompile).configureEach {
options.compilerArgs += ["-source", "8", "-target", "8"]
}
repositories {
mavenCentral()
// Spigot
maven {
url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/'
}
// Velocity
maven {
url "https://nexus.velocitypowered.com/repository/maven-public/"
}
// Bungeecord
maven {
url "https://oss.sonatype.org/content/repositories/snapshots"
}
// Skript
maven {
url 'https://repo.skriptlang.org/releases'
}
// Jitpack
maven {
url 'https://jitpack.io'
}
}
dependencies {
// Nullable annotation
implementation (group: 'org.eclipse.jdt', name: 'org.eclipse.jdt.annotation', version: '2.2.700')
// Velocity
implementation (group: 'com.velocitypowered', name: 'velocity-api', version: '3.1.1')
annotationProcessor (group: 'com.velocitypowered', name: 'velocity-api', version: '3.1.1')
// Spigot
implementation (group: 'org.spigotmc', name: 'spigot-api', version: '1.19.4-R0.1-SNAPSHOT')
// Bungeecord
implementation (group: 'net.md-5', name: 'bungeecord-protocol', version: '1.19-R0.1-SNAPSHOT')
implementation (group: 'net.md-5', name: 'bungeecord-api', version: '1.19-R0.1-SNAPSHOT')
// Skript
implementation (group: 'com.github.SkriptLang', name: 'Skript', version: '2.7.0-beta2') {
transitive = false
}
// Toml for Velocity
implementation (group: 'com.moandjiezana.toml', name: 'toml4j', version: '0.7.2')
shadow group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0'
// bStats
shadow group: 'org.bstats', name: 'bstats-bukkit', version: '3.0.2'
shadow group: 'org.bstats', name: 'bstats-velocity', version: '3.0.2'
shadow group: 'org.bstats', name: 'bstats-bungeecord', version: '3.0.2'
// Reflections
shadow (group: 'org.reflections', name: 'reflections', version: '0.10.2')
// Japson
shadow (group: 'com.github.Sitrica', name: 'Japson', version: '1.1.4')
testImplementation (group: 'com.github.Sitrica', name: 'Japson', version: '1.1.4')
//shadow (group: 'com.sitrica', name: 'japson-beta', version: '1.1.4.0-SNAPSHOT')
testRuntimeOnly (group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.9.3')
testImplementation (group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.9.3')
testImplementation (group: 'org.reflections', name: 'reflections', version: '0.10.2')
shadow (group: 'org.json', name: 'json', version: '20230227')
}
publishing {
repositories {
maven {
name = "Skungee-2.0.0"
url = uri("https://maven.pkg.github.com/Skungee/Skungee-2.0.0")
credentials {
username = 'Skungee'
password = project.findProperty("gpr.key") ?: System.getenv("PACKAGES_KEY")
}
}
}
publications {
shadow(MavenPublication) {publication ->
project.shadow.component(publication)
version = version
groupId = 'com.skungee'
def releases = 'skungee' // Don't modify
def snapshots = 'skungee-beta' // Don't modify
artifactId = version.endsWith('SNAPSHOT') || version.contains('ALPHA') ? snapshots : releases
}
}
}
processResources {
filter ReplaceTokens, tokens: ["version": project.property("version")]
from ("lang/") {
include '*.lang'
into 'lang/'
}
}
shadowJar {
configurations = [project.configurations.shadow]
archiveVersion = version
archiveBaseName = project.name
relocate 'com.sitrica.japson', 'com.skungee.japson'
relocate 'org.bstats', 'com.skungee.bstats'
minimize()
}
test {
useJUnitPlatform()
// show standard out and standard error of the test JVM(s) on the console
testLogging.showStandardStreams = true
// set heap size for the test JVM(s)
minHeapSize = "128m"
maxHeapSize = "512m"
// listen to events in the test execution lifecycle
beforeTest { descriptor ->
logger.lifecycle("Running test: " + descriptor)
}
// listen to standard out and standard error of the test JVM(s)
onOutput { descriptor, event ->
logger.lifecycle("Test: " + descriptor + " produced standard out/err: " + event.message )
}
}