Jar for Groovy Script


I have a groovy module which contains a script and depends on libraries in the lib folder. I would like to create a exceutable jar for the project.
When i try to create a module artifact for the project, it needs a MainClass. I am not sure what is the main class for a groovy script.
Also i would like to include the libraries in my lib folder so that the script works fine.
Any pointers would be very helpful. I am new to IntelliJ so pardon my lack of knowledge.

Thank you,