Adds gradle build files to java library, and updates all .gitignore files so they dont conflict.