-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
95 lines (84 loc) · 2.8 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
plugins {
id 'java'
id("io.github.goooler.shadow") version "8.1.8"
id("xyz.jpenilla.run-paper") version "2.3.0"
}
group = 'net.sabafly'
version = '0.1.2'
repositories {
mavenCentral()
maven {
name = "papermc-repo"
url = "https://repo.papermc.io/repository/maven-public/"
}
maven {
url = uri("https://repo.opencollab.dev/main/")
}
maven { url 'https://libraries.minecraft.net/' }
maven { url "https://repo.dmulloy2.net/repository/public/" }
maven { url "https://repo.aikar.co/content/groups/aikar/" }
maven { url 'https://jitpack.io' }
}
dependencies {
compileOnly "io.papermc.paper:paper-api:1.21.1-R0.1-SNAPSHOT"
compileOnly 'dev.cerus.maps:common:3.8.7'
compileOnly 'dev.cerus.maps:plugin:3.8.7'
compileOnly "com.github.MilkBowl:VaultAPI:1.7.1"
compileOnly 'org.geysermc.floodgate:api:2.2.3-SNAPSHOT'
implementation 'me.lucko:commodore:2.2'
implementation "co.aikar:taskchain-bukkit:3.7.2"
implementation "org.spongepowered:configurate-yaml:4.2.0-SNAPSHOT"
implementation 'com.fasterxml.uuid:java-uuid-generator:4.3.0'
}
if (hasProperty('buildScan')) {
buildScan {
termsOfServiceUrl = 'https://gradle.com/terms-of-service'
termsOfServiceAgree = 'yes'
}
}
def targetJavaVersion = 21
java {
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
if (JavaVersion.current() < javaVersion) {
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
}
}
tasks.withType(JavaCompile).configureEach {
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
options.release = targetJavaVersion
}
}
processResources {
def props = [version: version]
inputs.properties props
filteringCharset 'UTF-8'
filesMatching('plugin.yml') {
expand props
}
}
shadowJar {
archiveFileName.set("SlotMachine.jar")
dependencies {
exclude(dependency('com.mojang:brigadier'))
}
minimize()
relocate 'me.lucko.commodore', 'net.sabafly.slotmachine.commodore'
relocate 'co.aikar.taskchain', 'net.sabafly.slotmachine.taskchain'
relocate 'com.fasterxml.uuid', 'net.sabafly.slotmachine.uuid'
}
tasks {
runServer {
downloadPlugins {
github("cerus", "maps", "3.8.7", "maps-plugin.jar")
github("MilkBowl", "Vault", "1.7.3", "Vault.jar")
github("Jikoo", "OpenInv", "5.1.1", "OpenInv.jar")
modrinth("emeraldbank", "0.3.0")
}
// Configure the Minecraft version for our task.
// This is the only required configuration besides applying the plugin.
// Your plugin's jar (or shadowJar if present) will be used automatically.
minecraftVersion("1.21.1")
}
}