Is there a proper way to add external dependencies to an android project using gradle in UE4?

For example, I want to add implementation (‘’) as an external dependency. In android studio you can do this in the options for the project.

The only way I found to do this in UE4 is to add the dependencies in the source format build.gradle file that is in the engine directory. This would obviously apply to all projects and isn’t really desired.

I couldn’t find anywhere to add these in the configuration but hopefully there is a way? Thanks very much.

The only relevant thing I have seen so far seems to be here:…r-library.html

Chris Babcock says to do this:
dependencies {

But is that in the xml you are including in the build.cs file? Can you also add repositories for external dependencies. If they are local where do you put them? Can you define a location to add .arr you want to include in an xml of java for use with the JNI?