nativescript 8.8.0 → 8.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (327) hide show
  1. package/config/test-deps-versions-generated.json +1 -1
  2. package/lib/android-tools-info.js +12 -0
  3. package/lib/base-package-manager.js +11 -1
  4. package/lib/bootstrap.js +5 -1
  5. package/lib/bun-package-manager.js +17 -1
  6. package/lib/color.js +3 -0
  7. package/lib/commands/add-platform.js +1 -0
  8. package/lib/commands/apple-login.js +1 -0
  9. package/lib/commands/appstore-list.js +1 -0
  10. package/lib/commands/appstore-upload.js +4 -0
  11. package/lib/commands/build.js +3 -2
  12. package/lib/commands/clean.js +22 -1
  13. package/lib/commands/command-base.js +1 -0
  14. package/lib/commands/config.js +3 -0
  15. package/lib/commands/create-project.js +6 -0
  16. package/lib/commands/debug.js +6 -1
  17. package/lib/commands/deploy.js +3 -2
  18. package/lib/commands/embedding/embed.js +7 -0
  19. package/lib/commands/extensibility/install-extension.js +1 -0
  20. package/lib/commands/extensibility/list-extensions.js +1 -0
  21. package/lib/commands/extensibility/uninstall-extension.js +1 -0
  22. package/lib/commands/fonts.js +1 -0
  23. package/lib/commands/generate-assets.js +1 -0
  24. package/lib/commands/generate-help.js +1 -0
  25. package/lib/commands/generate.js +12 -2
  26. package/lib/commands/info.js +1 -0
  27. package/lib/commands/install.js +1 -0
  28. package/lib/commands/list-platforms.js +1 -0
  29. package/lib/commands/migrate.js +1 -0
  30. package/lib/commands/native-add.js +5 -0
  31. package/lib/commands/platform-clean.js +1 -0
  32. package/lib/commands/plugin/add-plugin.js +1 -0
  33. package/lib/commands/plugin/build-plugin.js +1 -0
  34. package/lib/commands/plugin/create-plugin.js +5 -0
  35. package/lib/commands/plugin/list-plugins.js +1 -0
  36. package/lib/commands/plugin/remove-plugin.js +2 -0
  37. package/lib/commands/plugin/update-plugin.js +1 -0
  38. package/lib/commands/post-install.js +6 -0
  39. package/lib/commands/prepare.js +4 -3
  40. package/lib/commands/preview.js +2 -0
  41. package/lib/commands/remove-platform.js +1 -0
  42. package/lib/commands/resources/resources-update.js +2 -0
  43. package/lib/commands/run.js +1 -0
  44. package/lib/commands/setup.js +1 -0
  45. package/lib/commands/start.js +1 -0
  46. package/lib/commands/test-init.js +4 -0
  47. package/lib/commands/test.js +9 -2
  48. package/lib/commands/typings.js +2 -1
  49. package/lib/commands/update-platform.js +5 -0
  50. package/lib/commands/update.js +2 -0
  51. package/lib/common/bootstrap.js +1 -0
  52. package/lib/common/child-process.js +3 -0
  53. package/lib/common/codeGeneration/code-entity.js +1 -0
  54. package/lib/common/codeGeneration/code-printer.js +1 -0
  55. package/lib/common/command-params.js +1 -0
  56. package/lib/common/commands/analytics.js +3 -0
  57. package/lib/common/commands/autocompletion.js +3 -0
  58. package/lib/common/commands/device/device-log-stream.js +1 -0
  59. package/lib/common/commands/device/get-file.js +2 -0
  60. package/lib/common/commands/device/list-applications.js +1 -0
  61. package/lib/common/commands/device/list-devices.js +3 -0
  62. package/lib/common/commands/device/list-files.js +2 -0
  63. package/lib/common/commands/device/put-file.js +2 -0
  64. package/lib/common/commands/device/run-application.js +1 -0
  65. package/lib/common/commands/device/stop-application.js +1 -0
  66. package/lib/common/commands/device/uninstall-application.js +1 -0
  67. package/lib/common/commands/doctor.js +3 -2
  68. package/lib/common/commands/generate-messages.js +1 -0
  69. package/lib/common/commands/help.js +1 -0
  70. package/lib/common/commands/package-manager-get.js +1 -0
  71. package/lib/common/commands/package-manager-set.js +1 -0
  72. package/lib/common/commands/post-install.js +1 -0
  73. package/lib/common/commands/preuninstall.js +11 -2
  74. package/lib/common/commands/proxy/proxy-base.js +4 -0
  75. package/lib/common/commands/proxy/proxy-clear.js +1 -0
  76. package/lib/common/commands/proxy/proxy-get.js +1 -0
  77. package/lib/common/commands/proxy/proxy-set.js +1 -0
  78. package/lib/common/common-lib.js +1 -0
  79. package/lib/common/constants.js +11 -0
  80. package/lib/common/decorators.js +48 -0
  81. package/lib/common/dispatchers.js +10 -1
  82. package/lib/common/errors.js +13 -3
  83. package/lib/common/file-system.js +13 -2
  84. package/lib/common/header.js +3 -0
  85. package/lib/common/helpers.js +89 -3
  86. package/lib/common/host-info.js +4 -0
  87. package/lib/common/http-client.js +20 -0
  88. package/lib/common/logger/appenders/cli-appender.js +4 -0
  89. package/lib/common/logger/appenders/emit-appender.js +4 -0
  90. package/lib/common/logger/layouts/cli-layout.js +1 -0
  91. package/lib/common/logger/logger.js +5 -0
  92. package/lib/common/messages/messages.js +6 -0
  93. package/lib/common/mobile/android/android-application-manager.js +20 -1
  94. package/lib/common/mobile/android/android-debug-bridge-result-handler.js +1 -0
  95. package/lib/common/mobile/android/android-debug-bridge.js +6 -0
  96. package/lib/common/mobile/android/android-device-file-system.js +4 -0
  97. package/lib/common/mobile/android/android-device-hash-service.js +3 -0
  98. package/lib/common/mobile/android/android-device.js +8 -0
  99. package/lib/common/mobile/android/android-emulator-services.js +2 -1
  100. package/lib/common/mobile/android/android-ini-file-parser.js +9 -0
  101. package/lib/common/mobile/android/android-log-filter.js +4 -0
  102. package/lib/common/mobile/android/android-virtual-device-service.js +30 -1
  103. package/lib/common/mobile/android/device-android-debug-bridge.js +1 -0
  104. package/lib/common/mobile/android/genymotion/genymotion-service.js +5 -0
  105. package/lib/common/mobile/android/genymotion/virtualbox-service.js +11 -0
  106. package/lib/common/mobile/android/logcat-helper.js +13 -0
  107. package/lib/common/mobile/application-manager-base.js +6 -0
  108. package/lib/common/mobile/device-emitter.js +4 -0
  109. package/lib/common/mobile/device-log-emitter.js +1 -0
  110. package/lib/common/mobile/device-log-provider-base.js +1 -0
  111. package/lib/common/mobile/device-log-provider.js +23 -0
  112. package/lib/common/mobile/device-platforms-constants.js +1 -0
  113. package/lib/common/mobile/emulator-helper.js +4 -0
  114. package/lib/common/mobile/ios/device/ios-application-manager.js +3 -0
  115. package/lib/common/mobile/ios/device/ios-device-file-system.js +1 -0
  116. package/lib/common/mobile/ios/device/ios-device-operations.js +4 -0
  117. package/lib/common/mobile/ios/device/ios-device.js +4 -0
  118. package/lib/common/mobile/ios/ios-device-base.js +1 -0
  119. package/lib/common/mobile/ios/ios-device-product-name-mapper.js +2 -0
  120. package/lib/common/mobile/ios/ios-log-filter.js +1 -0
  121. package/lib/common/mobile/ios/simulator/ios-emulator-services.js +4 -0
  122. package/lib/common/mobile/ios/simulator/ios-sim-resolver.js +1 -0
  123. package/lib/common/mobile/ios/simulator/ios-simulator-application-manager.js +6 -0
  124. package/lib/common/mobile/ios/simulator/ios-simulator-device.js +5 -0
  125. package/lib/common/mobile/ios/simulator/ios-simulator-file-system.js +1 -0
  126. package/lib/common/mobile/ios/simulator/ios-simulator-log-provider.js +1 -0
  127. package/lib/common/mobile/local-to-device-path-data-factory.js +1 -0
  128. package/lib/common/mobile/log-filter.js +2 -0
  129. package/lib/common/mobile/logging-levels.js +1 -0
  130. package/lib/common/mobile/mobile-core/android-device-discovery.js +2 -0
  131. package/lib/common/mobile/mobile-core/android-emulator-discovery.js +3 -0
  132. package/lib/common/mobile/mobile-core/android-process-service.js +32 -0
  133. package/lib/common/mobile/mobile-core/device-discovery.js +1 -0
  134. package/lib/common/mobile/mobile-core/devices-service.js +69 -0
  135. package/lib/common/mobile/mobile-core/ios-device-discovery.js +2 -0
  136. package/lib/common/mobile/mobile-core/ios-simulator-discovery.js +3 -0
  137. package/lib/common/mobile/mobile-helper.js +1 -0
  138. package/lib/common/mobile/wp8/wp8-emulator-services.js +1 -0
  139. package/lib/common/opener.js +1 -0
  140. package/lib/common/os-info.js +1 -0
  141. package/lib/common/plist-parser.js +1 -0
  142. package/lib/common/project-helper.js +1 -0
  143. package/lib/common/prompter.js +9 -1
  144. package/lib/common/queue.js +1 -0
  145. package/lib/common/resource-loader.js +1 -0
  146. package/lib/common/services/auto-completion-service.js +13 -1
  147. package/lib/common/services/cancellation.js +2 -1
  148. package/lib/common/services/commands-service.js +17 -6
  149. package/lib/common/services/help-service.js +11 -3
  150. package/lib/common/services/hooks-service.js +13 -0
  151. package/lib/common/services/ios-notification-service.js +1 -0
  152. package/lib/common/services/json-file-settings-service.js +6 -0
  153. package/lib/common/services/lock-service.js +6 -0
  154. package/lib/common/services/message-contract-generator.js +1 -0
  155. package/lib/common/services/messages-service.js +1 -0
  156. package/lib/common/services/micro-templating-service.js +6 -0
  157. package/lib/common/services/net-service.js +3 -0
  158. package/lib/common/services/project-files-manager.js +5 -0
  159. package/lib/common/services/project-files-provider-base.js +1 -0
  160. package/lib/common/services/proxy-service.js +1 -0
  161. package/lib/common/services/qr.js +1 -0
  162. package/lib/common/services/settings-service.js +1 -0
  163. package/lib/common/services/xcode-select-service.js +1 -0
  164. package/lib/common/utils.js +1 -0
  165. package/lib/common/validators/project-name-validator.js +1 -0
  166. package/lib/common/validators/validation-result.js +1 -0
  167. package/lib/common/verify-node-version.js +8 -1
  168. package/lib/common/yok.js +32 -11
  169. package/lib/config.js +22 -1
  170. package/lib/constants-provider.js +1 -0
  171. package/lib/constants.js +53 -0
  172. package/lib/controllers/build-controller.js +4 -3
  173. package/lib/controllers/debug-controller.js +8 -3
  174. package/lib/controllers/deploy-controller.js +1 -0
  175. package/lib/controllers/migrate-controller.js +91 -3
  176. package/lib/controllers/platform-controller.js +9 -1
  177. package/lib/controllers/prepare-controller.js +17 -4
  178. package/lib/controllers/run-controller.js +17 -1
  179. package/lib/controllers/update-controller-base.js +1 -0
  180. package/lib/controllers/update-controller.js +11 -0
  181. package/lib/data/build-data.js +1 -0
  182. package/lib/data/controller-data-base.js +1 -0
  183. package/lib/data/debug-data.js +1 -0
  184. package/lib/data/platform-data.js +1 -0
  185. package/lib/data/prepare-data.js +1 -0
  186. package/lib/data/run-data.js +1 -0
  187. package/lib/detached-processes/cleanup-js-subprocess.js +8 -2
  188. package/lib/detached-processes/cleanup-process.js +18 -14
  189. package/lib/detached-processes/file-log-service.js +2 -1
  190. package/lib/device-path-provider.js +1 -0
  191. package/lib/device-sockets/ios/app-debug-socket-proxy-factory.js +7 -0
  192. package/lib/device-sockets/ios/notification.js +3 -0
  193. package/lib/device-sockets/ios/socket-request-executor.js +3 -0
  194. package/lib/helpers/android-bundle-validator-helper.js +2 -1
  195. package/lib/helpers/deploy-command-helper.js +1 -0
  196. package/lib/helpers/key-command-helper.js +4 -2
  197. package/lib/helpers/livesync-command-helper.js +4 -1
  198. package/lib/helpers/network-connectivity-validator.js +1 -0
  199. package/lib/helpers/options-track-helper.js +3 -2
  200. package/lib/helpers/package-path-helper.js +1 -0
  201. package/lib/helpers/platform-command-helper.js +7 -2
  202. package/lib/helpers/version-validator-helper.js +1 -0
  203. package/lib/key-commands/bootstrap.js +3 -2
  204. package/lib/key-commands/index.js +5 -4
  205. package/lib/nativescript-cli-lib-bootstrap.js +4 -0
  206. package/lib/nativescript-cli-lib.js +1 -0
  207. package/lib/nativescript-cli.js +10 -1
  208. package/lib/node/pbxproj-dom-xcode.js +1 -0
  209. package/lib/node/xcode.js +1 -0
  210. package/lib/node-package-manager.js +11 -1
  211. package/lib/options.js +143 -118
  212. package/lib/package-installation-manager.js +8 -1
  213. package/lib/package-manager.js +2 -0
  214. package/lib/platform-command-param.js +1 -0
  215. package/lib/pnpm-package-manager.js +4 -1
  216. package/lib/project-data.js +12 -0
  217. package/lib/providers/project-files-provider.js +1 -0
  218. package/lib/resolvers/livesync-service-resolver.js +1 -0
  219. package/lib/services/analytics/analytics-broker-process.js +10 -6
  220. package/lib/services/analytics/analytics-broker.js +2 -1
  221. package/lib/services/analytics/analytics-service.js +29 -25
  222. package/lib/services/analytics/google-analytics-provider.js +13 -12
  223. package/lib/services/analytics-settings-service.js +5 -0
  224. package/lib/services/android/android-bundle-tool-service.js +1 -0
  225. package/lib/services/android/gradle-build-args-service.js +3 -0
  226. package/lib/services/android/gradle-build-service.js +1 -0
  227. package/lib/services/android/gradle-command-service.js +6 -1
  228. package/lib/services/android-device-debug-service.js +6 -0
  229. package/lib/services/android-plugin-build-service.js +33 -1
  230. package/lib/services/android-project-service.js +71 -4
  231. package/lib/services/android-resources-migration-service.js +7 -0
  232. package/lib/services/apple-portal/apple-portal-application-service.js +1 -0
  233. package/lib/services/apple-portal/apple-portal-cookie-service.js +1 -0
  234. package/lib/services/apple-portal/apple-portal-session-service.js +6 -4
  235. package/lib/services/assets-generation/assets-generation-service.js +16 -5
  236. package/lib/services/build-artifacts-service.js +2 -1
  237. package/lib/services/build-data-service.js +1 -0
  238. package/lib/services/build-info-file-service.js +1 -0
  239. package/lib/services/cleanup-service.js +13 -9
  240. package/lib/services/cocoapods-platform-manager.js +9 -0
  241. package/lib/services/cocoapods-service.js +21 -1
  242. package/lib/services/debug-data-service.js +1 -0
  243. package/lib/services/debug-service-base.js +7 -0
  244. package/lib/services/device/device-install-app-service.js +2 -1
  245. package/lib/services/doctor-service.js +21 -6
  246. package/lib/services/extensibility-service.js +8 -0
  247. package/lib/services/files-hash-service.js +1 -0
  248. package/lib/services/hmr-status-service.js +2 -0
  249. package/lib/services/info-service.js +1 -0
  250. package/lib/services/initialize-service.js +5 -1
  251. package/lib/services/ios/export-options-plist-service.js +4 -0
  252. package/lib/services/ios/ios-signing-service.js +4 -0
  253. package/lib/services/ios/spm-service.js +9 -0
  254. package/lib/services/ios/xcodebuild-args-service.js +9 -0
  255. package/lib/services/ios/xcodebuild-command-service.js +1 -0
  256. package/lib/services/ios/xcodebuild-service.js +1 -0
  257. package/lib/services/ios-debugger-port-service.js +1 -0
  258. package/lib/services/ios-device-debug-service.js +1 -0
  259. package/lib/services/ios-entitlements-service.js +1 -0
  260. package/lib/services/ios-extensions-service.js +1 -0
  261. package/lib/services/ios-log-filter.js +20 -0
  262. package/lib/services/ios-native-target-service.js +6 -4
  263. package/lib/services/ios-project-service.js +94 -2
  264. package/lib/services/ios-provision-service.js +3 -0
  265. package/lib/services/ios-watch-app-service.js +1 -0
  266. package/lib/services/ip-service.js +2 -0
  267. package/lib/services/itmstransporter-service.js +1 -0
  268. package/lib/services/karma-execution.js +2 -0
  269. package/lib/services/livesync/android-device-livesync-service-base.js +1 -0
  270. package/lib/services/livesync/android-device-livesync-service.js +2 -0
  271. package/lib/services/livesync/android-device-livesync-sockets-service.js +3 -0
  272. package/lib/services/livesync/android-livesync-service.js +1 -0
  273. package/lib/services/livesync/android-livesync-tool.js +4 -0
  274. package/lib/services/livesync/device-livesync-service-base.js +2 -0
  275. package/lib/services/livesync/ios-device-livesync-service.js +7 -0
  276. package/lib/services/livesync/ios-livesync-service.js +2 -0
  277. package/lib/services/livesync/livesync-socket.js +1 -0
  278. package/lib/services/livesync/platform-livesync-service-base.js +5 -0
  279. package/lib/services/livesync-process-data-service.js +1 -0
  280. package/lib/services/log-parser-service.js +1 -0
  281. package/lib/services/log-source-map-service.js +15 -0
  282. package/lib/services/marking-mode-service.js +8 -5
  283. package/lib/services/metadata-filtering-service.js +1 -0
  284. package/lib/services/npm-config-service.js +4 -0
  285. package/lib/services/pacote-service.js +7 -0
  286. package/lib/services/performance-service.js +3 -1
  287. package/lib/services/platform/add-platform-service.js +49 -2
  288. package/lib/services/platform/platform-validation-service.js +1 -0
  289. package/lib/services/platform/prepare-native-platform-service.js +5 -2
  290. package/lib/services/platform-environment-requirements.js +8 -3
  291. package/lib/services/platform-project-service-base.js +1 -0
  292. package/lib/services/platforms-data-service.js +1 -0
  293. package/lib/services/plugins-service.js +20 -2
  294. package/lib/services/prepare-data-service.js +1 -0
  295. package/lib/services/project-backup-service.js +4 -0
  296. package/lib/services/project-changes-service.js +14 -3
  297. package/lib/services/project-cleanup-service.js +2 -0
  298. package/lib/services/project-config-service.js +22 -2
  299. package/lib/services/project-data-service.js +36 -7
  300. package/lib/services/project-name-service.js +1 -0
  301. package/lib/services/project-service.js +10 -0
  302. package/lib/services/project-templates-service.js +3 -2
  303. package/lib/services/qr-code-terminal-service.js +1 -0
  304. package/lib/services/require-service.js +1 -0
  305. package/lib/services/start-service.js +1 -0
  306. package/lib/services/temp-service.js +1 -0
  307. package/lib/services/terminal-spinner-service.js +2 -0
  308. package/lib/services/test-execution-service.js +9 -2
  309. package/lib/services/test-initialization-service.js +4 -0
  310. package/lib/services/timeline-profiler-service.js +1 -0
  311. package/lib/services/user-settings-service.js +1 -0
  312. package/lib/services/versions-service.js +6 -4
  313. package/lib/services/watch-ignore-list-service.js +1 -0
  314. package/lib/services/webpack/webpack-compiler-service.js +42 -1
  315. package/lib/services/xcconfig-service.js +2 -0
  316. package/lib/services/xcproj-service.js +1 -0
  317. package/lib/shared-event-bus.js +6 -0
  318. package/lib/sys-info.js +2 -1
  319. package/lib/tools/config-manipulation/config-transformer.js +12 -0
  320. package/lib/tools/node-modules/node-modules-builder.js +1 -0
  321. package/lib/tools/node-modules/node-modules-dependencies-builder.js +6 -0
  322. package/lib/yarn-package-manager.js +1 -0
  323. package/lib/yarn2-package-manager.js +3 -0
  324. package/node_modules/@npmcli/move-file/node_modules/mkdirp/CHANGELOG.md +15 -0
  325. package/node_modules/rimraf/CHANGELOG.md +65 -0
  326. package/node_modules/stringify-package/CHANGELOG.md +16 -0
  327. package/package.json +2 -2
