Build Ionic offline

I wanted to run my ionic app on android because I used native plugins. But I get a gradle download error. Since my internet connection is not that fast, I checked the gradle version my app uses in platforms/android/gradle/ And Here is what I found:


So I downloaded I created a dists folder under wrapper, put it there and changed the distributionUrl to point to ./wrapper/dists/ But still when I run my app, it changes the distributionUrl and starts to download gradle again.

By the way, I am using ionic version 5.0.2.

So, please tell me a way to use an offline gradle to build android apps.