Fix Gradle configuration
Fix Gradle configuration

This change was made to master, this commit brings it over to
index-lifecycle.

See #32409

uschindler/elasticsearch,nknize/elasticsearch,robin13/elasticsearch,coding0011/elasticsearch,gingerwizard/elasticsearch,HonzaKral/elasticsearch,gingerwizard/elasticsearch,gingerwizard/elasticsearch,nknize/elasticsearch,uschindler/elasticsearch,HonzaKral/elasticsearch,scorpionvicky/elasticsearch,nknize/elasticsearch,gingerwizard/elasticsearch,coding0011/elasticsearch,coding0011/elasticsearch,robin13/elasticsearch,nknize/elasticsearch,GlenRSmith/elasticsearch,GlenRSmith/elasticsearch,coding0011/elasticsearch,robin13/elasticsearch,scorpionvicky/elasticsearch,GlenRSmith/elasticsearch,scorpionvicky/elasticsearch,gingerwizard/elasticsearch,GlenRSmith/elasticsearch,scorpionvicky/elasticsearch,HonzaKral/elasticsearch,coding0011/elasticsearch,nknize/elasticsearch,gingerwizard/elasticsearch,robin13/elasticsearch,HonzaKral/elasticsearch,GlenRSmith/elasticsearch,uschindler/elasticsearch,uschindler/elasticsearch,uschindler/elasticsearch,gingerwizard/elasticsearch,scorpionvicky/elasticsearch,robin13/elasticsearch