Make gradle DRY

Moved the whole eclipse project modifications and some generic stuff up into the parent build.gradle. Also upgraded the gradle wrapper to the most recent v1.12.

Please check if the generated eclipse projects work ok!