gradle cannot download dependency when is redirected from http to https