-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
54 lines (44 loc) · 1.38 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
plugins {
kotlin("jvm") version "1.5.10"
application
}
group = "ru.spbu.math-cs"
version = "1.0-SNAPSHOT"
repositories {
mavenCentral()
maven("https://dl.bintray.com/kotlin/kotlin-eap")
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
}
val osName = System.getProperty("os.name")
val targetOs = when {
osName == "Mac OS X" -> "macos"
osName.startsWith("Win") -> "windows"
osName.startsWith("Linux") -> "linux"
else -> error("Unsupported OS: $osName")
}
val osArch = System.getProperty("os.arch")
var targetArch = when (osArch) {
"x86_64", "amd64" -> "x64"
"aarch64" -> "arm64"
else -> error("Unsupported arch: $osArch")
}
val target = "${targetOs}-${targetArch}"
var version = "0.0.0-SNAPSHOT"
if (project.hasProperty("skiko.version")) {
version = project.properties["skiko.version"] as String
}
dependencies {
implementation(platform("org.jetbrains.kotlin:kotlin-bom"))
implementation(kotlin("stdlib-jdk8"))
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-swing:1.4.1")
implementation("org.jetbrains.skiko:skiko-jvm-runtime-$target:$version")
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.2.1")
implementation("org.apache.commons:commons-csv:1.5")
testImplementation(kotlin("test"))
}
tasks.getByName<Test>("test") {
useJUnitPlatform()
}
application {
mainClass.set("MainKt")
}