Fix dependency and move versioning to the build script