Add environment dependency to task