Skip to content

Commit

Permalink
Fix a bug in platform distributing.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mivik committed Aug 28, 2020
1 parent cbb9502 commit 5e5359d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 5e5359d

Please sign in to comment.