Marek
03/12/2024, 7:57 PMonVariants together with tasks.named to make my task dependent on tasks assemble(CapitalizedVariantName) and bundle(CapitalizedVariantName) to make sure it gets executed whenever I build either apk or app bundle. But apparently the aforementioned tasks are not yet in the task graph at this point.
I want to make sure its done right following the configuration avoidance principles and want to ensure tasks are not created when not needed.
I thought that maybe artifacts API can be used. In the end I want to produce a file, but the file I want to generate shouldn't be a part of the apk, just a file that should eventually be committed to the repository.madisp
03/12/2024, 8:28 PMVampire
03/13/2024, 8:00 AMtasks.named { ... }.configureEach { ... }, or tasks.matching { ... }.configureEach { ... } instead.Marek
03/13/2024, 5:44 PMtasks.matching indeed helped 🙏
@madisp I failed using the artifact APIs. It worked to some extent but required me to setup some artificial input/output in the tasks just so they could be registered with wiredWithFiles which looked fishy. If you have any good resources for the artifacts API usage please share.