-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.gradle
82 lines (72 loc) · 2.71 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
import java.text.SimpleDateFormat
plugins {
id "java"
id "idea"
id "eclipse"
id "maven-publish"
id "com.github.johnrengelman.shadow" version '7.0.0'
}
apply plugin: 'maven-publish'
group "io.th0rgal"
def pluginVersion = "1.1.0"
ext.jitpackGroup = group + ".xray"
ext.jitpackVersion = 'main-' + pluginVersion
version = pluginVersion
repositories {
mavenCentral()
mavenLocal()
maven { url 'https://jitpack.io' }
// Spigot
maven { url "https://hub.spigotmc.org/nexus/content/repositories/snapshots/" }
// Because Spigot depends on Bungeecord ChatComponent-API
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
// ProtocolLib
maven { url "https://repo.dmulloy2.net/nexus/repository/public/" }
// Mojang
maven { url "https://libraries.minecraft.net/" }
// CommandAPI
maven { url "https://repo.codemc.org/repository/maven-public/" }
}
compileJava {
options.encoding = "UTF-8"
}
dependencies {
compileOnly group: "org.spigotmc", name: "spigot", version: "1.19.4-R0.1-SNAPSHOT"
compileOnly group: "org.spigotmc", name: "spigot-api", version: "1.19.4-R0.1-SNAPSHOT"
compileOnly group: "com.github.dmulloy2", name: "ProtocolLib", version: "5.1.0"
compileOnly group: 'io.netty', name: 'netty-all', version: '4.1.68.Final'
compileOnly 'com.github.Th0rgal:Oraxen:master-SNAPSHOT'
implementation 'com.github.stefvanschie.inventoryframework:IF:0.10.13'
implementation 'dev.jorel:commandapi-bukkit-shade:9.3.0'
implementation "net.kyori:adventure-text-minimessage:4.15.0"
implementation "net.kyori:adventure-platform-bukkit:4.3.1"
}
processResources {
filesNotMatching(["**/*.png"]) {
expand projectVersion: pluginVersion
}
}
shadowJar {
relocate "com.github.stefvanschie.inventoryframework", "io.th0rgal.xray.shaded.if"
relocate "dev.jorel.commandapi", "io.th0rgal.xray.shaded.commandapi"
relocate "net.kyori", "io.th0rgal.oraxen.shaded.kyori"
manifest {
attributes(
'Built-By': System.properties['user.name'],
'Version': pluginVersion,
'Build-Timestamp': new SimpleDateFormat("yyyy-MM-dd' 'HH:mm:ss.SSSZ").format(new Date()),
'Created-By': "Gradle ${gradle.gradleVersion}",
'Build-Jdk': "${System.properties['java.version']} (${System.properties['java.vendor']} ${System.properties['java.vm.version']})",
'Build-OS': "${System.properties['os.name']} ${System.properties['os.arch']} ${System.properties['os.version']}"
)
}
}
compileJava.dependsOn clean
build.dependsOn shadowJar
publishing {
publications {
grp(MavenPublication) {
from(components.java)
}
}
}