-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbuild.gradle.kts
56 lines (47 loc) · 1.71 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
val jvmVersion = JavaVersion.VERSION_11
val jvmVersionString = jvmVersion.majorVersion.let { if (it.toInt() <= 10) "1.$it" else it }
group = "net.axay"
version = "1.0.0"
plugins {
kotlin("jvm") version "1.4.32"
id("com.github.johnrengelman.shadow") version "6.1.0"
kotlin("plugin.serialization") version "1.4.21"
}
repositories {
mavenLocal()
jcenter()
mavenCentral()
maven("https://repo.codemc.io/repository/maven-snapshots/")
}
dependencies {
implementation(kotlin("stdlib"))
compileOnly("org.spigotmc", "spigot", "1.16.5-R0.1-SNAPSHOT")
implementation("net.axay:kspigot:1.16.26")
implementation("net.axay", "BlueUtils", "1.0.2")
implementation("org.litote.kmongo", "kmongo-core", "4.2.7")
implementation("org.litote.kmongo:kmongo-coroutine-core:4.2.7")
implementation("de.hglabor:hglabor-utils:0.0.12")
implementation("org.litote.kmongo", "kmongo-serialization-mapping", "4.2.7")
compileOnly("net.luckperms:api:5.3")
}
java.sourceCompatibility = jvmVersion
java.targetCompatibility = jvmVersion
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = jvmVersionString
}
tasks {
shadowJar {
//dependencies {
// exclude(dependency("org.jetbrains.kotlin:kotlin-stdlib.*"))
//}
//minimize()
simpleRelocate("net.axay.kspigot")
//simpleRelocate("org.litote.kmongo.kmongo-core")
//simpleRelocate("org.litote.kmongo.kmongo-serialization-mapping")
}
}
fun ShadowJar.simpleRelocate(pattern: String) {
relocate(pattern, "${project.group}.${project.name.toLowerCase()}.shadow.$pattern")
}