Context. The metallicity gradients of the stellar populations in disc galaxies and their evolution store relevant information on the disc formation history and on those processes which could mix stars a posteriori, such as migration, bars and/or galaxy-galaxy interactions. Aims. We aim to investigate the evolution of the metallicity gradients of the whole stellar populations in disc components of simulated galaxies in a cosmological context. Methods. We analyse simulated disc galaxies selected from a cosmological hydrodynamical simulation that includes chemical evolution and a physically motivated Supernova feedback capable of driving mass-loaded galactic winds. Results. We detect a mild evolution with redshift in the metallicity slopes of −0.02 ± 0.01 dex kpc −1 from z ∼ 1. If the metallicity profiles are normalised by the effective radius of the stellar disc, the slopes show no clear evolution for z < 1, with a median value of approximately −0.23 dex r −1 reff . As a function of stellar mass, we find that metallicity gradients steepen for stellar masses smaller than ∼ 10 10.3 M ⊙ while the trend reverses for higher stellar masses, in the redshift range z = [0, 1]. Galaxies with small stellar masses have discs with larger r reff and flatter metallicity gradients than expected. We detect migration albeit weaker than in previous works. Conclusions. Our stellar discs show a mild evolution of the stellar metallicity slopes up to z ∼ 1, which is well-matched by the evolution calculated archeologically from the abundance distributions of mono-age stellar populations at z ∼ 0. The dispersion in the relations allows for stronger individual evolutions. Overall, Supernova feedback could explain the trends but an impact of migration can not be totally discarded. Galaxy-galaxy interactions or small satellite accretions can also contribute to modify the metallicity profiles in the outer parts. Disentangling the effects of these processes for individual galaxies is still a challenge in a cosmological context.