-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
116 lines (89 loc) · 3.18 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
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.6.21'
id 'com.github.johnrengelman.shadow' version '7.0.0'
id 'org.cadixdev.licenser' version '0.6.0'
}
group 'me.gabytm.minecraft'
version projectVersion(2, 0, 0)
repositories {
mavenCentral()
maven {
url 'https://oss.sonatype.org/content/repositories/snapshots/'
}
maven {
name 'Spigot'
url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/'
}
maven {
name 'NBT API'
url 'https://repo.codemc.org/repository/maven-public/'
}
maven {
name 'Config'
url 'https://repo.triumphteam.dev/snapshots'
}
maven {
name 'Essentials'
url 'https://repo.essentialsx.net/releases/'
}
maven {
url 'https://jitpack.io'
}
}
dependencies {
compileOnly 'org.spigotmc:spigot-api:1.21.1-R0.1-SNAPSHOT'
implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.6.21'
implementation 'me.mattstudios.utils:matt-framework:1.4.6' // Commands - https://mf.mattstudios.me/mf/mf-1
implementation 'me.mattstudios:triumph-config:1.0.5-SNAPSHOT'
implementation 'de.tr7zw:item-nbt-api:2.13.2' // https://spigotmc.org/resources/7939/
implementation 'net.kyori:adventure-platform-bukkit:4.3.4' // https://docs.adventure.kyori.net/getting-started
// Heads
compileOnly('com.arcaniax:HeadDatabase-API:1.3.2') { transitive = false }
// Custom items
compileOnly 'com.github.oraxen:oraxen:1.154.1' // https://spigotmc.org/resources/72448/
compileOnly 'com.github.LoneDev6:api-itemsadder:3.0.0' // https://spigotmc.org/resources/73355/
// Other plugins
compileOnly('net.essentialsx:EssentialsX:2.20.1') { transitive = false }
implementation 'commons-cli:commons-cli:1.4' // https://commons.apache.org/proper/commons-cli/index.html
implementation 'org.bstats:bstats-bukkit:3.0.0'
}
compileJava.options.encoding = "UTF-8"
compileKotlin.kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8
javaParameters = true
}
processResources {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
eachFile { expand version: version }
}
license {
header = project.file('LICENSE')
include '**/*.kt'
exclude '**/ServerVersion.kt'
}
shadowJar {
archiveName("GUIHelper [${project.version}].jar")
[
'kotlin' : 'kt', // 'kt' to stop other plugins from loading it from my jar
'org.bstats' : 'bstats',
'me.mattstudios.config' : 'defaults',
'me.mattstudios.mf' : 'commands',
'de.tr7zw.changeme.nbtapi': 'nbtapi'
].each { relocate(it.key, 'me.gabytm.minecraft.guihelper.libs.' + it.value) }
}
tasks.register('copyJarToServer', Copy) {
if (testServerVersion == '') {
throw new IllegalArgumentException("testServerVersion not provided")
} else {
from shadowJar
into './testServer/' + testServerVersion + '/plugins'
}
}
private static String projectVersion(int major, int minor, int patch) {
def buildNumber = System.getenv('BUILD_NUMBER') ?: System.getProperty('BUILD_NUMBER')
if (buildNumber == null) {
return "$major.$minor.$patch"
} else {
return "$major.$minor.$patch-$buildNumber"
}
}