@@ -41,7 +41,7 @@ class AnalyticsBroker {
41
41
  catch (err) {
42
42
  this.analyticsLoggingService.logData({
43
43
  message: `AnalyticsBroker unable to execute action in sendDataForTracking: ${err}`,
44
- type: "Error",
44
+ type: "Error" /* FileLogMessageType.Error */,
45
45
  });
46
46
  }
47
47
  });
@@ -51,3 +51,4 @@ __decorate([
51
51
  (0, decorators_1.cache)()
52
52
  ], AnalyticsBroker.prototype, "getGoogleAnalyticsProvider", null);
53
53
  exports.AnalyticsBroker = AnalyticsBroker;
54
+ //# sourceMappingURL=analytics-broker.js.map
@@ -44,7 +44,7 @@ class AnalyticsService {
44
44
  return __awaiter(this, void 0, void 0, function* () {
45
45
  if (yield this.$analyticsSettingsService.canDoRequest()) {
46
46
  const initialTrackFeatureUsageStatus = yield this.getStatus(this.$staticConfig.TRACK_FEATURE_USAGE_SETTING_NAME);
47
- let trackFeatureUsage = initialTrackFeatureUsageStatus === "enabled";
47
+ let trackFeatureUsage = initialTrackFeatureUsageStatus === "enabled" /* AnalyticsStatus.enabled */;
48
48
  if ((yield this.isNotConfirmed(this.$staticConfig.TRACK_FEATURE_USAGE_SETTING_NAME)) &&
49
49
  (0, helpers_1.isInteractive)()) {
50
50
  const message = `Do you want to help us improve ${this.$analyticsSettingsService.getClientName()} by automatically sending anonymous usage statistics? We will not use this information to identify or contact you.`;
@@ -65,15 +65,15 @@ class AnalyticsService {
65
65
  setStatus(settingName, enabled) {
66
66
  return __awaiter(this, void 0, void 0, function* () {
67
67
  this.analyticsStatuses[settingName] = enabled
68
- ? "enabled"
69
- : "disabled";
68
+ ? "enabled" /* AnalyticsStatus.enabled */
69
+ : "disabled" /* AnalyticsStatus.disabled */;
70
70
  yield this.$userSettingsService.saveSetting(settingName, enabled.toString());
71
71
  });
72
72
  }
73
73
  isEnabled(settingName) {
74
74
  return __awaiter(this, void 0, void 0, function* () {
75
75
  const analyticsStatus = yield this.getStatus(settingName);
76
- return analyticsStatus === "enabled";
76
+ return analyticsStatus === "enabled" /* AnalyticsStatus.enabled */;
77
77
  });
78
78
  }
79
79
  getStatusMessage(settingName, jsonFormat, readableSettingName) {
@@ -86,8 +86,8 @@ class AnalyticsService {
86
86
  return __awaiter(this, void 0, void 0, function* () {
87
87
  const acceptTracking = !!(settings && settings.acceptTrackFeatureUsage);
88
88
  const googleAnalyticsEventData = {
89
- googleAnalyticsDataType: "event",
90
- action: "Accept Tracking",
89
+ googleAnalyticsDataType: "event" /* GoogleAnalyticsDataType.Event */,
90
+ action: "Accept Tracking" /* TrackActionNames.AcceptTracking */,
91
91
  label: acceptTracking.toString(),
92
92
  };
93
93
  yield this.forcefullyTrackInGoogleAnalytics(googleAnalyticsEventData);
@@ -97,7 +97,7 @@ class AnalyticsService {
97
97
  return __awaiter(this, void 0, void 0, function* () {
98
98
  yield this.initAnalyticsStatuses();
99
99
  if (!this.$staticConfig.disableAnalytics &&
100
- this.analyticsStatuses[this.$staticConfig.TRACK_FEATURE_USAGE_SETTING_NAME] === "enabled") {
100
+ this.analyticsStatuses[this.$staticConfig.TRACK_FEATURE_USAGE_SETTING_NAME] === "enabled" /* AnalyticsStatus.enabled */) {
101
101
  return this.forcefullyTrackInGoogleAnalytics(gaSettings);
102
102
  }
103
103
  });
@@ -112,6 +112,8 @@ class AnalyticsService {
112
112
  const isForDevice = device ? !device.isEmulator : data.isForDevice;
113
113
  let label = "";
114
114
  label = this.addDataToLabel(label, normalizedPlatform);
115
+ // In some cases (like in case action is Build and platform is Android), we do not know if the deviceType is emulator or device.
116
+ // Just exclude the device_type in this case.
115
117
  if (isForDevice !== null && isForDevice !== undefined) {
116
118
  const deviceType = isForDevice
117
119
  ? constants_1.DeviceTypes.Device
@@ -129,7 +131,7 @@ class AnalyticsService {
129
131
  const customDimensions = {};
130
132
  this.setProjectRelatedCustomDimensions(customDimensions, data.projectDir);
131
133
  const googleAnalyticsEventData = {
132
- googleAnalyticsDataType: "event",
134
+ googleAnalyticsDataType: "event" /* GoogleAnalyticsDataType.Event */,
133
135
  action: data.action,
134
136
  label,
135
137
  customDimensions,
@@ -144,7 +146,7 @@ class AnalyticsService {
144
146
  if (this.brokerProcess && this.brokerProcess.connected) {
145
147
  let timer;
146
148
  const handler = (data) => {
147
- if (data === "ProcessFinishedTasks") {
149
+ if (data === "ProcessFinishedTasks" /* DetachedProcessMessages.ProcessFinishedTasks */) {
148
150
  this.brokerProcess.removeListener("message", handler);
149
151
  clearTimeout(timer);
150
152
  resolve();
@@ -155,7 +157,7 @@ class AnalyticsService {
155
157
  resolve();
156
158
  }, 3000);
157
159
  this.brokerProcess.on("message", handler);
158
- const msg = { type: "FinishTracking" };
160
+ const msg = { type: "FinishTracking" /* TrackingTypes.FinishTracking */ };
159
161
  this.brokerProcess.send(msg, (err) => this.$logger.trace(`Error while sending ${JSON.stringify(msg)}`));
160
162
  }
161
163
  else {
@@ -166,13 +168,13 @@ class AnalyticsService {
166
168
  }
167
169
  forcefullyTrackInGoogleAnalytics(gaSettings) {
168
170
  gaSettings.customDimensions = gaSettings.customDimensions || {};
169
- gaSettings.customDimensions["cd5"] =
171
+ gaSettings.customDimensions["cd5" /* GoogleAnalyticsCustomDimensions.client */] =
170
172
  this.$options.analyticsClient ||
171
- ((0, helpers_1.isInteractive)() ? "CLI" : "Unknown");
173
+ ((0, helpers_1.isInteractive)() ? "CLI" /* AnalyticsClients.Cli */ : "Unknown" /* AnalyticsClients.Unknown */);
172
174
  this.setProjectRelatedCustomDimensions(gaSettings.customDimensions);
173
175
  const googleAnalyticsData = _.merge({
174
- type: "googleAnalyticsData",
175
- category: "CLI",
176
+ type: "googleAnalyticsData" /* TrackingTypes.GoogleAnalyticsData */,
177
+ category: "CLI" /* AnalyticsClients.Cli */,
176
178
  }, gaSettings);
177
179
  this.$logger.trace("Will send the following information to Google Analytics:", googleAnalyticsData);
178
180
  return this.sendMessageToBroker(googleAnalyticsData);
@@ -183,14 +185,15 @@ class AnalyticsService {
183
185
  projectDir = this.$projectHelper.projectDir;
184
186
  }
185
187
  catch (err) {
188
+ // In case there's no project dir here, the above getter will fail.
186
189
  this.$logger.trace("Unable to get the projectDir from projectHelper", err);
187
190
  }
188
191
  }
189
192
  if (projectDir) {
190
193
  const projectData = this.$projectDataService.getProjectData(projectDir);
191
- customDimensions["cd2"] =
194
+ customDimensions["cd2" /* GoogleAnalyticsCustomDimensions.projectType */] =
192
195
  projectData.projectType;
193
- customDimensions["cd9"] = projectData.isShared.toString();
196
+ customDimensions["cd9" /* GoogleAnalyticsCustomDimensions.isShared */] = projectData.isShared.toString();
194
197
  }
195
198
  return customDimensions;
196
199
  }
@@ -227,7 +230,7 @@ class AnalyticsService {
227
230
  }
228
231
  });
229
232
  broker.on("message", (data) => {
230
- if (data === "ProcessReadyToReceive") {
233
+ if (data === "ProcessReadyToReceive" /* DetachedProcessMessages.ProcessReadyToReceive */) {
231
234
  clearTimeout(timeoutId);
232
235
  if (!isSettled) {
233
236
  isSettled = true;
@@ -252,7 +255,7 @@ class AnalyticsService {
252
255
  return __awaiter(this, void 0, void 0, function* () {
253
256
  yield this.initAnalyticsStatuses();
254
257
  if (!this.$staticConfig.disableAnalytics &&
255
- this.analyticsStatuses[settingName] === "enabled") {
258
+ this.analyticsStatuses[settingName] === "enabled" /* AnalyticsStatus.enabled */) {
256
259
  return this.sendMessageToBroker(trackingInfo);
257
260
  }
258
261
  });
@@ -306,14 +309,14 @@ class AnalyticsService {
306
309
  if (settingValue) {
307
310
  const isEnabled = (0, helpers_1.toBoolean)(settingValue);
308
311
  if (isEnabled) {
309
- this.analyticsStatuses[settingName] = "enabled";
312
+ this.analyticsStatuses[settingName] = "enabled" /* AnalyticsStatus.enabled */;
310
313
  }
311
314
  else {
312
- this.analyticsStatuses[settingName] = "disabled";
315
+ this.analyticsStatuses[settingName] = "disabled" /* AnalyticsStatus.disabled */;
313
316
  }
314
317
  }
315
318
  else {
316
- this.analyticsStatuses[settingName] = "not confirmed";
319
+ this.analyticsStatuses[settingName] = "not confirmed" /* AnalyticsStatus.notConfirmed */;
317
320
  }
318
321
  }
319
322
  return this.analyticsStatuses[settingName];
@@ -322,7 +325,7 @@ class AnalyticsService {
322
325
  isNotConfirmed(settingName) {
323
326
  return __awaiter(this, void 0, void 0, function* () {
324
327
  const analyticsStatus = yield this.getStatus(settingName);
325
- return analyticsStatus === "not confirmed";
328
+ return analyticsStatus === "not confirmed" /* AnalyticsStatus.notConfirmed */;
326
329
  });
327
330
  }
328
331
  getHumanReadableStatusMessage(settingName, readableSettingName) {
@@ -340,15 +343,15 @@ class AnalyticsService {
340
343
  getJsonStatusMessage(settingName) {
341
344
  return __awaiter(this, void 0, void 0, function* () {
342
345
  const status = yield this.getStatus(settingName);
343
- const enabled = status === "not confirmed"
346
+ const enabled = status === "not confirmed" /* AnalyticsStatus.notConfirmed */
344
347
  ? null
345
- : status === "enabled";
348
+ : status === "enabled" /* AnalyticsStatus.enabled */;
346
349
  return JSON.stringify({ enabled });
347
350
  });
348
351
  }
349
352
  trackException(exception, message) {
350
353
  const data = {
351
- type: "exception",
354
+ type: "exception" /* TrackingTypes.Exception */,
352
355
  exception,
353
356
  message,
354
357
  };
@@ -364,3 +367,4 @@ __decorate([
364
367
  ], AnalyticsService.prototype, "initAnalyticsStatuses", null);
365
368
  exports.AnalyticsService = AnalyticsService;
366
369
  yok_1.injector.register("analyticsService", AnalyticsService);
370
+ //# sourceMappingURL=analytics-service.js.map
@@ -39,7 +39,7 @@ class GoogleAnalyticsProvider {
39
39
  }
40
40
  catch (e) {
41
41
  this.analyticsLoggingService.logData({
42
- type: "Error",
42
+ type: "Error" /* FileLogMessageType.Error */,
43
43
  message: `Unable to track information ${JSON.stringify(trackInfo)}. Error is: ${e}`,
44
44
  });
45
45
  this.$logger.trace("Analytics exception: ", e);
@@ -73,10 +73,10 @@ class GoogleAnalyticsProvider {
73
73
  const visitor = this.getVisitor(gaTrackingId, proxy);
74
74
  yield this.setCustomDimensions(visitor, trackInfo.customDimensions, sessionId);
75
75
  switch (trackInfo.googleAnalyticsDataType) {
76
- case "pageview":
76
+ case "pageview" /* GoogleAnalyticsDataType.Page */:
77
77
  yield this.trackPageView(visitor, trackInfo);
78
78
  break;
79
- case "event":
79
+ case "event" /* GoogleAnalyticsDataType.Event */:
80
80
  yield this.trackEvent(visitor, trackInfo);
81
81
  break;
82
82
  }
@@ -85,13 +85,13 @@ class GoogleAnalyticsProvider {
85
85
  setCustomDimensions(visitor, customDimensions, sessionId) {
86
86
  return __awaiter(this, void 0, void 0, function* () {
87
87
  const defaultValues = {
88
- ["cd1"]: this.$staticConfig.version,
89
- ["cd6"]: process.version,
90
- ["cd3"]: this.clientId,
91
- ["cd2"]: null,
92
- ["cd9"]: null,
93
- ["cd4"]: sessionId,
94
- ["cd5"]: "Unknown",
88
+ ["cd1" /* GoogleAnalyticsCustomDimensions.cliVersion */]: this.$staticConfig.version,
89
+ ["cd6" /* GoogleAnalyticsCustomDimensions.nodeVersion */]: process.version,
90
+ ["cd3" /* GoogleAnalyticsCustomDimensions.clientID */]: this.clientId,
91
+ ["cd2" /* GoogleAnalyticsCustomDimensions.projectType */]: null,
92
+ ["cd9" /* GoogleAnalyticsCustomDimensions.isShared */]: null,
93
+ ["cd4" /* GoogleAnalyticsCustomDimensions.sessionID */]: sessionId,
94
+ ["cd5" /* GoogleAnalyticsCustomDimensions.client */]: "Unknown" /* AnalyticsClients.Unknown */,
95
95
  };
96
96
  customDimensions = _.merge(defaultValues, customDimensions);
97
97
  _.each(customDimensions, (value, key) => {
@@ -109,7 +109,7 @@ class GoogleAnalyticsProvider {
109
109
  this.analyticsLoggingService.logData({
110
110
  message: `Unable to track event with category: '${trackInfo.category}', action: '${trackInfo.action}', label: '${trackInfo.label}', ` +
111
111
  `value: '${trackInfo.value}' attached page: ${this.currentPage}. Error is: ${err}.`,
112
- type: "Error",
112
+ type: "Error" /* FileLogMessageType.Error */,
113
113
  });
114
114
  reject(err);
115
115
  return;
@@ -132,7 +132,7 @@ class GoogleAnalyticsProvider {
132
132
  if (err) {
133
133
  this.analyticsLoggingService.logData({
134
134
  message: `Unable to track pageview with path '${trackInfo.path}' and title: '${trackInfo.title}' Error is: ${err}.`,
135
- type: "Error",
135
+ type: "Error" /* FileLogMessageType.Error */,
136
136
  });
137
137
  reject(err);
138
138
  return;
@@ -150,3 +150,4 @@ __decorate([
150
150
  ], GoogleAnalyticsProvider.prototype, "getVisitor", null);
151
151
  exports.GoogleAnalyticsProvider = GoogleAnalyticsProvider;
152
152
  yok_1.injector.register("googleAnalyticsProvider", GoogleAnalyticsProvider);
153
+ //# sourceMappingURL=google-analytics-provider.js.map
@@ -76,6 +76,10 @@ class AnalyticsSettingsService {
76
76
  return userAgent;
77
77
  }
78
78
  getMacOSReleaseVersion(osRelease) {
79
+ // https://en.wikipedia.org/wiki/Darwin_(operating_system)#Release_history
80
+ // Each macOS version is labeled 10.<version>, where it looks like <versions> is taken from the major version returned by os.release() (16.x.x for example) and subtracting 4 from it.
81
+ // So the version becomes "10.12" in this case.
82
+ // Could be improved by spawning `system_profiler SPSoftwareDataType` and getting the System Version line from the result.
79
83
  const majorVersion = osRelease && _.first(osRelease.split("."));
80
84
  return majorVersion && `10.${+majorVersion - 4}`;
81
85
  }
@@ -102,3 +106,4 @@ __decorate([
102
106
  (0, decorators_1.exported)("analyticsSettingsService")
103
107
  ], AnalyticsSettingsService.prototype, "getUserAgentString", null);
104
108
  yok_1.injector.register("analyticsSettingsService", AnalyticsSettingsService);
109
+ //# sourceMappingURL=analytics-settings-service.js.map
@@ -79,3 +79,4 @@ class AndroidBundleToolService {
79
79
  }
80
80
  exports.AndroidBundleToolService = AndroidBundleToolService;
81
81
  yok_1.injector.register("androidBundleToolService", AndroidBundleToolService);
82
+ //# sourceMappingURL=android-bundle-tool-service.js.map
@@ -28,6 +28,7 @@ class GradleBuildArgsService {
28
28
  if (yield this.$analyticsService.isEnabled(this.$staticConfig.TRACK_FEATURE_USAGE_SETTING_NAME)) {
29
29
  args.push("-PgatherAnalyticsData=true");
30
30
  }
31
+ // allow modifying gradle args from a `before-build-task-args` hook
31
32
  yield this.$hooksService.executeBeforeHooks("build-task-args", {
32
33
  hookArgs: { args },
33
34
  });
@@ -41,6 +42,7 @@ class GradleBuildArgsService {
41
42
  }
42
43
  getBaseTaskArgs(buildData) {
43
44
  const args = this.getBuildLoggingArgs();
45
+ // ensure we initialize project data
44
46
  this.$projectData.initializeProjectData(buildData.projectDir);
45
47
  args.push(`-PappPath=${this.$projectData.getAppDirectoryPath()}`, `-PappResourcesPath=${this.$projectData.getAppResourcesDirectoryPath()}`);
46
48
  if (buildData.gradleArgs) {
@@ -72,3 +74,4 @@ class GradleBuildArgsService {
72
74
  }
73
75
  exports.GradleBuildArgsService = GradleBuildArgsService;
74
76
  yok_1.injector.register("gradleBuildArgsService", GradleBuildArgsService);
77
+ //# sourceMappingURL=gradle-build-args-service.js.map
@@ -52,3 +52,4 @@ class GradleBuildService extends events_1.EventEmitter {
52
52
  }
53
53
  exports.GradleBuildService = GradleBuildService;
54
54
  yok_1.injector.register("gradleBuildService", GradleBuildService);
55
+ //# sourceMappingURL=gradle-build-service.js.map
@@ -11,6 +11,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.GradleCommandService = void 0;
13
13
  const yok_1 = require("../../common/yok");
14
+ const helpers_1 = require("../../common/helpers");
14
15
  class GradleCommandService {
15
16
  constructor($childProcess, $errors, $hostInfo, $logger) {
16
17
  this.$childProcess = $childProcess;
@@ -29,7 +30,10 @@ class GradleCommandService {
29
30
  shell: this.$hostInfo.isWindows,
30
31
  };
31
32
  const gradleExecutable = (_a = options.gradlePath) !== null && _a !== void 0 ? _a : (this.$hostInfo.isWindows ? "gradlew.bat" : "./gradlew");
32
- const result = yield this.executeCommandSafe(gradleExecutable, gradleArgs, childProcessOptions, spawnOptions);
33
+ const sanitizedGradleArgs = this.$hostInfo.isWindows
34
+ ? gradleArgs.map((arg) => (0, helpers_1.quoteString)(arg))
35
+ : gradleArgs;
36
+ const result = yield this.executeCommandSafe(gradleExecutable, sanitizedGradleArgs, childProcessOptions, spawnOptions);
33
37
  return result;
34
38
  });
35
39
  }
@@ -47,3 +51,4 @@ class GradleCommandService {
47
51
  }
48
52
  exports.GradleCommandService = GradleCommandService;
49
53
  yok_1.injector.register("gradleCommandService", GradleCommandService);
54
+ //# sourceMappingURL=gradle-command-service.js.map
@@ -43,6 +43,7 @@ class AndroidDeviceDebugService extends debug_service_base_1.DebugServiceBase {
43
43
  return __awaiter(this, void 0, void 0, function* () {
44
44
  this._packageName = debugData.applicationIdentifier;
45
45
  const result = yield this.debugCore(debugData.applicationIdentifier, debugOptions);
46
+ // TODO: extract this logic outside the debug service
46
47
  if (debugOptions.start && !debugOptions.justlaunch) {
47
48
  const pid = yield this.$androidProcessService.getAppProcessId(this.deviceIdentifier, debugData.applicationIdentifier);
48
49
  if (pid) {
@@ -68,6 +69,7 @@ class AndroidDeviceDebugService extends debug_service_base_1.DebugServiceBase {
68
69
  ]);
69
70
  });
70
71
  }
72
+ // TODO: Remove this method and reuse logic from androidProcessService
71
73
  getForwardedDebugPort(deviceId, packageName) {
72
74
  return __awaiter(this, void 0, void 0, function* () {
73
75
  let port = -1;
@@ -76,6 +78,7 @@ class AndroidDeviceDebugService extends debug_service_base_1.DebugServiceBase {
76
78
  "--list",
77
79
  ]);
78
80
  const unixSocketName = `${packageName}-inspectorServer`;
81
+ //matches 123a188909e6czzc tcp:40001 localabstract:org.nativescript.testUnixSockets-debug
79
82
  const regexp = new RegExp(`(?:${deviceId} tcp:)([\\d]+)(?= localabstract:${unixSocketName})`, "g");
80
83
  const match = regexp.exec(forwardsResult);
81
84
  if (match) {
@@ -92,6 +95,7 @@ class AndroidDeviceDebugService extends debug_service_base_1.DebugServiceBase {
92
95
  return port;
93
96
  });
94
97
  }
98
+ // TODO: Remove this method and reuse logic from androidProcessService
95
99
  unixSocketForward(local, remote) {
96
100
  return __awaiter(this, void 0, void 0, function* () {
97
101
  yield this.device.adb.executeCommand([
@@ -123,6 +127,7 @@ class AndroidDeviceDebugService extends debug_service_base_1.DebugServiceBase {
123
127
  this.$logger.info("device: " + deviceId + " debug port: " + port + "\n");
124
128
  });
125
129
  }
130
+ // TODO: extract this logic outside the debug service
126
131
  validateRunningApp(deviceId, packageName) {
127
132
  return __awaiter(this, void 0, void 0, function* () {
128
133
  if (!(yield this.isAppRunning(packageName, deviceId))) {
@@ -171,3 +176,4 @@ __decorate([
171
176
  ], AndroidDeviceDebugService.prototype, "debugCore", null);
172
177
  exports.AndroidDeviceDebugService = AndroidDeviceDebugService;
173
178
  yok_1.injector.register("androidDeviceDebugService", AndroidDeviceDebugService, false);
179
+ //# sourceMappingURL=android-device-debug-service.js.map
@@ -64,12 +64,15 @@ class AndroidPluginBuildService {
64
64
  return __awaiter(this, void 0, void 0, function* () {
65
65
  let xml = yield this.getXml(oldManifestContent);
66
66
  let packageName = defaultPackageName;
67
+ // if the manifest file is full-featured and declares settings inside the manifest scope
67
68
  if (xml["manifest"]) {
68
69
  if (xml["manifest"]["$"]["package"]) {
69
70
  packageName = xml["manifest"]["$"]["package"];
70
71
  }
72
+ // set the xml as the value to iterate over its properties
71
73
  xml = xml["manifest"];
72
74
  }
75
+ // if the manifest file doesn't have a <manifest> scope, only the first setting will be picked up
73
76
  const newManifest = { manifest: {} };
74
77
  for (const prop in xml) {
75
78
  newManifest.manifest[prop] = xml[prop];
@@ -145,6 +148,14 @@ class AndroidPluginBuildService {
145
148
  }
146
149
  return result;
147
150
  }
151
+ /**
152
+ * Returns whether the build has completed or not
153
+ * @param {Object} options
154
+ * @param {string} options.pluginName - The name of the plugin. E.g. 'nativescript-barcodescanner'
155
+ * @param {string} options.platformsAndroidDirPath - The path to the 'plugin/src/platforms/android' directory.
156
+ * @param {string} options.aarOutputDir - The path where the aar should be copied after a successful build.
157
+ * @param {string} options.tempPluginDirPath - The path where the android plugin will be built.
158
+ */
148
159
  buildAar(options) {
149
160
  return __awaiter(this, void 0, void 0, function* () {
150
161
  this.validateOptions(options);
@@ -182,6 +193,7 @@ class AndroidPluginBuildService {
182
193
  });
183
194
  }
184
195
  cleanPluginDir(pluginTempDir) {
196
+ // In case plugin was already built in the current process, we need to clean the old sources as they may break the new build.
185
197
  this.$fs.deleteDirectory(pluginTempDir);
186
198
  this.$fs.ensureDirectoryExists(pluginTempDir);
187
199
  }
@@ -260,6 +272,7 @@ class AndroidPluginBuildService {
260
272
  this.replaceGradleAndroidPluginVersion(buildGradlePath, runtimeGradleVersions.gradleAndroidPluginVersion);
261
273
  this.replaceFileContent(buildGradlePath, "{{pluginName}}", pluginName);
262
274
  this.replaceFileContent(settingsGradlePath, "{{pluginName}}", pluginName);
275
+ // gets the package from the AndroidManifest to use as the namespace or fallback to the `org.nativescript.${shortPluginName}`
263
276
  const shortPluginName = (0, helpers_1.getShortPluginName)(pluginName);
264
277
  const manifestPath = path.join(pluginTempDir, "src", "main", "AndroidManifest.xml");
265
278
  const manifestContent = this.$fs.readText(manifestPath);
@@ -311,6 +324,7 @@ class AndroidPluginBuildService {
311
324
  });
312
325
  }
313
326
  getLocalGradleVersions() {
327
+ // try reading from installed runtime first before reading from the npm registry...
314
328
  const installedRuntimePackageJSONPath = (0, resolve_package_path_1.resolvePackageJSONPath)(constants_1.SCOPED_ANDROID_RUNTIME_NAME, {
315
329
  paths: [this.$projectData.projectDir],
316
330
  });
@@ -345,13 +359,23 @@ class AndroidPluginBuildService {
345
359
  if (localVersionInfo) {
346
360
  return localVersionInfo;
347
361
  }
362
+ // fallback to reading from npm...
348
363
  try {
349
364
  let output = yield this.$packageManager.view(`${constants_1.SCOPED_ANDROID_RUNTIME_NAME}@${runtimeVersion}`, { version_info: true });
350
365
  output = (_a = output === null || output === void 0 ? void 0 : output["version_info"]) !== null && _a !== void 0 ? _a : output;
351
366
  if (!output) {
367
+ /**
368
+ * fallback to the old 'gradle' key in package.json
369
+ *
370
+ * format:
371
+ *
372
+ * gradle: { version: '6.4', android: '3.6.4' }
373
+ *
374
+ */
352
375
  output = yield this.$packageManager.view(`${constants_1.SCOPED_ANDROID_RUNTIME_NAME}@${runtimeVersion}`, { gradle: true });
353
376
  output = (_b = output === null || output === void 0 ? void 0 : output["gradle"]) !== null && _b !== void 0 ? _b : output;
354
377
  const { version, android } = output;
378
+ // covert output to the new format...
355
379
  output = {
356
380
  gradle: version,
357
381
  gradleAndroid: android,
@@ -424,6 +448,10 @@ class AndroidPluginBuildService {
424
448
  this.$errors.fail(`No built aar found at ${pathToBuiltAar}`);
425
449
  }
426
450
  }
451
+ /**
452
+ * @param {Object} options
453
+ * @param {string} options.platformsAndroidDirPath - The path to the 'plugin/src/platforms/android' directory.
454
+ */
427
455
  migrateIncludeGradle(options) {
428
456
  this.validatePlatformsAndroidDirPathOption(options);
429
457
  const includeGradleFilePath = path.join(options.platformsAndroidDirPath, constants_1.INCLUDE_GRADLE_NAME);
@@ -479,7 +507,10 @@ class AndroidPluginBuildService {
479
507
  opts.env = Object.assign({ USER_PROJECT_PLATFORMS_ANDROID: path.resolve((0, process_1.cwd)(), this.$options.hostProjectPath) }, process.env);
480
508
  }
481
509
  try {
482
- yield this.$childProcess.spawnFromEvent(gradlew, localArgs, "close", opts);
510
+ const sanitizedArgs = this.$hostInfo.isWindows
511
+ ? localArgs.map((arg) => (0, helpers_1.quoteString)(arg))
512
+ : localArgs;
513
+ yield this.$childProcess.spawnFromEvent(gradlew, sanitizedArgs, "close", opts);
483
514
  }
484
515
  catch (err) {
485
516
  this.$errors.fail(`Failed to build plugin ${pluginBuildSettings.pluginName} : \n${err}`);
@@ -520,3 +551,4 @@ __decorate([
520
551
  ], AndroidPluginBuildService.prototype, "buildPlugin", null);
521
552
  exports.AndroidPluginBuildService = AndroidPluginBuildService;
522
553
  yok_1.injector.register("androidPluginBuildService", AndroidPluginBuildService);
554
+ //# sourceMappingURL=android-plugin-build-service.js.map