Search in the Documentation:

Macro implementation languages

For the macros you can use any Java Scripting API compliant language deployed on your platform (by default Groovy, Velocity and Freemarker).