The Alpha Particle X-ray Spectrometer (APXS) on the rover, , has analyzed the composition of geologic materials along a >20-kilometer traverse in Gale crater on Mars. The APXS dataset after 6.5 Earth years (2301 sols) includes 712 analyses of soil, sand, float, bedrock, and drilled/scooped fines. We present the APXS results over this duration and provide stratigraphic context for each target. We identify the best APXS analysis of each of the 22 drilled and scooped samples that were delivered to the instruments CheMin (X-ray diffractometer) and SAM (mass spectrometer and gas chromatograph) during this period. The APXS results demonstrate that the basaltic and alkalic units in the Bradbury group (sols 0-750) show minimal alteration indicating an arid climate. In contrast, the Murray formation of the Mount Sharp group (sols ~750-2301) has compositions indicating pervasive alteration. Diagenetic features are common and show fluid interaction with the sediment after (and possibly during) lithification, which is consistent with burial and diagenesis. A lithified sandstone unit, the Stimson formation, overlies part of the Murray formation. This has a composition similar to the basaltic sand and soil, suggesting a shared source. Cross-cutting, fracture-associated haloes are evidence of late-stage fluid alteration after lithification of the sediment. The APXS dataset, evaluated in concert with the full science payload of , indicates that Gale crater was habitable, and that liquid water was stable for extended periods.