The Newtonian gravitational constant G has proved to be one of the most difficult constants to measure in physics. The improvement of measuring G with the atomic interferometry method is significantly limited by the positioning accuracy of the atom clouds and source masses, and the measurement accuracy of the atomic velocity. In this article, we propose an idea for designing the source masses to determine G with atom interferometry, in which a nearly uniform gravitational field in the motion region of the atom clouds is constructed. This design can greatly reduce the influence of the uncertainty of the atomic initial position and velocity on the precision of G measurement, since these atomic initial conditions affect the interferometer phase shift by coupling themselves with the gravitational gradient. Finally, we present a scheme for measuring G with a relative standard uncertainty of 27 parts per million.