use project.afterEvaluate {} to defer configuration

http://stackoverflow.com/a/25388282
Merge pull request #17 from jberkel/master

use project.afterEvaluate {} to defer configuration