forked from DevOnTheRocks/SkyClaims
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
125 lines (109 loc) · 3.55 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
plugins {
id "java"
id "idea"
id "signing"
id "com.github.ben-manes.versions" version "0.39.0"
id "ninja.miserable.blossom" version "1.0.1"
id "com.github.johnrengelman.shadow" version "5.0.0"
id "io.franzbecker.gradle-lombok" version "3.1.0"
id "org.sonarqube" version "2.6"
id "org.spongepowered.plugin" version "0.9.0"
}
group = "net.mohron.skyclaims"
version = "${major}.${minor}.${patch}-${api}-${suffix}"
description = "SkyClaims is an Island Management plugin that integrates with GriefDefender."
if (System.getenv().BUILD_NUMBER != null) {
version += "-${System.getenv().BUILD_NUMBER}"
}
compileJava {
sourceCompatibility = targetCompatibility = "1.8"
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
repositories {
mavenCentral()
maven {
name = "Sponge"
url = "https://repo.spongepowered.org/maven"
}
maven {
name = "Forge"
url = "https://files.minecraftforge.net/maven"
}
maven {
name = "GriefDefender"
url = "https://repo.glaremasters.me/repository/bloodshot"
}
maven {
name = "Nucleus"
url = "https://repo.drnaylor.co.uk/artifactory/list/minecraft"
}
maven {
name = "LuckPerms"
url = "https://repo.lucko.me/"
}
maven {
name = "Aikar"
url = "https://repo.aikar.co/content/groups/aikar/"
}
maven {
name = "jitpack"
url = "https://jitpack.io"
}
}
dependencies {
annotationProcessor("org.spongepowered:spongeapi:${spongeapi}")
implementation("org.spongepowered:spongeapi:${spongeapi}")
// runtime(files("libs/griefdefender-sponge-2.0.1.jar"))
implementation("com.griefdefender:api:2.0.0-SNAPSHOT")
implementation("me.lucko.luckperms:luckperms-api:4.4")
implementation("net.kyori:adventure-api:4.9.0")
implementation("net.kyori:adventure-platform-spongeapi:4.0.0")
implementation("net.kyori:adventure-text-serializer-spongeapi:4.0.0-SNAPSHOT")
implementation("net.kyori:event-api:5.0.0-SNAPSHOT")
implementation("co.aikar:acf-sponge:0.5.0-SNAPSHOT")
implementation("io.github.nucleuspowered:nucleus-api:${nucleus}")
implementation("org.bstats:bstats-sponge:${bstats}")
}
lombok {
version = "1.18.8"
sha256 = ""
}
shadowJar {
archiveClassifier.set("plugin")
dependencies {
include(dependency("org.bstats:bstats-base:${bstats}"))
include(dependency("org.bstats:bstats-sponge:${bstats}"))
}
relocate "org.bstats", "net.mohron.skyclaims.metrics"
relocate("net.kyori", "com.griefdefender.lib.kyori")
relocate("co.aikar.commands", "com.griefdefender.lib.aikar.commands")
minimize()
}
blossom {
def pluginInfo = "src/main/java/net/mohron/skyclaims/PluginInfo.java"
replaceToken "@NAME@", project.name, pluginInfo
replaceToken "@VERSION@", project.version, pluginInfo
replaceToken "@DESCRIPTION@", project.description, pluginInfo
replaceToken "@SPONGE_API@", spongeapi, pluginInfo
replaceToken "@GRIEF_DEFENDER@", griefdefender, pluginInfo
replaceToken "@NUCLEUS@", nucleus, pluginInfo
}
task cleanModsFolder(type: Delete) {
delete fileTree("run/forge/mods").matching {
include "**/SkyClaims-*-plugin.jar"
}
}
task copyPlugin(type: Copy) {
from 'build/libs'
into 'run/forge/mods'
include "SkyClaims-${version}-plugin.jar"
}
copyPlugin.dependsOn build
copyPlugin.dependsOn cleanModsFolder
signing {
required {Project.hasProperty("signing.keyId")}
sign configurations.archives, configurations.shadow
}
build.dependsOn(shadowJar)