Using macros to make a feature flag system that supports overrides with minimal upkeep
Keeping the content of Localized.strings files and swift accessors to those strings in sync can be an error prone process. What if we could generate the swift code based on all our string keys, and have the Localized.strings files for each language be automatically generated at the same time? We can use a Swift Package Manager build plugin to achieve this goal.
Once you have an executable to perform the functionality of your build plugin, here is how you can integrate it as a binary target and have it generate code and resources.
When creating a build plugin for SPM, you need an executable to perform whatever actions your plugin handles. If your executable itself has dependencies you might find yourself needing that executable in an artifact bundle to be consumed as a binary target in the build plugin.