Gradle: Synchronize the code in the different build-scripts across the projects

No actual change in behavior expected
Mostly moved parts to make it easier to compare the build files with each other

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1888791 13f79535-47bb-0310-9956-ffa450edef68
5 files changed