diff options
-rw-r--r-- | sources/pyside-tools/deploy_lib/android/android_config.py | 14 | ||||
-rw-r--r-- | sources/pyside-tools/deploy_lib/config.py | 5 |
2 files changed, 17 insertions, 2 deletions
diff --git a/sources/pyside-tools/deploy_lib/android/android_config.py b/sources/pyside-tools/deploy_lib/android/android_config.py index a6b2cf052..8ff16537b 100644 --- a/sources/pyside-tools/deploy_lib/android/android_config.py +++ b/sources/pyside-tools/deploy_lib/android/android_config.py @@ -91,6 +91,7 @@ class AndroidConfig(Config): self.modules = self.get_value("buildozer", "modules").split(",") else: self._find_and_set_pysidemodules() + self._find_and_set_qtquick_modules() self._arch = None if self.get_value("buildozer", "arch"): @@ -240,3 +241,16 @@ class AndroidConfig(Config): if not self.arch: raise RuntimeError("[DEPLOY] PySide wheel corrupted. Wheel name should end with" "platform name") + + def _find_and_set_qtquick_modules(self): + """Identify if QtQuick is used in QML files and add them as dependency + """ + extra_modules = [] + + if "QtQuick" in self.qml_modules: + extra_modules.append("Quick") + + if "QtQuick.Controls" in self.qml_modules: + extra_modules.append("QuickControls2") + + self.modules += extra_modules diff --git a/sources/pyside-tools/deploy_lib/config.py b/sources/pyside-tools/deploy_lib/config.py index 94a287eaf..57eec3d1f 100644 --- a/sources/pyside-tools/deploy_lib/config.py +++ b/sources/pyside-tools/deploy_lib/config.py @@ -65,6 +65,7 @@ class Config(BaseConfig): super().__init__(config_file=config_file, existing_config_file=existing_config_file) self._dry_run = dry_run + self.qml_modules = set() # set source_file self.source_file = Path( self.set_or_fetch(config_property_val=source_file, config_property_key="input_file") @@ -295,9 +296,9 @@ class Config(BaseConfig): def _find_and_set_excluded_qml_plugins(self): if self.qml_files: - included_qml_modules = set(run_qmlimportscanner(qml_files=self.qml_files, + self.qml_modules = set(run_qmlimportscanner(qml_files=self.qml_files, dry_run=self.dry_run)) - self.excluded_qml_plugins = EXCLUDED_QML_PLUGINS.difference(included_qml_modules) + self.excluded_qml_plugins = EXCLUDED_QML_PLUGINS.difference(self.qml_modules) # needed for dry_run testing self.excluded_qml_plugins = sorted(self.excluded_qml_plugins) |