RedMadRobot / figma-export

Command line utility to export colors, typography, icons and images from Figma to Xcode / Android Studio project
MIT License
727 stars 114 forks source link

FigmaExport doesn't delete old resources (Android) #28

Closed subdan closed 3 years ago

subdan commented 3 years ago

There is a Figma file with 50 icons. Export the icons to an Android project. Remove 10 icons from Figma. Export the icons to the Android project again. Deleted icons are not deleted from the Android project.

There was an idea to make nested folders inside drawable, for example drawable/icons, but it is prohibited.

osipxd commented 3 years ago

It is possible to create a nested folder in res dir for figma-export purposes. It will contain own drawable and values directories. But this approach requires additional configuration line in a build script:

android {
  sourceSets {
    main {
      res.srcDirs += "src/main/res/{needed_directory_name}"
    }
  }
}
subdan commented 3 years ago

Cool! I will try to use your solution.

osipxd commented 3 years ago

I missed main in the snippet. Fixed now