Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-108031

Modify androiddeployqt to allow multiple a ANDROID_PACKAGE_SOURCE_DIR from single project

    XMLWordPrintable

Details

    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

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              qtandroidteam Qt Android Team
              apietrza Adam Pietrzak
              Miao Luo Miao Luo
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes