The flow characterized by a linear longitudinal velocity field u(x)(x, t) =a (t)x, where a (t) = a(0)/(l + a(0)t), a uniform density n(t) proportional to a(t), and a uniform temperature T(t) is analyzed for dilute granular gases by means of a BGK-like model kinetic equation in d dimensions. For a given value of the coefficient of normal restitution a, the relevant control parameter of the problem is the reduced deformation rate a*(t) = a(t)/v(t) (which plays the role of the Knudsen number), where v(t) proportional to n(t) root T(t) is an effective collision frequency. The relevant response parameter is a nonlinear viscosity function eta*(a*) defined from the difference between the normal stress P(xx)(t) and the hydrostatic pressure p(t) = n(t)T(t). The main results of the paper are: (a) an exact first-order ordinary differential equation for eta*(a*) is derived from the kinetic model; (b) a recursion relation for the coefficients of the Chapman-Enskog expansion of eta*(a*) in powers of a* is obtained; (c) the Chapman-Enskog expansion is shown to diverge for elastic collisions (alpha = 1) and converge for inelastic collisions (alpha < 1), in the latter case with a radius of convergence that increases with inelasticity; (d) a simple approximate analytical solution for eta*(a*), hardly distinguishable from the numerical solution of the differential equation, is constructed.