tirbofish/dropbear · diff
@@ -32,18 +32,12 @@ val libPathProvider = provider { layout.projectDirectory.file("libs/$libName").asFile ) - val foundFile = candidates.firstOrNull { it.exists() } - if (foundFile != null) { - foundFile.absolutePath - } else { - println("No Rust library exists") - "" - } + candidates.firstOrNull { it.exists() }?.absolutePath ?: "" } kotlin { jvm { - withJava() + } val nativeTarget = when { @@ -81,19 +75,16 @@ kotlin { binaries { sharedLib { baseName = "dropbear" - if (isLinux || isMacOs) { linkerOpts("-L$nativeLibDir", "-l$nativeLibNameForLinking", "-Wl,-rpath,\\\$ORIGIN") } else if (isMingwX64) { - val importLibName = "$nativeLibNameForLinking.dll.lib" - val importLibPath = file("$nativeLibDir/$importLibName").absolutePath - linkerOpts(importLibPath) + linkerOpts(file("$nativeLibDir/$nativeLibNameForLinking.dll.lib").absolutePath) } } } } } else { - println("Skipping native target configuration due to missing library path.") + println("WARNING: Rust library not found. Native compilation will skip linking against eucalyptus_core.") nativeTarget.apply { compilations.getByName("main") { cinterops { @@ -120,8 +111,9 @@ kotlin { jvmMain {
Large diffs are not rendered by default. Showing the first 50 of 6155 lines. Show full diff