-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
66 lines (54 loc) · 2.14 KB
/
build.gradle
File metadata and controls
66 lines (54 loc) · 2.14 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
plugins {
id 'ru.endlesscode.bukkitgradle' version '0.10.0'
id 'com.github.johnrengelman.shadow' version '7.0.0'
}
group = "com.example.myplugin"
description = "My Bukkit plugin with Sentry Reporter"
version = "0.1-SNAPSHOT"
// Read more about BukkitGradle: https://github.com/EndlessCodeGroup/BukkitGradle
bukkit {
apiVersion = "1.17.1"
meta {
name.set("MyPlugin")
url.set("https://www.example.com")
authors.set(["osipxd"])
}
server {
core = "spigot"
eula = true
}
}
shadowJar {
// Exclude dependencies bundled into Spigot from resulting JAR
dependencies {
exclude(dependency("com.google.code.gson:gson:.*"))
exclude(dependency("org.jetbrains:annotations:.*"))
}
// Remove some extra files from resulting JAR
exclude("DebugProbesKt.bin")
exclude("META-INF/proguard/**") // If you don't use proguard
exclude("META-INF/native-image/**")
// To avoid possible conflicts we should relocate embedded dependencies to own unique package
// Here we use manual relocating, but easiest (and slower) variant is use automatically relocating.
// Read more: https://imperceptiblethoughts.com/shadow/configuration/relocation/#automatically-relocating-dependencies
def shadowPackage = "shadow.com.example.myplugin"
relocate "ru.endlesscode.inspector", "${shadowPackage}.inspector"
relocate "kotlinx", "${shadowPackage}.kotlinx"
relocate "kotlin", "${shadowPackage}.kotlin"
// For inspector-sentry-reporter:
relocate "io.sentry", "${shadowPackage}.sentry"
// Enable shadowJar minimization to reduce plugin size.
// Read more: https://imperceptiblethoughts.com/shadow/configuration/minimizing/
minimize()
}
tasks.assemble.dependsOn tasks.shadowJar
def inspectorVersion = "0.12.1"
dependencies {
compileOnly(spigotApi()) { transitive = false }
implementation("ru.endlesscode.inspector:inspector-bukkit:$inspectorVersion")
implementation("ru.endlesscode.inspector:inspector-sentry-reporter:$inspectorVersion")
implementation("ru.endlesscode.inspector:sentry-bukkit:$inspectorVersion")
}
repositories {
mavenCentral()
}