The Soy Gradle plugin lets you compile Closure Templates into JavaScript functions. It also lets you use a custom localization mechanism in the generated .soy.js files by replacing "goog.getMsg" definitions with a different function call (e.g., "Liferay.Language.get").