-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle
92 lines (80 loc) · 2.62 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
plugins {
id 'java'
id 'com.github.johnrengelman.shadow' version '8.1.1'
id "com.modrinth.minotaur" version "2.+" // Modrinth Publishing
}
String packagePath = 'org.minecast.bedhome'
group packagePath
version = '2.35'
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' }
maven { url 'https://papermc.io/repo/repository/maven-public/'}
}
dependencies {
compileOnly 'org.spigotmc:spigot-api:1.20.4-R0.1-SNAPSHOT'
implementation 'net.milkbowl.vault:VaultAPI:1.6'
implementation 'org.bstats:bstats-bukkit:3.0.2'
implementation 'com.github.HeroiCraft:Updater:c026fb8004'
implementation "io.papermc:paperlib:1.0.5"
}
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('io.papermc:paperlib')
include dependency('net.milkbowl.vault:VaultAPI')
}
dependencies {
relocate('org.bstats', packagePath + '.dependencies.bstats')
relocate('io.papermc.lib', packagePath + '.dependencies.paperlib')
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 = '8.2'
}
modrinth { // task `modrinth`
token = findProperty('modrinth_pat')
projectId = "SLo9kQuB"
versionType = "release"
uploadFile = shadowJar
gameVersions = ["1.18", "1.20"]
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)