Skip to content

Commit c8c5abe

Browse files
authored
Fix icons klib with empty source module (#274)
Co-authored-by: hfhbd <hfhbd@users.noreply.github.com>
1 parent 7e78fc1 commit c8c5abe

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

bootstrap-compose-icons/build.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,12 @@ kotlin {
2727
}
2828
tasks {
2929
val generateSVG by registering(app.softwork.bootstrapcompose.icons.ConvertSvg::class) {
30+
dependsOn(rootProject.tasks.getByName("kotlinNpmInstall"))
3031
icons.set(rootProject.file("build/js/node_modules/bootstrap-icons/icons"))
3132
outputDir.set(File(project.buildDir, "generated/icons"))
3233
kotlin.sourceSets["main"].kotlin.srcDir(outputDir)
3334
}
34-
assemble {
35+
getByName("compileKotlinJs") {
3536
dependsOn(generateSVG)
3637
}
3738
}

buildSrc/src/main/kotlin/app/softwork/bootstrapcompose/icons/ConvertSvg.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ abstract class ConvertSvg : DefaultTask() {
2727
icons.asFileTree.forEachIndexed { index, file ->
2828
val name = file.nameWithoutExtension
2929
println("$index $name")
30-
File(outputDir, "$name.kt")
30+
val packageFile = File(outputDir, "app/softwork/bootstrapcompose/icons")
31+
packageFile.mkdirs()
32+
File(packageFile, "$name.kt")
3133
.writeText(convertSvgToComposeSvg(file.readText(), name))
3234
}
3335
}

0 commit comments

Comments
 (0)