My solution was to create a gradle module for loading, unpacking and placing swagger files in my project.
I created an example on github :
All you have to do is add a URL for your swagger and possibly change the path. I just posted it as an example and did not test whether it will work in different applications, so I'm not 100% sure to drag it.
source share