TERM must be set in the environment for gradle.