HRM
1plugins {
2kotlin("jvm")
3kotlin("plugin.serialization")
4application
5}
6
7group = project.property("HRMgroup") as String + ".server"
8version = project.property("HRMversion") as String
9val mainClazz = "$group.MainKt"
10val applicationName = "HRM Server"
11
12val os = System.getProperty("os.name")
13
14dependencies {
15implementation(project(":core"))
16if (os.startsWith("Linux")) {
17implementation(project(":linux"))
18} else if (os.startsWith("Windows")) {
19implementation(project(":windows"))
20}
21implementation(kotlin("stdlib-jdk8"))
22implementation("io.ktor:ktor-network:1.4.0")
23}
24
25tasks {
26compileKotlin {
27kotlinOptions.jvmTarget = "1.8"
28}
29compileTestKotlin {
30kotlinOptions.jvmTarget = "1.8"
31}
32}
33
34application {
35applicationName = rootProject.name
36mainClassName = mainClazz
37}
38
39val jar by tasks.getting(Jar::class) {
40manifest {
41attributes["Manifest-Version"] = version
42attributes["Main-Class"] = mainClazz
43attributes["Application-Name"] = applicationName
44}
45from(configurations.runtimeClasspath.get().map { if (it.isDirectory) it else zipTree(it) })
46}
47