Preferred way to add a jar dependency built from source

I’m working on a new app, which has a few dependencies. Some of them can be pulled from Maven Central—easy enough. One dependency, however, needs to be built from source (it resides in a separate git repository).

I’ve managed to automate the build process by including the repo for the dependency as a submodule in my app’s repo, and supplying build.gradle files for each so that building the app will build and include that particular dependency.

Will F-Droid be able to build this app? If not, what’s the preferred way to supply a dependency that’s only available in a git repo in source form?

Building a JAR from a git submodule is fine, and indeed used to be the standard way of including libraries in Android apps. You could also publish your JAR on Maven Central.