-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathbuild.gradle
More file actions
95 lines (82 loc) · 2.58 KB
/
build.gradle
File metadata and controls
95 lines (82 loc) · 2.58 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
plugins {
id 'java'
id 'com.gradleup.shadow' version '9.4.1'
id "com.modrinth.minotaur" version "2.+" // Modrinth Publishing
id 'io.typst.spigradle.spigot' version '4.0.2' // Run a Spigot server locally
}
String packagePath = 'org.minecast.bedhome'
group packagePath
version = '2.36'
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
repositories {
mavenCentral()
maven { url "https://hub.spigotmc.org/nexus/content/groups/public" }
//maven { url "http://repo.gravitydevelopment.net" }
maven { url "https://nexus.hc.to/content/repositories/pub_releases" }
maven { url "https://jitpack.io" }
maven { url 'https://repo.codemc.org/repository/maven-public' }
}
dependencies {
compileOnly 'org.spigotmc:spigot-api:1.20.4-R0.1-SNAPSHOT'
implementation 'net.milkbowl.vault:VaultAPI:1.7'
implementation 'org.bstats:bstats-bukkit:3.0.2'
implementation 'com.github.HeroiCraft:Updater:c026fb8004'
}
artifacts { // task 'build' runs generates uberjar
archives shadowJar
}
jar {
archiveClassifier.set('min') // we want the Uberjar to be distributed, this is the minified version
}
shadowJar {
dependencies {
include dependency('com.github.HeroiCraft:Updater')
include dependency('org.bstats:bstats-bukkit')
include dependency('org.bstats:bstats-base')
include dependency('net.milkbowl.vault:VaultAPI')
}
dependencies {
relocate('org.bstats', packagePath + '.dependencies.bstats')
relocate('net.gravitydevelopment.updater', packagePath + '.dependencies.updater')
relocate('net.milkbowl.vault', packagePath + '.dependencies.vault')
}
archiveClassifier.set(null)
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
ext {
resourceTokens = [
'Version': version
]
}
processResources {
filter org.apache.tools.ant.filters.ReplaceTokens, tokens: resourceTokens
}
tasks.named('wrapper') {
distributionType = Wrapper.DistributionType.BIN
gradleVersion = '9.4.1'
}
modrinth { // task `modrinth`
token = System.getenv("MODRINTH_TOKEN")
projectId = "SLo9kQuB"
versionType = "release"
uploadFile = shadowJar
gameVersions = ["1.18", "1.20", "1.21"]
loaders = ["bukkit", "paper", "spigot"]
syncBodyFrom = rootProject.file("README.md").text // task `modrinthSyncBody`
dependencies {
// scope.type
// The scope can be `required`, `optional`, `incompatible`, or `embedded`
// The type can either be `project` or `version`
}
}
tasks.modrinth.dependsOn(tasks.modrinthSyncBody)
debugSpigot {
version.set('1.21.11')
eula.set(true)
jarFile.set(tasks.shadowJar.archiveFile)
}