gradle-mdicons
gradle-mdicons copied to clipboard
Build issues when using both pattern and asset
:app:mdiconsCleanIcons
, :app:mdiconsCopyIconsByAsset
, and :app:mdiconsCopyIconsByPattern
are all separate tasks. :app:mdiconsCopyIconsByAsset
and :app:mdiconsCopyIconsByPattern
will be skipped if the mdicons
config relative to them is the same as last run. And :app:mdiconsCleanIcons
seems to run when either one of them changes.
As a result if you setup mdicons with both pattern
and asset
rules and sync/build then modify a pattern
rule and sync/build then :app:mdiconsCleanIcons
and :app:mdiconsCopyIconsByPattern
will run while :app:mdiconsCopyIconsByAsset
will be skipped.
However because :app:mdiconsCleanIcons
erases all md icons this means that both asset and pattern based icons will be erased and only pattern based icons will be re-created leaving no asset icons. The reverse should of course be true.
Is there any form of dependency structure that can be created in gradle or invalidation that can becalled from clean to make sure it runs both tasks if clean is run? Or can the two commands be combined.
Alternatively, can the assets command be modified so it will copy assets in colors that already exist instead of trying to convert them from white? Then all pattern rules can simply be converted into asset rules.