Refactored adding of dependencies based on scala version