  We present a measurement of inclusive J/$\psi$ production in p-Pb collisions
at $\sqrt{s_{\rm NN}}$ = 5.02 TeV as a function of the centrality of the
collision, as estimated from the energy deposited in the Zero Degree
Calorimeters. The measurement is performed with the ALICE detector down to zero
transverse momentum, $p_{\rm T}$, in the backward ($-4.46 < y_{\rm cms} <
-2.96$) and forward ($2.03 < y_{\rm cms} < 3.53$) rapidity intervals in the
dimuon decay channel and in the mid-rapidity region ($-1.37 < y_{\rm cms} <
0.43$) in the dielectron decay channel. The backward and forward rapidity
intervals correspond to the Pb-going and p-going direction, respectively. The
$p_{\rm T}$-differential J/$\psi$ production cross section at backward and
forward rapidity is measured for several centrality classes, together with the
corresponding average $p_{\rm T}$ and $p^2_{\rm T}$ values. The nuclear
modification factor, $Q_{\rm pPb}$, is presented as a function of centrality
for the three rapidity intervals, and, additionally, at backward and forward
rapidity, as a function of $p_{\rm T}$ for several centrality classes. At mid-
and forward rapidity, the J/$\psi$ yield is suppressed up to 40% compared to
that in pp interactions scaled by the number of binary collisions. The degree
of suppression increases towards central p-Pb collisions at forward rapidity,
and with decreasing $p_{\rm T}$ of the J/$\psi$. At backward rapidity, the
$Q_{\rm pPb}$ is compatible with unity within the total uncertainties, with an
increasing trend from peripheral to central p-Pb collisions.
