This message was deleted.
# community-support
s
This message was deleted.
v
The task is probably added after you do that
findByName
which is bad anyway, as it prevents task configuration avoidance. Better do
Copy code
tasks
    .matching { it.name == "kspKotlinIosSimulatorArm64" }
    .configureEach { finalizedBy("myTask") }
1
g
Thank you so much! One last question, imagine that the task is defined in the root: project: • gradle < here • module ◦ gradle < called here is there a way to specify the “path” to the task? Like “../taskName”
v
Copy code
finalizedBy(":myTask")
I guess. But that is a bit smelly 🙂
1
g
Nice it worked! Why do you say it’s smelly? 😅 Let’s say I’ve a module that creates some helper tasks, to call them I must use “moduletask” right?
v
Well, it sounds smelly that
:module:kspKotlinIosSimulatorArm64
should be finalized by a task in
:
. Maybe it is ok, but heavily depends on the details, just feels wrong instantly. And a "module with helper tasks" also does not really sound idiomatic. 😄
g
eheh yeah I get your point. Well in my case I’m generating some swift files and I need to copy them after that task. Maybe a big “magic”, buuut, it’s an experiment 🙃 I can provide a link when published.
thank you so much for your help!
👌 1