Skip to content

Commit 50d9c56

Browse files
committed
filter out KLib targets where the klib doesn't exist
1 parent f076934 commit 50d9c56

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

modules/bcv-gradle-plugin/src/main/kotlin/tasks/BCVApiGenerateTask.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,14 @@ constructor(
9393
outputApiBuildDir = outputApiBuildDir,
9494
)
9595

96+
// TODO log when klib file doesn't exist
97+
// TODO log warning when klibFile has >1 file
98+
val klibTargets = enabledTargets.withType<BCVKLibTarget>()
99+
.filter { it.klibFile.singleOrNull()?.exists() == true }
100+
96101
generateKLibTargets(
97102
workQueue = workQueue,
98-
klibTargets = enabledTargets.withType<BCVKLibTarget>(),
103+
klibTargets = klibTargets,
99104
outputApiBuildDir = outputApiBuildDir,
100105
)
101106

0 commit comments

Comments
 (0)