-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
83 lines (67 loc) · 1.96 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
import org.apache.tools.ant.filters.ReplaceTokens
plugins {
id 'java-library'
id 'idea'
id 'maven-publish'
id "com.github.johnrengelman.shadow" version "7.0.0"
}
//Fixes issues related to special characters being used
compileJava.options.encoding = "UTF-8"
compileTestJava.options.encoding = "UTF-8"
group = "com.magmaguy"
version = "1.3.1"
description = "BetterFood"
repositories {
mavenLocal()
maven {
url = 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/'
// As of Gradle 5.1, you can limit this to only those
// dependencies you expect from it
content {
includeGroup 'org.bukkit'
includeGroup 'org.spigotmc'
}
}
//Bstats API
maven { url = 'https://repo.codemc.org/repository/maven-public' }
mavenCentral()
mavenLocal()
}
dependencies {
implementation 'org.projectlombok:lombok:1.18.24'
implementation 'org.jetbrains:annotations:23.0.0'
implementation 'org.jetbrains:annotations:23.0.0'
compileOnly 'org.projectlombok:lombok:1.18.24'
annotationProcessor 'org.projectlombok:lombok:1.18.24'
//Spigot API
compileOnly "org.spigotmc:spigot-api:1.18-R0.1-SNAPSHOT"
//BStats API
implementation group: 'org.bstats', name: 'bstats-bukkit', version: '2.2.1'
}
artifacts { // task 'build' runs generates uberjar
archives shadowJar
}
jar {
archiveClassifier.set('min') // we want the Uberjar to be distributed, this is the minified version
}
String packagePath = 'com.magmaguy.shaded'
// Relocating a Package
shadowJar {
dependencies {
relocate('org.bstats', packagePath + '.bstats')
}
archiveClassifier.set(null)
archiveFileName.set(project.name + ".jar")
destinationDirectory.set(new File("output"))
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
ext {
resourceTokens = [
'Version': version
]
}
processResources {
filter ReplaceTokens, tokens: resourceTokens
}