File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 7878 - [ Basic conversion] ( #basic-conversion )
7979 - [ Icon pack configuration] ( #icon-pack-configuration )
8080 - [ Icon pack with nested packs configuration] ( #icon-pack-with-nested-packs-configuration )
81+ - [ Tips and tricks] ( #tips-and-tricks )
8182- [ Other] ( #other )
8283 - [ Export formats] ( #export-formats )
8384 - [ Comparison with other solutions] ( #comparison-with-other-solutions )
@@ -682,6 +683,31 @@ fun Demo() {
682683}
683684```
684685
686+ ### Tips and tricks
687+
688+ #### Copy generated icons into source folder instead of build folder
689+
690+ To keep generated icons in your source folder (e.g. for version control), you can create custom Gradle tasks to sync
691+ the generated files after the generation task.
692+
693+ ``` kotlin
694+ val copyTask = tasks.register<Copy >(" copyValkyrieIcons" ) {
695+ dependsOn(tasks.named(" generateValkyrieImageVector" ))
696+
697+ from(layout.buildDirectory.dir(" generated/sources/valkyrie/commonMain" ))
698+ into(layout.projectDirectory.dir(" src/commonMain/kotlin" ))
699+ }
700+
701+ val cleanTask = tasks.register<Delete >(" cleanValkyrieGenerated" ) {
702+ delete(layout.buildDirectory.dir(" generated/sources/valkyrie" ))
703+ }
704+
705+ tasks.register(" updateValkyrieIcons" ) {
706+ dependsOn(copyTask)
707+ finalizedBy(cleanTask)
708+ }
709+ ```
710+
685711## Other
686712
687713### Export formats
You can’t perform that action at this time.
0 commit comments