  The existence of a Radius Valley in the Kepler size distribution stands as
one of the most important observational constraints to understand the origin
and composition of exoplanets with radii between that of Earth and Neptune. The
goal of this work is to provide insights into the existence of the Radius
Valley from, first, a pure formation point of view, and second, a combined
formation-evolution model. We run global planet formation simulations including
the evolution of dust by coagulation, drift and fragmentation; and the
evolution of the gaseous disc by viscous accretion and photoevaporation. A
planet grows from a moon-mass embryo by either silicate or icy pebble
accretion, depending on its position with respect to the water ice line. We
account for gas accretion and type-I/II migration. We perform an extensive
parameter study evaluating a wide range in disc properties and embryo's initial
location. We account for photoevaporation driven mass-loss after formation. We
find that due to the change in dust properties at the water ice line, rocky
cores form typically with $\sim$3 M$_{\oplus}$ and have a maximum mass of
$\sim$5 M$_{\oplus}$, while icy cores peak at $\sim$10 $M_{\oplus}$, with
masses lower than 5 M$_{\oplus}$ being scarce. When neglecting the gaseous
envelope, rocky and icy cores account naturally for the two peaks of the Kepler
size distribution. The presence of massive envelopes for cores more massive
than $\sim$10 M$_{\oplus}$ inflates the radii of those planets above 4
R$_{\oplus}$. While the first peak of the Kepler size distribution is
undoubtedly populated by bare rocky cores, the second peak can host water-rich
planets with thin H-He atmospheres. Some envelope-loss mechanism should operate
efficiently at short orbital periods to explain the presence of $\sim$10-40
M$_{\oplus}$ planets falling in the second peak of the size distribution.
