-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
122 lines (106 loc) · 4.4 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
plugins {
id 'java'
id 'io.github.goooler.shadow' version "8.1.7"
id 'maven-publish'
id "com.modrinth.minotaur" version "2.8.7"
}
group = 'dev.unnm3d'
version = '1.3.2'
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
maven { url = "https://repo.papermc.io/repository/maven-public/" }
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/groups/public/"
}
maven { url = "https://repo.codemc.io/repository/maven-public/" }
maven { url 'https://repo.xenondevs.xyz/releases' }
}
dependencies {
compileOnly "io.papermc.paper:paper-api:1.20.6-R0.1-SNAPSHOT"
compileOnly 'com.zaxxer:HikariCP:5.1.0'
compileOnly 'org.projectlombok:lombok:1.18.34'
compileOnly 'io.lettuce:lettuce-core:6.5.2.RELEASE'
compileOnly "com.github.MilkBowl:VaultAPI:1.7.1"
compileOnly "com.github.Emibergo02:RedisEconomy:4.3.19"
implementation 'de.exlll:configlib-paper:4.5.0'
implementation 'com.github.alexdev03:drink:1.5.3'
//implementation 'xyz.xenondevs.invui:invui:2.0.0-alpha.6'
implementation 'xyz.xenondevs.invui:invui-core:1.43'
implementation 'xyz.xenondevs.invui:inventory-access-r19:1.43'
implementation 'xyz.xenondevs.invui:inventory-access-r20:1.43'
implementation 'xyz.xenondevs.invui:inventory-access-r21:1.43'
implementation 'xyz.xenondevs.invui:inventory-access-r22:1.43'
annotationProcessor 'org.projectlombok:lombok:1.18.34'
testImplementation("org.junit.jupiter:junit-jupiter:5.10.2")
testImplementation(platform("org.junit:junit-bom:5.10.2"))
testImplementation 'io.papermc.paper:paper-api:1.20.6-R0.1-SNAPSHOT'
testImplementation 'org.mockbukkit.mockbukkit:mockbukkit-v1.21:4.21.0'
testImplementation 'com.zaxxer:HikariCP:5.1.0'
testImplementation 'org.xerial:sqlite-jdbc:3.46.0.0'
testImplementation 'xyz.xenondevs.invui:invui:1.43'
testImplementation 'org.projectlombok:lombok:1.18.34'
testImplementation 'io.lettuce:lettuce-core:6.5.2.RELEASE'
testImplementation "com.github.MilkBowl:VaultAPI:1.7.1"
testImplementation "com.github.Emibergo02:RedisEconomy:4.3.19"
testImplementation 'com.github.alexdev03:drink:1.5.3'
testImplementation 'org.awaitility:awaitility:4.2.2'
}
test {
useJUnitPlatform()
}
shadowJar {
destinationDirectory.set(file("$rootDir/target"))
archiveClassifier.set('')
relocate 'de.exlll.configlib', 'dev.unnm3d.redistrade.libraries.configlib'
relocate 'dev.jorel.commandapi', 'dev.unnm3d.redistrade.libraries.commandapi'
relocate 'com.jonahseguin.drink', 'dev.unnm3d.redistrade.libraries.drink'
relocate 'xyz.xenondevs.invui', 'dev.unnm3d.redistrade.libraries.invui'
relocate 'xyz.xenondevs.inventoryaccess', 'dev.unnm3d.redistrade.libraries.inventoryaccess'
exclude 'colors.bin'
}
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 {
options.encoding = 'UTF-8'
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
options.release.set(targetJavaVersion)
}
}
publishing {
publications {
mavenJava(MavenPublication) {
groupId = 'dev.unnm3d'
artifactId = 'redistrade'
version = "$version"
artifact shadowJar
}
}
}
modrinth {
token = System.getenv("MODRINTH_TOKEN") // Remember to have the MODRINTH_TOKEN environment variable set or else this will fail - just make sure it stays private!
projectId = "redistrade" // This can be the project ID or the slug. Either will work!
versionType = "release" // This is the default -- can also be `beta` or `alpha`
uploadFile = shadowJar // With Loom, this MUST be set to `remapJar` instead of `jar`!
gameVersions = ["1.21.4", "1.21.3","1.21.1","1.21.2","1.20.6"] // Must be an array, even with only one version
loaders = ["paper","spigot","bukkit"] // Must also be an array - no need to specify this if you're using Loom or ForgeGradle
}
processResources {
def props = [version: version]
inputs.properties props
filteringCharset 'UTF-8'
filesMatching('plugin.yml') {
expand props
}
filesMatching('source') {
expand props
}
}