-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.gradle
More file actions
76 lines (62 loc) · 2.08 KB
/
build.gradle
File metadata and controls
76 lines (62 loc) · 2.08 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
import org.apache.tools.ant.filters.ReplaceTokens
import com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation
plugins {
id 'java-library'
id 'ninja.miserable.blossom' version '1.0.1'
id 'com.github.johnrengelman.shadow' version '5.2.0'
}
String packagePath = 'com.herocc.bukkit.multispawn'
group packagePath
version '1.4.0'
//noinspection GroovyUnusedAssignment
sourceCompatibility = 1.8
repositories {
jcenter()
maven { url 'https://hub.spigotmc.org/nexus/content/groups/public/' }
maven { url 'https://papermc.io/repo/repository/maven-public/' }
maven { url 'https://repo.codemc.org/repository/maven-public/' }
maven { url 'https://jitpack.io' }
}
dependencies {
compileOnly 'org.bukkit:bukkit:1.13.2-R0.1-SNAPSHOT'
implementation "io.papermc:paperlib:1.0.2"
implementation 'org.bstats:bstats-bukkit-lite:1.7'
testImplementation 'junit:junit:4.13'
//testImplementation 'com.github.seemeselk:MockBukkit:patch-1-SNAPSHOT'
testImplementation 'com.github.seeseemelk:MockBukkit-v1.16:0.5.0'
}
artifacts { // task 'build' runs generates uberjar
archives shadowJar
}
jar {
compileJava.options.encoding = 'UTF-8' // Use UTF8 Encodings, because standards
archiveClassifier = 'min' // we want the Uberjar to be distributed, this is the minified version
}
task relocateShadowJar(type: ConfigureShadowRelocation) {
target = tasks.shadowJar
prefix = packagePath + ".dependencies"
}
shadowJar {
dependsOn tasks.relocateShadowJar
archiveClassifier = null
}
ext {
// Placeholders for configuration filtering
description = 'Teleports players to a random spawn on join'
author = 'HeroCC <https://herocc.com>'
javaPackage = packagePath
resourceTokens = [
'Name' : rootProject.name,
'Description': description,
'Version': version,
'Author' : author
];
}
//noinspection GroovyAssignabilityCheck
processResources {
include 'plugin.yml', 'config.yml'
filter ReplaceTokens, tokens: resourceTokens
}
blossom {
replaceToken '@Version@', project.version, "src/main/java/${javaPackage}/utils/Constants.java" //TODO Set this up
}