gradle: fix declaring that the headless build is running

The properties must be set on the project before preparing it.
Also, mimic what the bnd ant tasks do.

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Use a different release repository for the headless build

Even though the build server is (currently) using the same JDK on
Fedora 20.

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>