Restores memory settings in gradle scripts