  We present novel constraints on cosmic-ray propagation in the Galaxy using
the recent precise measurements of proton and helium spectra from AMS-02,
together with preliminary AMS-02 data on the antiproton over proton ratio. To
explore efficiently the large (up to eleven-dimensional) parameter space we
employ the nested-sampling algorithm as implemented in the \textsc{MultiNest}
package, interfaced with the \textsc{Galprop} code to compute the
model-predicted spectra. We use VOYAGER proton and helium data, sampling the
local inter-stellar spectra, to constrain the solar modulation potential. We
find that the turbulence of the Galactic magnetic field is well constrained,
i.e., $\delta=0.30^{+0.03}_{-0.02}(stat)^{+0.10}_{-0.04}(sys)$, with
uncertainties dominated by systematic effects. Systematic uncertainties are
determined checking the robustness of the results to the minimum rigidity cut
used to fit the data (from 1 GV to 5 GV), to the propagation scenario
(convection vs no-convection), and to the uncertainties in the knowledge of the
antiproton production cross section. Convection and reaccelaration are found to
be degenerate and not well-constrained singularly when using data above 5 GV.
Using data above 1 GV reacceleration is required, $v_{\rm A}=25\pm2$km/s,
although this value might be significantly affected by the low energy
systematic uncertainty in the solar modulation. In a forthcoming companion
paper, we investigate the constraints imposed by AMS-02 measurements on
lithium, boron, and carbon.
