Share code among Tasks

Hi,

Is there a mechanism to share code among tasks, please?
Anything like dashboard variables for dashboards?

Thanks,
Petr