A thermodynamic framework is presented for the plasticity modelling of geotechnical materials. The framework is capable of modelling rigorously both friction and non-associated flow, and the strong connection between these phenomena is demonstrated. The formulation concentrates on the development of constitutive models from hypotheses about the form of an energy potential and a dissipation function. The reformulation of previous work, in which the Helmholtz free energy was used, to a new approach starting from the Gibbs free energy is found to be valuable. The relationship between the new functions and classical plasticity concepts (yield surface, plastic potential, isotropic and kinematic hardening, friction, dilation) is demonstrated. Comments are made on elastic-plastic coupling. Implications of the new approach for critical state soil models are discussed.