Build with gradle and add IDEA files to ignore

As per request gradle build in a separate PR.

In the previous patch request I actually manually removed the gradlew as I have this pet peeve about generated artifacts in the repo.