Ensure prepareRelease is run before build without affecting task graph.