-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.gradle
More file actions
84 lines (71 loc) · 2.07 KB
/
Copy pathbuild.gradle
File metadata and controls
84 lines (71 loc) · 2.07 KB
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
plugins {
id 'java'
id 'com.github.johnrengelman.shadow' version '8.1.1'
id 'distribution'
id "io.freefair.lombok" version "8.6"
}
group = 'xyz.upperlevel.quakecraft'
version = '2.1.6'
description = """A core used by the Upperlevel group"""
java {
sourceCompatibility = JavaVersion.VERSION_16
targetCompatibility = JavaVersion.VERSION_16
}
project.ext {
mcVersion = '1.20.4-R0.1-SNAPSHOT'
coreVersion = '2.0.3'
}
repositories {
mavenLocal()
mavenCentral()
// Spigot Api
maven {
url "https://hub.spigotmc.org/nexus/content/repositories/snapshots/"
}
maven {
url "https://maven.elmakers.com/repository/" // EffectLib
}
maven {
url 'https://repo.extendedclip.com/content/repositories/placeholderapi/' // PlaceholderAPI
}
}
dependencies {
compileOnly group: 'org.spigotmc', name: 'spigot-api', version: mcVersion
compileOnly group: 'com.googlecode.json-simple', name: 'json-simple', version: '1.1.1'
implementation group: 'xyz.upperlevel.uppercore', name: 'uppercore', version: coreVersion
implementation group: 'com.zaxxer', name: 'HikariCP', version: '4.0.3'
compileOnly 'me.clip:placeholderapi:2.10.9'
}
shadowJar {
relocate "xyz.upperlevel.uppercore", "${project.group}.uppercore"
relocate "com.zaxxer.hikari", "${project.group}.hikaricp"
}
distributions {
main {
distributionBaseName = 'Quake'
contents {
from { shadowJar.archiveFile.get() }
rename(shadowJar.archiveFileName.get(), "Quake.jar")
if (projects.hasProperty('upperCoreLocation')) {
from { upperCoreLocation }
}
into("Quake") {
from ('src/main/resources') {
exclude 'plugin.yml'
}
}
}
}
}
build.dependsOn(shadowJar)
shadowJar.dependsOn(jar)
distTar.dependsOn(shadowJar)
distZip.dependsOn(shadowJar)
processResources {
filesMatching("plugin.yml") {
expand('project': project)
}
}
compileJava() {
options.compilerArgs += ['-parameters']
}