This repository has been archived by the owner on Nov 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
60 lines (50 loc) · 1.56 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
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
import org.gradle.internal.os.OperatingSystem
import dev.toastbits.kjna.c.CType
plugins {
kotlin("multiplatform")
id("dev.toastbits.kjna").version("0.0.5")
}
kotlin {
jvmToolchain(22)
jvm()
val native_targets: List<KotlinNativeTarget> =
listOf(
// Native targets are disabled in this sample because :library is JVM-only
// linuxX64(),
// linuxArm64(),
// mingwX64()
)
applyDefaultHierarchyTemplate()
kjna {
generate {
packages(native_targets) {
add("kjna.libmpv") {
enabled = true
addHeader("mpv/client.h", "MpvClient")
libraries = listOf("mpv")
if (OperatingSystem.current().isWindows()) {
overrides.overrideTypedefType("size_t", CType.Primitive.LONG, pointer_depth = 0)
}
}
}
}
}
sourceSets {
all {
languageSettings.enableLanguageFeature("ExpectActualClasses")
}
val commonMain by getting {
dependencies {
implementation(project(":library"))
implementation(project(":runtime"))
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3")
}
}
val jvmMain by getting {
dependencies {
implementation("net.java.dev.jna:jna:5.14.0")
}
}
}
}