use groovy-mode for .gradle files