Error while executing custom testng.xml

So I have been racking my brains for hours now to get this working but no luck so far.

What I am trying to do: To kick of my testng xml suite using gradle build file.

Approach 1:
I added following details in the task test, as specified in gradle dosumentation:

test {
useTestNG {
suites ‘src/test/resources/masterSuite.xml’
}
}

and kicked off gradle build file as Gradle test, I get following error: http://pastebin.com/4LQFuGmY

Approach 2: I googled and came across this this post on stacktrace where ther user had created a custom test task: http://pastebin.com/m7EqX0vi

I tried using it and gradle complained about not being able to recognize org.testng.TestNg. Stacktrace: http://pastebin.com/Djegz0Mw

MyGradle build file: http://pastebin.com/tRDDBxse

Gradle version: 2.12
Java Version: 8
IDE: Eclipse

What am I doing wrong? Please help.