Add gradle build files

I've added gradle build files and updated the gitignore file as recommended by Jetbrains for gradle and IDE usage.