-
Notifications
You must be signed in to change notification settings - Fork 49
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
92 lines (80 loc) · 2.74 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
92 lines (80 loc) · 2.74 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
import org.gradle.internal.impldep.org.junit.experimental.categories.Categories.CategoryFilter.exclude
import org.gradle.kotlin.dsl.invoke
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
val kotlinVersion = "1.9.25"
java
application
idea
id("org.jetbrains.kotlin.jvm") version kotlinVersion
}
repositories {
mavenCentral()
}
dependencies {
implementation("com.google.code.gson:gson:2.11.0")
implementation("org.apache.logging.log4j:log4j-core:2.23.1")
implementation("org.apache.logging.log4j:log4j-api:2.23.1")
implementation("org.slf4j:slf4j-nop:2.0.16")
implementation("com.lmax:disruptor:3.4.2")
implementation("io.netty:netty-all:4.1.107.Final")
implementation("com.google.guava:guava:33.4.8-jre")
implementation("org.mindrot:jbcrypt:0.4")
implementation("io.github.classgraph:classgraph:4.8.179")
implementation("org.jetbrains.kotlin:kotlin-script-runtime:1.9.25") {
exclude(group = "com.google.guava", module = "guava")
}
implementation(kotlin("reflect"))
implementation(kotlin("scripting-common"))
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:1.8.1")
implementation("com.zaxxer:HikariCP:5.1.0")
implementation("org.mockito:mockito-core:5.14.2")
implementation("mysql:mysql-connector-java:8.0.33")
implementation("org.apache.commons:commons-compress:1.27.1")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.11.0")
testImplementation("org.junit.jupiter:junit-jupiter-params:5.11.4")
testImplementation("org.junit.jupiter:junit-jupiter-engine:5.11.4")
}
group = "luna"
version = "1.0"
application {
mainClass = "io.luna.Luna"
}
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
sourceSets {
main {
java.srcDirs("src/main/java")
}
test {
java.srcDirs("src/test/java")
}
}
}
kotlin {
sourceSets {
main {
kotlin.setSrcDirs(emptyList<Any>())
kotlin.srcDirs(
"src/main/java",
"src/main/kotlin/api",
"src/main/kotlin/engine",
"src/main/kotlin/game"
)
}
}
}
tasks.withType<JavaCompile> {
options.compilerArgs = MutableList(1) { "-Xlint:unchecked" }
options.encoding = "UTF-8"
}
tasks.withType<KotlinCompile>().all {
// TODO@Lunascape We will need this flag in later Kotlin versions for script files to be recognized.
kotlinOptions.freeCompilerArgs = MutableList(1) { "-Xallow-any-scripts-in-source-roots" }
kotlinOptions.jvmTarget = "21"
}
tasks.named<Test>("test") {
useJUnitPlatform()
}