generated from Project-Cepi/ExampleExtension
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
81 lines (61 loc) · 2.07 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
// Apply the Kotlin JVM plugin to add support for Kotlin.
kotlin("jvm") version "1.6.0"
id("com.github.johnrengelman.shadow") version "7.1.0"
id("org.jetbrains.dokka") version "1.9.20"
kotlin("plugin.serialization") version "1.4.21"
`maven-publish`
// Apply the application plugin to add support for building a jar
java
}
repositories {
// Use jcenter for resolving dependencies.
jcenter()
// Use mavenCentral
maven(url = "https://repo1.maven.org/maven2/")
maven(url = "https://repo.spongepowered.org/maven")
maven(url = "https://libraries.minecraft.net")
maven(url = "https://jitpack.io")
maven(url = "https://jcenter.bintray.com/")
}
dependencies {
// Align versions of all Kotlin components
compileOnly(platform("org.jetbrains.kotlin:kotlin-bom"))
// Use the Kotlin JDK 8 standard library.
compileOnly(kotlin("stdlib"))
// Use the Kotlin reflect library.
compileOnly(kotlin("reflect"))
// Use the JUpiter test library.
testImplementation("org.junit.jupiter:junit-jupiter:5.8.1")
// Compile Minestom into project
compileOnly("com.github.Minestom:Minestom:72ad230872")
// implement KStom
compileOnly("com.github.Project-Cepi:KStom:9950e8305f")
}
tasks.withType<Test> {
useJUnitPlatform()
}
configurations {
testImplementation {
extendsFrom(configurations.compileOnly.get())
}
}
tasks {
named<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar>("shadowJar") {
archiveBaseName.set("moderation")
mergeServiceFiles()
minimize()
}
test { useJUnitPlatform() }
build { dependsOn(shadowJar) }
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> { kotlinOptions.jvmTarget = "11" }
val compileKotlin: org.jetbrains.kotlin.gradle.tasks.KotlinCompile by tasks
compileKotlin.kotlinOptions {
freeCompilerArgs = listOf("-Xinline-classes")
}