Move asset building logic to env