File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
buildSrc/src/main/kotlin/app/softwork/bootstrapcompose/icons Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -27,11 +27,12 @@ kotlin {
27
27
}
28
28
tasks {
29
29
val generateSVG by registering(app.softwork.bootstrapcompose.icons.ConvertSvg ::class ) {
30
+ dependsOn(rootProject.tasks.getByName(" kotlinNpmInstall" ))
30
31
icons.set(rootProject.file(" build/js/node_modules/bootstrap-icons/icons" ))
31
32
outputDir.set(File (project.buildDir, " generated/icons" ))
32
33
kotlin.sourceSets[" main" ].kotlin.srcDir(outputDir)
33
34
}
34
- assemble {
35
+ getByName( " compileKotlinJs " ) {
35
36
dependsOn(generateSVG)
36
37
}
37
38
}
Original file line number Diff line number Diff line change @@ -27,7 +27,9 @@ abstract class ConvertSvg : DefaultTask() {
27
27
icons.asFileTree.forEachIndexed { index, file ->
28
28
val name = file.nameWithoutExtension
29
29
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" )
31
33
.writeText(convertSvgToComposeSvg(file.readText(), name))
32
34
}
33
35
}
You can’t perform that action at this time.
0 commit comments