-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle.kts
162 lines (130 loc) · 4.52 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
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
import io.izzel.taboolib.gradle.*
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
val kotlinVersion = "1.8.22"
`java-library`
`maven-publish`
id("io.izzel.taboolib") version "2.0.11"
id("org.jetbrains.kotlin.jvm") version kotlinVersion
kotlin("plugin.serialization") version kotlinVersion
}
taboolib {
env {
install(AI, CHAT, CONFIGURATION, DATABASE, EFFECT, METRICS, NAVIGATION, NMS, NMS_UTIL, UI)
install(EXPANSION_COMMAND_HELPER)
install(BUKKIT_ALL, "platform-bukkit-impl")
enableIsolatedClassloader = true
// debug = true
}
version {
taboolib = "6.1.1-beta15"
coroutines = "1.6.4"
skipKotlinRelocate = true
}
classifier = null
// relocate("com.zaxxer.hikari.", "com.zaxxer.hikari_4_0_3.")
description {
desc("shining - Light up your creativity!")
bukkitApi("1.13")
contributors {
name("Sunshine_wzy")
}
links {
// name("homepage").url("")
}
dependencies {
name("PlaceholderAPI").optional(true)
}
}
}
repositories {
mavenLocal()
mavenCentral()
maven("https://repo.papermc.io/repository/maven-public/")
}
val kotlinVersion: String by project
val exposedVersion: String by project
val jacksonVersion: String by project
dependencies {
compileOnly("ink.ptms:nms-all:1.0.0")
compileOnly("ink.ptms.core:v12004:12004:universal")
compileOnly("ink.ptms.core:v12004:12004:mapped")
compileOnly(kotlin("stdlib"))
compileOnly("org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion")
compileOnly("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4")
compileOnly("org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:1.6.4")
compileOnly("com.google.guava:guava:21.0")
compileOnly("org.yaml:snakeyaml:1.28")
compileOnly("org.jetbrains.exposed:exposed-core:$exposedVersion")
compileOnly("org.jetbrains.exposed:exposed-dao:$exposedVersion")
compileOnly("org.jetbrains.exposed:exposed-jdbc:$exposedVersion")
taboo("com.fasterxml.jackson.core:jackson-annotations:$jacksonVersion") { isTransitive = false }
compileOnly("com.fasterxml.jackson.core:jackson-core:$jacksonVersion")
compileOnly("com.fasterxml.jackson.core:jackson-databind:$jacksonVersion")
compileOnly("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:$jacksonVersion")
compileOnly("com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonVersion")
compileOnly("com.zaxxer:HikariCP:4.0.3")
compileOnly(fileTree("libs"))
testImplementation(platform("org.junit:junit-bom:5.9.0"))
testImplementation("org.junit.jupiter:junit-jupiter")
testImplementation("com.google.guava:guava:21.0")
testImplementation("com.fasterxml.jackson.core:jackson-core:$jacksonVersion")
testImplementation("com.fasterxml.jackson.core:jackson-annotations:$jacksonVersion")
testImplementation("com.fasterxml.jackson.core:jackson-databind:$jacksonVersion")
testImplementation("com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonVersion")
}
tasks {
jar {
// configurations.compileClasspath.get().filter {
// it.name.contains("HikariCP-4.0.3")
// }.forEach {
// from(zipTree(it))
// }
}
java {
withSourcesJar()
}
test {
useJUnitPlatform()
testLogging {
events("passed", "skipped", "failed")
}
}
}
tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
}
tasks.withType<KotlinCompile> {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs = listOf(
"-Xno-param-assertions",
"-Xno-call-assertions",
"-Xno-receiver-assertions",
)
}
}
configure<JavaPluginExtension> {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
publishing {
repositories {
maven {
url = uri("https://repo.tabooproject.org/repository/releases")
credentials {
username = project.findProperty("taboolibUsername").toString()
password = project.findProperty("taboolibPassword").toString()
}
authentication {
create<BasicAuthentication>("basic")
}
}
}
publications {
create<MavenPublication>("library") {
from(components["java"])
groupId = project.group.toString()
}
}
}