Skip to content

Commit 0af2a2b

Browse files
ALikhachevqurbonzoda
authored andcommitted
Add support for non-packed klib files in the native generator
Relates to KT-65285
1 parent 2e25b00 commit 0af2a2b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

plugin/main/src/kotlinx/benchmark/gradle/NativeSourceGeneratorTask.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ abstract class NativeSourceGeneratorWorker : WorkAction<NativeSourceGeneratorWor
100100
parameters.outputSourcesDir.deleteRecursively()
101101
parameters.outputResourcesDir.deleteRecursively()
102102
parameters.inputClassesDirs
103-
.filter { it.exists() && it.name.endsWith(KLIB_FILE_EXTENSION_WITH_DOT) }
103+
// expect either a packed .klib file or non-packed klib directory
104+
.filter { it.exists() && it.name.endsWith(KLIB_FILE_EXTENSION_WITH_DOT) || it.isDirectory && it.resolve("default/manifest").isFile }
104105
.forEach { lib ->
105106
if (parameters.target.isEmpty())
106107
throw Exception("nativeTarget should be specified for API generator for native targets")

0 commit comments

Comments
 (0)