Improved how gradle is called, enabled the possibility of automatic distribution download.