From 5e5359db513f79080018cfe5af8eaa3d8ff7bb5d Mon Sep 17 00:00:00 2001 From: mivik Date: Fri, 28 Aug 2020 23:33:26 +0800 Subject: [PATCH] Fix a bug in platform distributing. --- build.gradle.kts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 53c1463..5c3ab5b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -81,7 +81,11 @@ abstract class PlatformDistTask : DefaultTask() { splitLine(File(binDir, "${project.name}.bat").readText(), "set CLASSPATH=", "bat") val libFiles = (libDir.listFiles() ?: error("Could not found javacpp libs in distribution")) - val platforms = libFiles.mapNotNull { platformOf(it.name) }.toSet().toList() + val platforms = libFiles.mapNotNull { + // javacpp has distribution for some platforms while llvm hasn't + if (it.name.startsWith(llvmPrefix)) platformOf(it.name) + else null + }.toSet().toList() for (platform in platforms) { println("Distributing for $platform") val outputFile = File(outputDir, "${project.name}-${project.version}-$platform.zip")