We generalise the Kreck-Stolz invariants s_2 and s_3 by defining a new invariant, the t-invariant, for quaternionic line bundles E over closed spin-manifolds M of dimension 4k-1 with H^3(M; Q) = 0 such that c_2(E)in H^4(M) is torsion. The t-invariant classifies closed smooth oriented 2-connected rational homology 7-spheres up to almost-diffeomorphism, that is, diffeomorphism up to connected sum with an exotic sphere. It also detects exotic homeomorphisms between such manifolds. The t-invariant also gives information about quaternionic line bundles over a fixed manifold and we use it to give a new proof of a theorem of Feder and Gitler about the values of the second Chern classes of quaternionic line bundles over HP^k. The t-invariant for S^{4k-1} is closely related to the Adams e-invariant on the (4k-5)-stem.