Analysis of elastic layers with dilative eigenstrains varying through the thickness