use newer libraries at gradle and order them

Change-Id: I3d44b1317b76b3eaf4cd264447c87cbfb728fc02