gradle: improve the index template to be more flexible

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
gradle: remove usage of a deprecated property from the templates

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