Fix for pub errors due to old style

fixes the build errors if it tries to connect to pub. It now uses the new pubspec format and works fine.
I'm not sure if it's okay to commit the pubspec.lock's too.