Fixed build.gradle for recent gradle versions.

Preveously it was possible to use `ext.prop` syntax, but
it was (AFAIR) deprecated and now we should use `project.ext.prop`.

Also added .gitignore for gradle and intellij.