changing build files to move duplicated code into shared file