forked from CloudburstMC/Nukkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
115 lines (95 loc) · 2.43 KB
/
build.gradle.kts
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
import com.github.jengelman.gradle.plugins.shadow.transformers.Log4j2PluginsCacheFileTransformer
@Suppress("DSL_SCOPE_VIOLATION") // https://youtrack.jetbrains.com/issue/IDEA-262280
plugins {
id("java-library")
id("maven-publish")
id("application")
alias(libs.plugins.shadow)
alias(libs.plugins.git)
}
group = "cn.nukkit"
version = "1.0-SNAPSHOT"
description = "Nuclear powered server software for Minecraft: Bedrock Edition"
repositories {
mavenLocal()
mavenCentral()
maven("https://repo.opencollab.dev/maven-releases")
maven("https://repo.opencollab.dev/maven-snapshots")
}
dependencies {
api(libs.network)
api(libs.natives)
api(libs.fastutil)
api(libs.guava)
api(libs.gson)
api(libs.snakeyaml)
api(libs.leveldb)
api(libs.jwt)
api(libs.bundles.terminal)
api(libs.bundles.log4j)
api(libs.jopt.simple)
compileOnly(libs.lombok)
annotationProcessor(libs.lombok)
testImplementation(libs.bundles.junit)
testCompileOnly(libs.lombok)
testAnnotationProcessor(libs.lombok)
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
}
}
application {
mainClass.set("cn.nukkit.Nukkit")
}
gitProperties {
dateFormat = "dd.MM.yyyy '@' HH:mm:ss z"
failOnNoGitDirectory = false
}
publishing {
repositories {
maven {
name = "opencollab"
url = uri("https://repo.opencollab.dev/maven-snapshots")
credentials {
username = System.getenv("DEPLOY_USERNAME")
password = System.getenv("DEPLOY_PASSWORD")
}
}
}
publications {
create<MavenPublication>("nukkit") {
from(components["java"])
}
}
}
tasks {
compileJava {
options.encoding = "UTF-8"
}
test {
useJUnitPlatform()
}
jar {
archiveClassifier.set("dev")
}
shadowJar {
manifest.attributes["Multi-Release"] = "true"
transform(Log4j2PluginsCacheFileTransformer())
// Backwards compatible jar directory
destinationDirectory.set(file("$projectDir/target"))
archiveClassifier.set("")
exclude("javax/annotation/**")
}
runShadow {
val dir = File(projectDir, "run")
if (!dir.exists()) {
dir.mkdirs()
}
standardInput = System.`in`
workingDir = dir
}
javadoc {
options.encoding = "UTF-8"
}
}