How to configure selenium tests with gradle?

i want to run selenium tests with gradle on jboss, and i was able to make the required configuration and i want to share it with the community.