Refactor build scripts to use implementation dependencies instead of api for finer grained recompilations.