tirbofish/dropbear · diff
ci: fix build.gradle.kts
Signature present but could not be verified.
Unverified
@@ -37,7 +37,7 @@ val libPathProvider = provider { foundFile.absolutePath } else { println("No Rust library exists") - "" + null } } @@ -55,37 +55,51 @@ kotlin { else -> throw GradleException("Host OS is not supported in Kotlin/Native.") } - val nativeLibPath = libPathProvider.get() - val nativeLibDir = file(nativeLibPath).parentFile.absolutePath - val nativeLibFileName = file(nativeLibPath).name - val nativeLibNameForLinking = when { - isMacOs -> nativeLibFileName.removePrefix("lib").removeSuffix(".dylib") - isLinux -> nativeLibFileName.removePrefix("lib").removeSuffix(".so") - isMingwX64 -> nativeLibFileName.removeSuffix(".dll") - else -> throw GradleException("Unsupported OS for library name derivation.") - } + val nativeLibPathRaw = libPathProvider.get() + + if (nativeLibPathRaw != null && nativeLibPathRaw.isNotBlank()) { + val nativeLibPath = file(nativeLibPathRaw) + val nativeLibDir = nativeLibPath.parentFile.absolutePath + val nativeLibFileName = nativeLibPath.name + val nativeLibNameForLinking = when { + isMacOs -> nativeLibFileName.removePrefix("lib").removeSuffix(".dylib") + isLinux -> nativeLibFileName.removePrefix("lib").removeSuffix(".so") + isMingwX64 -> nativeLibFileName.removeSuffix(".dll") + else -> throw GradleException("Unsupported OS for library name derivation.") + } - nativeTarget.apply { - compilations.getByName("main") { - cinterops { - val dropbear by creating { - defFile(project.file("src/dropbear.def")) - includeDirs.headerFilterOnly(project.file("headers")) + nativeTarget.apply { + compilations.getByName("main") { + cinterops { + val dropbear by creating { + defFile(project.file("src/dropbear.def"))
Large diffs are not rendered by default. Showing the first 50 of 92 lines. Show full diff