extract copydeps task and update_json task from build task to new prebuild task