This repository was archived by the owner on Aug 12, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
174 lines (146 loc) · 4.39 KB
/
build.gradle
File metadata and controls
174 lines (146 loc) · 4.39 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
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
plugins {
id 'java-library'
id 'maven-publish'
id "io.papermc.paperweight.userdev" version "2.0.0-beta.17"
id "com.gradleup.shadow" version "8.3.8"
id 'com.gorylenko.gradle-git-properties' version '2.4.1'
}
group = 'gg.nextforge'
version = '3.3-STABLE'
repositories {
mavenCentral()
mavenLocal()
}
gitProperties {
failOnNoGitDirectory = false // kein Fehler, falls kein .git da ist
dateFormat = "yyyy-MM-dd'T'HH:mm:ssZ" // optional: Timestamp-Format
keys = ['git.commit.id', 'git.branch'] // nur die Keys, die du brauchst
}
sourceSets {
main {
resources {
srcDir "${buildDir}/generated/gitProperties"
}
}
}
repositories {
maven {
url = 'https://repo.extendedclip.com/releases/'
}
maven {
url 'https://jitpack.io'
}
}
configurations {
delombok
}
dependencies {
paperweight.paperDevBundle("1.19.1-R0.1-SNAPSHOT")
compileOnly "org.projectlombok:lombok:1.18.38"
annotationProcessor "org.projectlombok:lombok:1.18.38"
implementation "org.mozilla:rhino:1.7.14"
implementation "com.google.code.gson:gson:2.10.1"
implementation "org.bstats:bstats-bukkit:3.0.2"
implementation 'org.redisson:redisson:3.50.0'
implementation 'com.mysql:mysql-connector-j:9.3.0'
implementation 'org.xerial:sqlite-jdbc:3.50.3.0'
implementation 'com.h2database:h2:2.3.232'
implementation 'org.mongodb:mongodb-driver-sync:5.5.1'
implementation 'org.reflections:reflections:0.10.2'
compileOnly 'me.clip:placeholderapi:2.11.6'
compileOnly "com.github.MilkBowl:VaultAPI:1.7"
compileOnly 'net.luckperms:api:5.4'
delombok 'org.projectlombok:lombok:1.18.38'
}
tasks.register('delombok', JavaExec) {
main = 'lombok.launch.Main'
classpath = configurations.delombok
args = ['delombok', 'src/main/java', '-d', "$buildDir/delombok"]
}
javadoc {
dependsOn delombok
source = fileTree("$buildDir/delombok")
classpath = sourceSets.main.compileClasspath
}
subprojects {
apply plugin: 'java-library'
apply plugin: 'maven-publish'
apply plugin: 'io.papermc.paperweight.userdev'
apply plugin: 'com.gradleup.shadow'
apply plugin: 'com.gorylenko.gradle-git-properties'
repositories {
mavenCentral()
mavenLocal()
}
dependencies {
paperweight.paperDevBundle("1.19.1-R0.1-SNAPSHOT")
compileOnly "org.projectlombok:lombok:1.18.38"
annotationProcessor "org.projectlombok:lombok:1.18.38"
implementation "org.mozilla:rhino:1.7.14"
implementation "com.google.code.gson:gson:2.10.1"
implementation "org.bstats:bstats-bukkit:3.0.2"
}
// Version-Injection auch in Subprojects, falls benötigt
tasks.withType(ProcessResources).configureEach {
filesMatching("plugin.yml") {
expand(
version: project.version,
group: project.group,
name: project.name
)
}
}
}
java {
// Use Java 21
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
withJavadocJar()
withSourcesJar()
}
javadoc {
options.encoding = 'UTF-8'
failOnError = false
options.addStringOption('Xdoclint:none', '-quiet')
}
tasks {
compileJava {
options.encoding = "UTF-8"
}
// Haupt-Versionserweiterung für plugin.yml
processResources {
filesMatching("plugin.yml") {
expand(
version: project.version,
group: project.group,
name: project.name
)
}
}
}
shadowJar {
dependsOn(processResources)
relocate("org.mozilla.javascript", "gg.nextforge.libraries.rhino")
relocate("com.google.gson", "gg.nextforge.libraries.gson")
relocate("org.bstats", "gg.nextforge.libraries.bstats")
}
publishing {
repositories {
mavenLocal()
}
publications {
create("mavenJava", MavenPublication) {
from components.java
groupId = project.group
artifactId = 'nextforge'
version = project.version
pom {
name.set('NextForge-Core')
description.set('A modern, modular, and extensible Minecraft server core software for NextForge plugins.')
}
}
}
}