This repository has been archived by the owner on Feb 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
64 lines (57 loc) · 1.53 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
@file:Suppress("UNUSED_VARIABLE")
import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform
plugins {
kotlin("multiplatform") version "1.8.10"
}
group = "pl.gieted.flappy_bird"
version = "1.14-SNAPSHOT"
repositories {
mavenCentral()
google()
}
kotlin {
jvm {
compilations {
create("development")
}
}
js(IR) {
binaries.executable()
browser {
commonWebpackConfig {
devServer?.open = false
}
}
}
sourceSets {
val commonMain by getting {
dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4")
}
}
val jvmMain by getting {
dependencies {
implementation(fileTree("libs") {
include("*.jar", "desktop/*.jar")
if (DefaultNativePlatform.getCurrentOperatingSystem().isWindows) {
include("desktop/windows/*.jar")
} else {
include("desktop/linux/*.jar")
}
})
}
}
val jsMain by getting {
dependencies {
implementation(npm("p5", "^1.4.0"))
compileOnly(npm("@types/p5", "^1.3.1"))
}
}
val jvmDevelopment by getting {
dependsOn(jvmMain)
dependencies {
implementation(kotlin("reflect"))
}
}
}
}