A gauge-theoretic approach to gravity