Unsolved Qt Android - creating a qt lib that uses jni call
-
I am trying to figure out how to create a stand alone qt library that makes jni calls. I want the library to be stand alone, in a self-contained source tree. I am not sure where to place the java files for the linking to work out properly.
I have tried different solutions although most often end up in a runtime error where the java package is not found.
So far I have found out that if I declare ANDROID_PACKAGE_SOURCE_DIR = $$PRO_FILE_PWD/android-sources in my main.pro, and put all my .java files under $$PRO_FILE_PWD/android-sources/src I am all good. When I write all .java files I refer to the ones used both in the main application as well as the ones from the library.Now, since I want my lib to be stand alone, is there a way to keep my .java files in the library structure and include that as a "subdir" directory to my main application?
Is there a way to make gradle look in multiple directories for source code? or is there some other clever solution to this?