Details
-
Suggestion
-
Resolution: Unresolved
-
P5: Not important
-
None
-
None
Description
The POC implementation of android_server_qtro generates not only c++ code but also JAVA files.
If the project already defines ANDROID_PACKAGE_SOURCE_DIR, the generated *.pri has no option to provide additional java files. The workaround is to modify build.gradle file e.g.
java.srcDirs = [qt5AndroidDir + '/src', '../R2CShvac_service/android/src', 'src', 'java']
where ../R2CShvac_service/android/src is relative path to build directory where java files were generated by android_server_qtro
Replacing QString with QStringList as the type for androidSourceDirectory (https://code.qt.io/cgit/qt/qtbase.git/tree/src/tools/androiddeployqt/main.cpp#n166)
and iterating over that list in places of usage instead of referring to single directory. Together with modifying android_deployment_settings.prf (https://code.qt.io/cgit/qt/qtbase.git/tree/mkspecs/features/android/android_deployment_settings.prf#n46)
FILE_CONTENT += " \"android-package-source-directory\": $$emitString($$join($$ANDROID_PACKAGE_SOURCE_DIR, ",")),"
Would allow to use syntax like:
ANDROID_PACKAGE_SOURCE_DIR += ...
Acceptance Criteria
- Modified code is pushed to qt/tqtc-android-automotive-qtbase repository
- android_server_qtro generator templates are updated to follow new syntax and pushed to qt/tqtc-android-automotive-qtivi
- Relevant documentation is updated