@@ -7,7 +7,7 @@ plugins {
77 alias(libs.plugins.compose)
88}
99
10- version = " 1.2 .0"
10+ version = " 1.3 .0"
1111
1212repositories {
1313 mavenCentral()
@@ -17,8 +17,8 @@ repositories {
1717
1818dependencies {
1919 implementation(projects.common)
20+ implementation(projects.windowsHelper)
2021 implementation(libs.kotlinx.serialization.json)
21- implementation(libs.jnativehook)
2222 implementation(libs.ktor.serialization.kotlinx.json)
2323 implementation(libs.ktor.client.okhttp)
2424 implementation(libs.ktor.client.websockets)
@@ -40,15 +40,34 @@ dependencies {
4040 implementation(libs.androidx.lifecycle.viewmodel.compose)
4141}
4242
43+ tasks {
44+ val copyDll by registering(Copy ::class ) {
45+ dependsOn(" :windows_helper:compileRust" ," :windows_helper:generateHeaders" )
46+ from(project(" :windows_helper" ).layout.projectDirectory.dir(" target/release/windows_helper.dll" ))
47+ include(" *.dll" )
48+ into(layout.buildDirectory.dir(" dll/common" ))
49+ }
50+
51+ afterEvaluate {
52+ named(" prepareAppResources" ) {
53+ dependsOn(copyDll)
54+ }
55+ }
56+ }
57+
4358compose.desktop {
4459 application {
4560 mainClass = " dev.schlaubi.mastermind.LauncherKt"
61+ jvmArgs(" --enable-native-access=ALL-UNNAMED" )
62+
4663 nativeDistributions {
4764 modules(
4865 " java.naming" // required by logback
4966 )
5067 targetFormats(TargetFormat .Msi )
5168
69+ appResourcesRootDir.set(layout.buildDirectory.dir(" dll" ))
70+
5271 licenseFile = rootProject.file(" LICENSE" )
5372 vendor = " Schlaubi"
5473 description = " GTA kill script"
0 commit comments