nativescript 8.7.2 → 8.8.0-embed.0

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 (328) hide show
  1. package/lib/android-tools-info.js +0 -12
  2. package/lib/base-package-manager.js +0 -7
  3. package/lib/bootstrap.js +1 -5
  4. package/lib/bun-package-manager.js +1 -17
  5. package/lib/color.js +0 -3
  6. package/lib/commands/add-platform.js +1 -2
  7. package/lib/commands/apple-login.js +0 -1
  8. package/lib/commands/appstore-list.js +0 -1
  9. package/lib/commands/appstore-upload.js +0 -4
  10. package/lib/commands/build.js +2 -3
  11. package/lib/commands/clean.js +1 -22
  12. package/lib/commands/command-base.js +0 -1
  13. package/lib/commands/config.js +0 -3
  14. package/lib/commands/create-project.js +0 -6
  15. package/lib/commands/debug.js +1 -6
  16. package/lib/commands/deploy.js +2 -3
  17. package/lib/commands/extensibility/install-extension.js +0 -1
  18. package/lib/commands/extensibility/list-extensions.js +0 -1
  19. package/lib/commands/extensibility/uninstall-extension.js +0 -1
  20. package/lib/commands/fonts.js +0 -1
  21. package/lib/commands/generate-assets.js +0 -1
  22. package/lib/commands/generate-help.js +0 -1
  23. package/lib/commands/generate.js +2 -12
  24. package/lib/commands/info.js +0 -1
  25. package/lib/commands/install.js +0 -1
  26. package/lib/commands/list-platforms.js +0 -1
  27. package/lib/commands/migrate.js +0 -1
  28. package/lib/commands/platform-clean.js +0 -1
  29. package/lib/commands/plugin/add-plugin.js +0 -1
  30. package/lib/commands/plugin/build-plugin.js +0 -1
  31. package/lib/commands/plugin/create-plugin.js +0 -5
  32. package/lib/commands/plugin/list-plugins.js +0 -1
  33. package/lib/commands/plugin/remove-plugin.js +0 -2
  34. package/lib/commands/plugin/update-plugin.js +0 -1
  35. package/lib/commands/post-install.js +0 -6
  36. package/lib/commands/prepare.js +2 -3
  37. package/lib/commands/preview.js +0 -2
  38. package/lib/commands/remove-platform.js +0 -1
  39. package/lib/commands/resources/resources-update.js +0 -2
  40. package/lib/commands/run.js +0 -1
  41. package/lib/commands/setup.js +0 -1
  42. package/lib/commands/start.js +0 -1
  43. package/lib/commands/test-init.js +0 -4
  44. package/lib/commands/test.js +2 -9
  45. package/lib/commands/typings.js +1 -2
  46. package/lib/commands/update-platform.js +0 -5
  47. package/lib/commands/update.js +0 -2
  48. package/lib/common/bootstrap.js +0 -1
  49. package/lib/common/child-process.js +0 -3
  50. package/lib/common/codeGeneration/code-entity.js +0 -1
  51. package/lib/common/codeGeneration/code-printer.js +0 -1
  52. package/lib/common/command-params.js +0 -1
  53. package/lib/common/commands/analytics.js +0 -3
  54. package/lib/common/commands/autocompletion.js +0 -3
  55. package/lib/common/commands/device/device-log-stream.js +0 -1
  56. package/lib/common/commands/device/get-file.js +0 -2
  57. package/lib/common/commands/device/list-applications.js +0 -1
  58. package/lib/common/commands/device/list-devices.js +0 -3
  59. package/lib/common/commands/device/list-files.js +0 -2
  60. package/lib/common/commands/device/put-file.js +0 -2
  61. package/lib/common/commands/device/run-application.js +0 -1
  62. package/lib/common/commands/device/stop-application.js +0 -1
  63. package/lib/common/commands/device/uninstall-application.js +0 -1
  64. package/lib/common/commands/doctor.js +2 -3
  65. package/lib/common/commands/generate-messages.js +0 -1
  66. package/lib/common/commands/help.js +0 -1
  67. package/lib/common/commands/package-manager-get.js +0 -1
  68. package/lib/common/commands/package-manager-set.js +0 -1
  69. package/lib/common/commands/post-install.js +0 -1
  70. package/lib/common/commands/preuninstall.js +2 -11
  71. package/lib/common/commands/proxy/proxy-base.js +0 -4
  72. package/lib/common/commands/proxy/proxy-clear.js +0 -1
  73. package/lib/common/commands/proxy/proxy-get.js +0 -1
  74. package/lib/common/commands/proxy/proxy-set.js +0 -1
  75. package/lib/common/common-lib.js +0 -1
  76. package/lib/common/constants.js +0 -11
  77. package/lib/common/decorators.js +0 -48
  78. package/lib/common/dispatchers.js +1 -10
  79. package/lib/common/errors.js +3 -13
  80. package/lib/common/file-system.js +2 -13
  81. package/lib/common/header.js +0 -3
  82. package/lib/common/helpers.js +3 -89
  83. package/lib/common/host-info.js +0 -4
  84. package/lib/common/http-client.js +0 -20
  85. package/lib/common/logger/appenders/cli-appender.js +0 -4
  86. package/lib/common/logger/appenders/emit-appender.js +0 -4
  87. package/lib/common/logger/layouts/cli-layout.js +0 -1
  88. package/lib/common/logger/logger.js +0 -5
  89. package/lib/common/messages/messages.js +0 -6
  90. package/lib/common/mobile/android/android-application-manager.js +1 -20
  91. package/lib/common/mobile/android/android-debug-bridge-result-handler.js +0 -1
  92. package/lib/common/mobile/android/android-debug-bridge.js +0 -6
  93. package/lib/common/mobile/android/android-device-file-system.js +0 -4
  94. package/lib/common/mobile/android/android-device-hash-service.js +0 -3
  95. package/lib/common/mobile/android/android-device.js +0 -8
  96. package/lib/common/mobile/android/android-emulator-services.js +1 -2
  97. package/lib/common/mobile/android/android-ini-file-parser.js +0 -9
  98. package/lib/common/mobile/android/android-log-filter.js +0 -4
  99. package/lib/common/mobile/android/android-virtual-device-service.js +0 -26
  100. package/lib/common/mobile/android/device-android-debug-bridge.js +0 -1
  101. package/lib/common/mobile/android/genymotion/genymotion-service.js +0 -5
  102. package/lib/common/mobile/android/genymotion/virtualbox-service.js +0 -11
  103. package/lib/common/mobile/android/logcat-helper.js +1 -20
  104. package/lib/common/mobile/application-manager-base.js +0 -6
  105. package/lib/common/mobile/device-emitter.js +0 -4
  106. package/lib/common/mobile/device-log-emitter.js +0 -1
  107. package/lib/common/mobile/device-log-provider-base.js +0 -1
  108. package/lib/common/mobile/device-log-provider.js +0 -23
  109. package/lib/common/mobile/device-platforms-constants.js +0 -1
  110. package/lib/common/mobile/emulator-helper.js +0 -3
  111. package/lib/common/mobile/ios/device/ios-application-manager.js +0 -3
  112. package/lib/common/mobile/ios/device/ios-device-file-system.js +0 -1
  113. package/lib/common/mobile/ios/device/ios-device-operations.js +0 -4
  114. package/lib/common/mobile/ios/device/ios-device.js +0 -4
  115. package/lib/common/mobile/ios/ios-device-base.js +0 -1
  116. package/lib/common/mobile/ios/ios-device-product-name-mapper.js +0 -2
  117. package/lib/common/mobile/ios/ios-log-filter.js +0 -1
  118. package/lib/common/mobile/ios/simulator/ios-emulator-services.js +0 -4
  119. package/lib/common/mobile/ios/simulator/ios-sim-resolver.js +0 -1
  120. package/lib/common/mobile/ios/simulator/ios-simulator-application-manager.js +0 -6
  121. package/lib/common/mobile/ios/simulator/ios-simulator-device.js +0 -5
  122. package/lib/common/mobile/ios/simulator/ios-simulator-file-system.js +0 -1
  123. package/lib/common/mobile/ios/simulator/ios-simulator-log-provider.js +0 -1
  124. package/lib/common/mobile/local-to-device-path-data-factory.js +0 -1
  125. package/lib/common/mobile/log-filter.js +0 -2
  126. package/lib/common/mobile/logging-levels.js +0 -1
  127. package/lib/common/mobile/mobile-core/android-device-discovery.js +0 -2
  128. package/lib/common/mobile/mobile-core/android-emulator-discovery.js +0 -3
  129. package/lib/common/mobile/mobile-core/android-process-service.js +0 -32
  130. package/lib/common/mobile/mobile-core/device-discovery.js +0 -1
  131. package/lib/common/mobile/mobile-core/devices-service.js +0 -69
  132. package/lib/common/mobile/mobile-core/ios-device-discovery.js +0 -2
  133. package/lib/common/mobile/mobile-core/ios-simulator-discovery.js +0 -3
  134. package/lib/common/mobile/mobile-helper.js +0 -1
  135. package/lib/common/mobile/wp8/wp8-emulator-services.js +0 -1
  136. package/lib/common/opener.js +0 -1
  137. package/lib/common/os-info.js +0 -1
  138. package/lib/common/plist-parser.js +0 -1
  139. package/lib/common/project-helper.js +0 -1
  140. package/lib/common/prompter.js +1 -9
  141. package/lib/common/queue.js +0 -1
  142. package/lib/common/resource-loader.js +0 -1
  143. package/lib/common/services/auto-completion-service.js +1 -13
  144. package/lib/common/services/cancellation.js +1 -2
  145. package/lib/common/services/commands-service.js +6 -17
  146. package/lib/common/services/help-service.js +3 -11
  147. package/lib/common/services/hooks-service.js +0 -13
  148. package/lib/common/services/ios-notification-service.js +0 -1
  149. package/lib/common/services/json-file-settings-service.js +0 -6
  150. package/lib/common/services/lock-service.js +0 -6
  151. package/lib/common/services/message-contract-generator.js +0 -1
  152. package/lib/common/services/messages-service.js +0 -1
  153. package/lib/common/services/micro-templating-service.js +0 -6
  154. package/lib/common/services/net-service.js +0 -3
  155. package/lib/common/services/project-files-manager.js +0 -5
  156. package/lib/common/services/project-files-provider-base.js +0 -1
  157. package/lib/common/services/proxy-service.js +0 -1
  158. package/lib/common/services/qr.js +0 -1
  159. package/lib/common/services/settings-service.js +0 -1
  160. package/lib/common/services/xcode-select-service.js +0 -1
  161. package/lib/common/utils.js +0 -1
  162. package/lib/common/validators/project-name-validator.js +0 -1
  163. package/lib/common/validators/validation-result.js +0 -1
  164. package/lib/common/verify-node-version.js +1 -8
  165. package/lib/common/yok.js +11 -32
  166. package/lib/config.js +1 -22
  167. package/lib/constants-provider.js +0 -1
  168. package/lib/constants.js +0 -53
  169. package/lib/controllers/build-controller.js +3 -4
  170. package/lib/controllers/debug-controller.js +3 -8
  171. package/lib/controllers/deploy-controller.js +0 -1
  172. package/lib/controllers/migrate-controller.js +3 -91
  173. package/lib/controllers/platform-controller.js +1 -9
  174. package/lib/controllers/prepare-controller.js +10 -17
  175. package/lib/controllers/run-controller.js +1 -17
  176. package/lib/controllers/update-controller-base.js +0 -1
  177. package/lib/controllers/update-controller.js +0 -11
  178. package/lib/data/build-data.js +2 -1
  179. package/lib/data/controller-data-base.js +0 -1
  180. package/lib/data/debug-data.js +0 -1
  181. package/lib/data/platform-data.js +0 -1
  182. package/lib/data/prepare-data.js +1 -1
  183. package/lib/data/run-data.js +0 -1
  184. package/lib/declarations.d.ts +12 -2
  185. package/lib/definitions/platform.d.ts +1 -0
  186. package/lib/detached-processes/cleanup-js-subprocess.js +2 -8
  187. package/lib/detached-processes/cleanup-process.js +14 -18
  188. package/lib/detached-processes/file-log-service.js +1 -2
  189. package/lib/device-path-provider.js +0 -1
  190. package/lib/device-sockets/ios/app-debug-socket-proxy-factory.js +0 -7
  191. package/lib/device-sockets/ios/notification.js +0 -3
  192. package/lib/device-sockets/ios/socket-request-executor.js +0 -3
  193. package/lib/helpers/android-bundle-validator-helper.js +1 -2
  194. package/lib/helpers/deploy-command-helper.js +0 -1
  195. package/lib/helpers/key-command-helper.js +2 -4
  196. package/lib/helpers/livesync-command-helper.js +1 -4
  197. package/lib/helpers/network-connectivity-validator.js +0 -1
  198. package/lib/helpers/options-track-helper.js +2 -3
  199. package/lib/helpers/package-path-helper.js +0 -1
  200. package/lib/helpers/platform-command-helper.js +17 -10
  201. package/lib/helpers/version-validator-helper.js +0 -1
  202. package/lib/key-commands/bootstrap.js +2 -3
  203. package/lib/key-commands/index.js +4 -5
  204. package/lib/nativescript-cli-lib-bootstrap.js +0 -4
  205. package/lib/nativescript-cli-lib.js +0 -1
  206. package/lib/nativescript-cli.js +1 -10
  207. package/lib/node/pbxproj-dom-xcode.js +0 -1
  208. package/lib/node/xcode.js +0 -1
  209. package/lib/node-package-manager.js +1 -11
  210. package/lib/options.js +123 -141
  211. package/lib/package-installation-manager.js +1 -8
  212. package/lib/package-manager.js +0 -2
  213. package/lib/platform-command-param.js +0 -1
  214. package/lib/pnpm-package-manager.js +1 -4
  215. package/lib/project-data.js +0 -12
  216. package/lib/providers/project-files-provider.js +1 -2
  217. package/lib/resolvers/livesync-service-resolver.js +0 -1
  218. package/lib/services/analytics/analytics-broker-process.js +6 -10
  219. package/lib/services/analytics/analytics-broker.js +1 -2
  220. package/lib/services/analytics/analytics-service.js +25 -29
  221. package/lib/services/analytics/google-analytics-provider.js +12 -13
  222. package/lib/services/analytics-settings-service.js +0 -5
  223. package/lib/services/android/android-bundle-tool-service.js +0 -1
  224. package/lib/services/android/gradle-build-args-service.js +0 -3
  225. package/lib/services/android/gradle-build-service.js +0 -1
  226. package/lib/services/android/gradle-command-service.js +0 -1
  227. package/lib/services/android-device-debug-service.js +0 -6
  228. package/lib/services/android-plugin-build-service.js +12 -34
  229. package/lib/services/android-project-service.js +22 -86
  230. package/lib/services/android-resources-migration-service.js +0 -7
  231. package/lib/services/apple-portal/apple-portal-application-service.js +0 -1
  232. package/lib/services/apple-portal/apple-portal-cookie-service.js +0 -1
  233. package/lib/services/apple-portal/apple-portal-session-service.js +4 -6
  234. package/lib/services/assets-generation/assets-generation-service.js +13 -17
  235. package/lib/services/build-artifacts-service.js +1 -2
  236. package/lib/services/build-data-service.js +0 -1
  237. package/lib/services/build-info-file-service.js +0 -1
  238. package/lib/services/cleanup-service.js +9 -13
  239. package/lib/services/cocoapods-platform-manager.js +0 -9
  240. package/lib/services/cocoapods-service.js +1 -21
  241. package/lib/services/debug-data-service.js +0 -1
  242. package/lib/services/debug-service-base.js +0 -7
  243. package/lib/services/device/device-install-app-service.js +1 -2
  244. package/lib/services/doctor-service.js +6 -21
  245. package/lib/services/extensibility-service.js +0 -8
  246. package/lib/services/files-hash-service.js +3 -3
  247. package/lib/services/hmr-status-service.js +0 -2
  248. package/lib/services/info-service.js +0 -1
  249. package/lib/services/initialize-service.js +1 -5
  250. package/lib/services/ios/export-options-plist-service.js +0 -4
  251. package/lib/services/ios/ios-signing-service.js +0 -4
  252. package/lib/services/ios/spm-service.js +0 -9
  253. package/lib/services/ios/xcodebuild-args-service.js +0 -9
  254. package/lib/services/ios/xcodebuild-command-service.js +0 -1
  255. package/lib/services/ios/xcodebuild-service.js +0 -1
  256. package/lib/services/ios-debugger-port-service.js +0 -1
  257. package/lib/services/ios-device-debug-service.js +0 -1
  258. package/lib/services/ios-entitlements-service.js +0 -1
  259. package/lib/services/ios-extensions-service.js +0 -1
  260. package/lib/services/ios-log-filter.js +0 -20
  261. package/lib/services/ios-native-target-service.js +4 -6
  262. package/lib/services/ios-project-service.js +24 -26
  263. package/lib/services/ios-provision-service.js +0 -3
  264. package/lib/services/ios-watch-app-service.js +0 -1
  265. package/lib/services/ip-service.js +0 -2
  266. package/lib/services/itmstransporter-service.js +0 -1
  267. package/lib/services/karma-execution.js +0 -2
  268. package/lib/services/livesync/android-device-livesync-service-base.js +0 -1
  269. package/lib/services/livesync/android-device-livesync-service.js +0 -2
  270. package/lib/services/livesync/android-device-livesync-sockets-service.js +3 -7
  271. package/lib/services/livesync/android-livesync-service.js +2 -3
  272. package/lib/services/livesync/android-livesync-tool.js +0 -4
  273. package/lib/services/livesync/device-livesync-service-base.js +0 -2
  274. package/lib/services/livesync/ios-device-livesync-service.js +0 -7
  275. package/lib/services/livesync/ios-livesync-service.js +2 -4
  276. package/lib/services/livesync/livesync-socket.js +0 -1
  277. package/lib/services/livesync/platform-livesync-service-base.js +4 -8
  278. package/lib/services/livesync-process-data-service.js +0 -1
  279. package/lib/services/log-parser-service.js +0 -1
  280. package/lib/services/log-source-map-service.js +3 -17
  281. package/lib/services/marking-mode-service.js +5 -8
  282. package/lib/services/metadata-filtering-service.js +0 -1
  283. package/lib/services/npm-config-service.js +0 -4
  284. package/lib/services/pacote-service.js +0 -7
  285. package/lib/services/performance-service.js +1 -3
  286. package/lib/services/platform/add-platform-service.js +9 -48
  287. package/lib/services/platform/platform-validation-service.js +0 -1
  288. package/lib/services/platform/prepare-native-platform-service.js +8 -8
  289. package/lib/services/platform-environment-requirements.js +6 -9
  290. package/lib/services/platform-project-service-base.js +0 -1
  291. package/lib/services/platforms-data-service.js +0 -1
  292. package/lib/services/plugins-service.js +9 -19
  293. package/lib/services/prepare-data-service.js +0 -1
  294. package/lib/services/project-backup-service.js +0 -4
  295. package/lib/services/project-changes-service.js +11 -13
  296. package/lib/services/project-cleanup-service.js +0 -2
  297. package/lib/services/project-config-service.js +1 -18
  298. package/lib/services/project-data-service.js +7 -36
  299. package/lib/services/project-name-service.js +0 -1
  300. package/lib/services/project-service.js +0 -10
  301. package/lib/services/project-templates-service.js +2 -3
  302. package/lib/services/qr-code-terminal-service.js +0 -1
  303. package/lib/services/require-service.js +0 -1
  304. package/lib/services/start-service.js +0 -1
  305. package/lib/services/temp-service.js +0 -1
  306. package/lib/services/terminal-spinner-service.js +0 -2
  307. package/lib/services/test-execution-service.js +2 -9
  308. package/lib/services/test-initialization-service.js +0 -4
  309. package/lib/services/timeline-profiler-service.js +0 -1
  310. package/lib/services/user-settings-service.js +0 -1
  311. package/lib/services/versions-service.js +4 -6
  312. package/lib/services/watch-ignore-list-service.js +0 -1
  313. package/lib/services/webpack/webpack-compiler-service.js +15 -48
  314. package/lib/services/xcconfig-service.js +0 -2
  315. package/lib/services/xcproj-service.js +12 -1
  316. package/lib/shared-event-bus.js +0 -6
  317. package/lib/sys-info.js +1 -2
  318. package/lib/tools/config-manipulation/config-transformer.js +0 -12
  319. package/lib/tools/node-modules/node-modules-builder.js +0 -1
  320. package/lib/tools/node-modules/node-modules-dependencies-builder.js +0 -6
  321. package/lib/yarn-package-manager.js +0 -1
  322. package/lib/yarn2-package-manager.js +0 -3
  323. package/package.json +2 -2
  324. package/vendor/gradle-plugin/build.gradle +21 -6
  325. package/vendor/gradle-plugin/settings.gradle +13 -3
  326. package/node_modules/@npmcli/move-file/node_modules/mkdirp/CHANGELOG.md +0 -15
  327. package/node_modules/rimraf/CHANGELOG.md +0 -65
  328. package/node_modules/stringify-package/CHANGELOG.md +0 -16
@@ -20,4 +20,3 @@ class LiveSyncServiceResolver {
20
20
  }
21
21
  exports.LiveSyncServiceResolver = LiveSyncServiceResolver;
22
22
  yok_1.injector.register("liveSyncServiceResolver", LiveSyncServiceResolver);
23
- //# sourceMappingURL=livesync-service-resolver.js.map
@@ -9,8 +9,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- // NOTE: This file is used to track data in a separate process.
13
- // The instances here are not shared with the ones in main CLI process.
14
12
  const fs = require("fs");
15
13
  const analytics_broker_1 = require("./analytics-broker");
16
14
  const file_log_service_1 = require("../../detached-processes/file-log-service");
@@ -20,7 +18,6 @@ if (!pathToBootstrap || !fs.existsSync(pathToBootstrap)) {
20
18
  throw new Error("Invalid path to bootstrap.");
21
19
  }
22
20
  const logFile = process.argv[3];
23
- // After requiring the bootstrap we can use $injector
24
21
  require(pathToBootstrap);
25
22
  const analyticsLoggingService = yok_1.injector.resolve(file_log_service_1.FileLogService, { logFile });
26
23
  analyticsLoggingService.logData({ message: "Initializing AnalyticsBroker." });
@@ -50,15 +47,15 @@ process.on("message", (data) => __awaiter(void 0, void 0, void 0, function* () {
50
47
  analyticsLoggingService.logData({
51
48
  message: `analytics-broker-process received message of type: ${JSON.stringify(data)}`,
52
49
  });
53
- if (data.type === "FinishTracking" /* TrackingTypes.FinishTracking */) {
50
+ if (data.type === "FinishTracking") {
54
51
  yield finishTracking();
55
52
  if (process.connected) {
56
53
  analyticsLoggingService.logData({
57
- message: `analytics-broker-process will send ${"ProcessFinishedTasks" /* DetachedProcessMessages.ProcessFinishedTasks */} message`,
54
+ message: `analytics-broker-process will send ${"ProcessFinishedTasks"} message`,
58
55
  });
59
- process.send("ProcessFinishedTasks" /* DetachedProcessMessages.ProcessFinishedTasks */, () => {
56
+ process.send("ProcessFinishedTasks", () => {
60
57
  analyticsLoggingService.logData({
61
- message: `analytics-broker-process sent ${"ProcessFinishedTasks" /* DetachedProcessMessages.ProcessFinishedTasks */} message and will exit gracefully now`,
58
+ message: `analytics-broker-process sent ${"ProcessFinishedTasks"} message and will exit gracefully now`,
62
59
  });
63
60
  killCurrentProcessGracefully();
64
61
  });
@@ -75,7 +72,6 @@ process.on("disconnect", () => __awaiter(void 0, void 0, void 0, function* () {
75
72
  killCurrentProcessGracefully();
76
73
  }));
77
74
  analyticsLoggingService.logData({
78
- message: `analytics-broker-process will send ${"ProcessReadyToReceive" /* DetachedProcessMessages.ProcessReadyToReceive */} message`,
75
+ message: `analytics-broker-process will send ${"ProcessReadyToReceive"} message`,
79
76
  });
80
- process.send("ProcessReadyToReceive" /* DetachedProcessMessages.ProcessReadyToReceive */);
81
- //# sourceMappingURL=analytics-broker-process.js.map
77
+ process.send("ProcessReadyToReceive");
@@ -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" /* FileLogMessageType.Error */,
44
+ type: "Error",
45
45
  });
46
46
  }
47
47
  });
@@ -51,4 +51,3 @@ __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" /* AnalyticsStatus.enabled */;
47
+ let trackFeatureUsage = initialTrackFeatureUsageStatus === "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" /* AnalyticsStatus.enabled */
69
- : "disabled" /* AnalyticsStatus.disabled */;
68
+ ? "enabled"
69
+ : "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" /* AnalyticsStatus.enabled */;
76
+ return 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" /* GoogleAnalyticsDataType.Event */,
90
- action: "Accept Tracking" /* TrackActionNames.AcceptTracking */,
89
+ googleAnalyticsDataType: "event",
90
+ action: "Accept Tracking",
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" /* AnalyticsStatus.enabled */) {
100
+ this.analyticsStatuses[this.$staticConfig.TRACK_FEATURE_USAGE_SETTING_NAME] === "enabled") {
101
101
  return this.forcefullyTrackInGoogleAnalytics(gaSettings);
102
102
  }
103
103
  });
@@ -112,8 +112,6 @@ 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.
117
115
  if (isForDevice !== null && isForDevice !== undefined) {
118
116
  const deviceType = isForDevice
119
117
  ? constants_1.DeviceTypes.Device
@@ -131,7 +129,7 @@ class AnalyticsService {
131
129
  const customDimensions = {};
132
130
  this.setProjectRelatedCustomDimensions(customDimensions, data.projectDir);
133
131
  const googleAnalyticsEventData = {
134
- googleAnalyticsDataType: "event" /* GoogleAnalyticsDataType.Event */,
132
+ googleAnalyticsDataType: "event",
135
133
  action: data.action,
136
134
  label,
137
135
  customDimensions,
@@ -146,7 +144,7 @@ class AnalyticsService {
146
144
  if (this.brokerProcess && this.brokerProcess.connected) {
147
145
  let timer;
148
146
  const handler = (data) => {
149
- if (data === "ProcessFinishedTasks" /* DetachedProcessMessages.ProcessFinishedTasks */) {
147
+ if (data === "ProcessFinishedTasks") {
150
148
  this.brokerProcess.removeListener("message", handler);
151
149
  clearTimeout(timer);
152
150
  resolve();
@@ -157,7 +155,7 @@ class AnalyticsService {
157
155
  resolve();
158
156
  }, 3000);
159
157
  this.brokerProcess.on("message", handler);
160
- const msg = { type: "FinishTracking" /* TrackingTypes.FinishTracking */ };
158
+ const msg = { type: "FinishTracking" };
161
159
  this.brokerProcess.send(msg, (err) => this.$logger.trace(`Error while sending ${JSON.stringify(msg)}`));
162
160
  }
163
161
  else {
@@ -168,13 +166,13 @@ class AnalyticsService {
168
166
  }
169
167
  forcefullyTrackInGoogleAnalytics(gaSettings) {
170
168
  gaSettings.customDimensions = gaSettings.customDimensions || {};
171
- gaSettings.customDimensions["cd5" /* GoogleAnalyticsCustomDimensions.client */] =
169
+ gaSettings.customDimensions["cd5"] =
172
170
  this.$options.analyticsClient ||
173
- ((0, helpers_1.isInteractive)() ? "CLI" /* AnalyticsClients.Cli */ : "Unknown" /* AnalyticsClients.Unknown */);
171
+ ((0, helpers_1.isInteractive)() ? "CLI" : "Unknown");
174
172
  this.setProjectRelatedCustomDimensions(gaSettings.customDimensions);
175
173
  const googleAnalyticsData = _.merge({
176
- type: "googleAnalyticsData" /* TrackingTypes.GoogleAnalyticsData */,
177
- category: "CLI" /* AnalyticsClients.Cli */,
174
+ type: "googleAnalyticsData",
175
+ category: "CLI",
178
176
  }, gaSettings);
179
177
  this.$logger.trace("Will send the following information to Google Analytics:", googleAnalyticsData);
180
178
  return this.sendMessageToBroker(googleAnalyticsData);
@@ -185,15 +183,14 @@ class AnalyticsService {
185
183
  projectDir = this.$projectHelper.projectDir;
186
184
  }
187
185
  catch (err) {
188
- // In case there's no project dir here, the above getter will fail.
189
186
  this.$logger.trace("Unable to get the projectDir from projectHelper", err);
190
187
  }
191
188
  }
192
189
  if (projectDir) {
193
190
  const projectData = this.$projectDataService.getProjectData(projectDir);
194
- customDimensions["cd2" /* GoogleAnalyticsCustomDimensions.projectType */] =
191
+ customDimensions["cd2"] =
195
192
  projectData.projectType;
196
- customDimensions["cd9" /* GoogleAnalyticsCustomDimensions.isShared */] = projectData.isShared.toString();
193
+ customDimensions["cd9"] = projectData.isShared.toString();
197
194
  }
198
195
  return customDimensions;
199
196
  }
@@ -230,7 +227,7 @@ class AnalyticsService {
230
227
  }
231
228
  });
232
229
  broker.on("message", (data) => {
233
- if (data === "ProcessReadyToReceive" /* DetachedProcessMessages.ProcessReadyToReceive */) {
230
+ if (data === "ProcessReadyToReceive") {
234
231
  clearTimeout(timeoutId);
235
232
  if (!isSettled) {
236
233
  isSettled = true;
@@ -255,7 +252,7 @@ class AnalyticsService {
255
252
  return __awaiter(this, void 0, void 0, function* () {
256
253
  yield this.initAnalyticsStatuses();
257
254
  if (!this.$staticConfig.disableAnalytics &&
258
- this.analyticsStatuses[settingName] === "enabled" /* AnalyticsStatus.enabled */) {
255
+ this.analyticsStatuses[settingName] === "enabled") {
259
256
  return this.sendMessageToBroker(trackingInfo);
260
257
  }
261
258
  });
@@ -309,14 +306,14 @@ class AnalyticsService {
309
306
  if (settingValue) {
310
307
  const isEnabled = (0, helpers_1.toBoolean)(settingValue);
311
308
  if (isEnabled) {
312
- this.analyticsStatuses[settingName] = "enabled" /* AnalyticsStatus.enabled */;
309
+ this.analyticsStatuses[settingName] = "enabled";
313
310
  }
314
311
  else {
315
- this.analyticsStatuses[settingName] = "disabled" /* AnalyticsStatus.disabled */;
312
+ this.analyticsStatuses[settingName] = "disabled";
316
313
  }
317
314
  }
318
315
  else {
319
- this.analyticsStatuses[settingName] = "not confirmed" /* AnalyticsStatus.notConfirmed */;
316
+ this.analyticsStatuses[settingName] = "not confirmed";
320
317
  }
321
318
  }
322
319
  return this.analyticsStatuses[settingName];
@@ -325,7 +322,7 @@ class AnalyticsService {
325
322
  isNotConfirmed(settingName) {
326
323
  return __awaiter(this, void 0, void 0, function* () {
327
324
  const analyticsStatus = yield this.getStatus(settingName);
328
- return analyticsStatus === "not confirmed" /* AnalyticsStatus.notConfirmed */;
325
+ return analyticsStatus === "not confirmed";
329
326
  });
330
327
  }
331
328
  getHumanReadableStatusMessage(settingName, readableSettingName) {
@@ -343,15 +340,15 @@ class AnalyticsService {
343
340
  getJsonStatusMessage(settingName) {
344
341
  return __awaiter(this, void 0, void 0, function* () {
345
342
  const status = yield this.getStatus(settingName);
346
- const enabled = status === "not confirmed" /* AnalyticsStatus.notConfirmed */
343
+ const enabled = status === "not confirmed"
347
344
  ? null
348
- : status === "enabled" /* AnalyticsStatus.enabled */;
345
+ : status === "enabled";
349
346
  return JSON.stringify({ enabled });
350
347
  });
351
348
  }
352
349
  trackException(exception, message) {
353
350
  const data = {
354
- type: "exception" /* TrackingTypes.Exception */,
351
+ type: "exception",
355
352
  exception,
356
353
  message,
357
354
  };
@@ -367,4 +364,3 @@ __decorate([
367
364
  ], AnalyticsService.prototype, "initAnalyticsStatuses", null);
368
365
  exports.AnalyticsService = AnalyticsService;
369
366
  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" /* FileLogMessageType.Error */,
42
+ type: "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" /* GoogleAnalyticsDataType.Page */:
76
+ case "pageview":
77
77
  yield this.trackPageView(visitor, trackInfo);
78
78
  break;
79
- case "event" /* GoogleAnalyticsDataType.Event */:
79
+ case "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" /* 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 */,
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",
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" /* FileLogMessageType.Error */,
112
+ type: "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" /* FileLogMessageType.Error */,
135
+ type: "Error",
136
136
  });
137
137
  reject(err);
138
138
  return;
@@ -150,4 +150,3 @@ __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,10 +76,6 @@ 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.
83
79
  const majorVersion = osRelease && _.first(osRelease.split("."));
84
80
  return majorVersion && `10.${+majorVersion - 4}`;
85
81
  }
@@ -106,4 +102,3 @@ __decorate([
106
102
  (0, decorators_1.exported)("analyticsSettingsService")
107
103
  ], AnalyticsSettingsService.prototype, "getUserAgentString", null);
108
104
  yok_1.injector.register("analyticsSettingsService", AnalyticsSettingsService);
109
- //# sourceMappingURL=analytics-settings-service.js.map
@@ -79,4 +79,3 @@ 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
@@ -29,7 +29,6 @@ class GradleBuildArgsService {
29
29
  if (yield this.$analyticsService.isEnabled(this.$staticConfig.TRACK_FEATURE_USAGE_SETTING_NAME)) {
30
30
  args.push("-PgatherAnalyticsData=true");
31
31
  }
32
- // allow modifying gradle args from a `before-build-task-args` hook
33
32
  yield this.$hooksService.executeBeforeHooks("build-task-args", {
34
33
  hookArgs: { args },
35
34
  });
@@ -46,7 +45,6 @@ class GradleBuildArgsService {
46
45
  const toolsInfo = this.$androidToolsInfo.getToolsInfo({
47
46
  projectDir: buildData.projectDir,
48
47
  });
49
- // ensure we initialize project data
50
48
  this.$projectData.initializeProjectData(buildData.projectDir);
51
49
  args.push(`-PcompileSdk=android-${toolsInfo.compileSdkVersion}`, `-PtargetSdk=${toolsInfo.targetSdkVersion}`, `-PbuildToolsVersion=${toolsInfo.buildToolsVersion}`, `-PgenerateTypings=${toolsInfo.generateTypings}`, `-PappPath=${this.$projectData.getAppDirectoryPath()}`, `-PappResourcesPath=${this.$projectData.getAppResourcesDirectoryPath()}`);
52
50
  if (buildData.gradleArgs) {
@@ -78,4 +76,3 @@ class GradleBuildArgsService {
78
76
  }
79
77
  exports.GradleBuildArgsService = GradleBuildArgsService;
80
78
  yok_1.injector.register("gradleBuildArgsService", GradleBuildArgsService);
81
- //# sourceMappingURL=gradle-build-args-service.js.map
@@ -52,4 +52,3 @@ 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
@@ -47,4 +47,3 @@ class GradleCommandService {
47
47
  }
48
48
  exports.GradleCommandService = GradleCommandService;
49
49
  yok_1.injector.register("gradleCommandService", GradleCommandService);
50
- //# sourceMappingURL=gradle-command-service.js.map
@@ -43,7 +43,6 @@ 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
47
46
  if (debugOptions.start && !debugOptions.justlaunch) {
48
47
  const pid = yield this.$androidProcessService.getAppProcessId(this.deviceIdentifier, debugData.applicationIdentifier);
49
48
  if (pid) {
@@ -69,7 +68,6 @@ class AndroidDeviceDebugService extends debug_service_base_1.DebugServiceBase {
69
68
  ]);
70
69
  });
71
70
  }
72
- // TODO: Remove this method and reuse logic from androidProcessService
73
71
  getForwardedDebugPort(deviceId, packageName) {
74
72
  return __awaiter(this, void 0, void 0, function* () {
75
73
  let port = -1;
@@ -78,7 +76,6 @@ class AndroidDeviceDebugService extends debug_service_base_1.DebugServiceBase {
78
76
  "--list",
79
77
  ]);
80
78
  const unixSocketName = `${packageName}-inspectorServer`;
81
- //matches 123a188909e6czzc tcp:40001 localabstract:org.nativescript.testUnixSockets-debug
82
79
  const regexp = new RegExp(`(?:${deviceId} tcp:)([\\d]+)(?= localabstract:${unixSocketName})`, "g");
83
80
  const match = regexp.exec(forwardsResult);
84
81
  if (match) {
@@ -95,7 +92,6 @@ class AndroidDeviceDebugService extends debug_service_base_1.DebugServiceBase {
95
92
  return port;
96
93
  });
97
94
  }
98
- // TODO: Remove this method and reuse logic from androidProcessService
99
95
  unixSocketForward(local, remote) {
100
96
  return __awaiter(this, void 0, void 0, function* () {
101
97
  yield this.device.adb.executeCommand([
@@ -127,7 +123,6 @@ class AndroidDeviceDebugService extends debug_service_base_1.DebugServiceBase {
127
123
  this.$logger.info("device: " + deviceId + " debug port: " + port + "\n");
128
124
  });
129
125
  }
130
- // TODO: extract this logic outside the debug service
131
126
  validateRunningApp(deviceId, packageName) {
132
127
  return __awaiter(this, void 0, void 0, function* () {
133
128
  if (!(yield this.isAppRunning(packageName, deviceId))) {
@@ -176,4 +171,3 @@ __decorate([
176
171
  ], AndroidDeviceDebugService.prototype, "debugCore", null);
177
172
  exports.AndroidDeviceDebugService = AndroidDeviceDebugService;
178
173
  yok_1.injector.register("androidDeviceDebugService", AndroidDeviceDebugService, false);
179
- //# sourceMappingURL=android-device-debug-service.js.map
@@ -23,14 +23,16 @@ const xml2js_1 = require("xml2js");
23
23
  const yok_1 = require("../common/yok");
24
24
  const _ = require("lodash");
25
25
  const resolve_package_path_1 = require("@rigor789/resolve-package-path");
26
+ const process_1 = require("process");
26
27
  class AndroidPluginBuildService {
27
28
  get $platformsDataService() {
28
29
  return this.$injector.resolve("platformsDataService");
29
30
  }
30
- constructor($fs, $childProcess, $hostInfo, $androidToolsInfo, $logger, $packageManager, $projectData, $projectDataService, $devicePlatformsConstants, $errors, $filesHashService, $hooksService, $injector, $watchIgnoreListService) {
31
+ constructor($fs, $childProcess, $hostInfo, $options, $androidToolsInfo, $logger, $packageManager, $projectData, $projectDataService, $devicePlatformsConstants, $errors, $filesHashService, $hooksService, $injector, $watchIgnoreListService) {
31
32
  this.$fs = $fs;
32
33
  this.$childProcess = $childProcess;
33
34
  this.$hostInfo = $hostInfo;
35
+ this.$options = $options;
34
36
  this.$androidToolsInfo = $androidToolsInfo;
35
37
  this.$logger = $logger;
36
38
  this.$packageManager = $packageManager;
@@ -63,15 +65,12 @@ class AndroidPluginBuildService {
63
65
  return __awaiter(this, void 0, void 0, function* () {
64
66
  let xml = yield this.getXml(oldManifestContent);
65
67
  let packageName = defaultPackageName;
66
- // 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
  }
71
- // set the xml as the value to iterate over its properties
72
72
  xml = xml["manifest"];
73
73
  }
74
- // if the manifest file doesn't have a <manifest> scope, only the first setting will be picked up
75
74
  const newManifest = { manifest: {} };
76
75
  for (const prop in xml) {
77
76
  newManifest.manifest[prop] = xml[prop];
@@ -147,14 +146,6 @@ class AndroidPluginBuildService {
147
146
  }
148
147
  return result;
149
148
  }
150
- /**
151
- * Returns whether the build has completed or not
152
- * @param {Object} options
153
- * @param {string} options.pluginName - The name of the plugin. E.g. 'nativescript-barcodescanner'
154
- * @param {string} options.platformsAndroidDirPath - The path to the 'plugin/src/platforms/android' directory.
155
- * @param {string} options.aarOutputDir - The path where the aar should be copied after a successful build.
156
- * @param {string} options.tempPluginDirPath - The path where the android plugin will be built.
157
- */
158
149
  buildAar(options) {
159
150
  return __awaiter(this, void 0, void 0, function* () {
160
151
  this.validateOptions(options);
@@ -192,7 +183,6 @@ class AndroidPluginBuildService {
192
183
  });
193
184
  }
194
185
  cleanPluginDir(pluginTempDir) {
195
- // In case plugin was already built in the current process, we need to clean the old sources as they may break the new build.
196
186
  this.$fs.deleteDirectory(pluginTempDir);
197
187
  this.$fs.ensureDirectoryExists(pluginTempDir);
198
188
  }
@@ -311,7 +301,6 @@ class AndroidPluginBuildService {
311
301
  });
312
302
  }
313
303
  getLocalGradleVersions() {
314
- // try reading from installed runtime first before reading from the npm registry...
315
304
  const installedRuntimePackageJSONPath = (0, resolve_package_path_1.resolvePackageJSONPath)(constants_1.SCOPED_ANDROID_RUNTIME_NAME, {
316
305
  paths: [this.$projectData.projectDir],
317
306
  });
@@ -346,23 +335,13 @@ class AndroidPluginBuildService {
346
335
  if (localVersionInfo) {
347
336
  return localVersionInfo;
348
337
  }
349
- // fallback to reading from npm...
350
338
  try {
351
339
  let output = yield this.$packageManager.view(`${constants_1.SCOPED_ANDROID_RUNTIME_NAME}@${runtimeVersion}`, { version_info: true });
352
340
  output = (_a = output === null || output === void 0 ? void 0 : output["version_info"]) !== null && _a !== void 0 ? _a : output;
353
341
  if (!output) {
354
- /**
355
- * fallback to the old 'gradle' key in package.json
356
- *
357
- * format:
358
- *
359
- * gradle: { version: '6.4', android: '3.6.4' }
360
- *
361
- */
362
342
  output = yield this.$packageManager.view(`${constants_1.SCOPED_ANDROID_RUNTIME_NAME}@${runtimeVersion}`, { gradle: true });
363
343
  output = (_b = output === null || output === void 0 ? void 0 : output["gradle"]) !== null && _b !== void 0 ? _b : output;
364
344
  const { version, android } = output;
365
- // covert output to the new format...
366
345
  output = {
367
346
  gradle: version,
368
347
  gradleAndroid: android,
@@ -435,10 +414,6 @@ class AndroidPluginBuildService {
435
414
  this.$errors.fail(`No built aar found at ${pathToBuiltAar}`);
436
415
  }
437
416
  }
438
- /**
439
- * @param {Object} options
440
- * @param {string} options.platformsAndroidDirPath - The path to the 'plugin/src/platforms/android' directory.
441
- */
442
417
  migrateIncludeGradle(options) {
443
418
  this.validatePlatformsAndroidDirPathOption(options);
444
419
  const includeGradleFilePath = path.join(options.platformsAndroidDirPath, constants_1.INCLUDE_GRADLE_NAME);
@@ -498,12 +473,16 @@ class AndroidPluginBuildService {
498
473
  if (this.$logger.getLevel() === "INFO") {
499
474
  localArgs.push("--quiet");
500
475
  }
476
+ const opts = {
477
+ cwd: pluginBuildSettings.pluginDir,
478
+ stdio: "inherit",
479
+ shell: this.$hostInfo.isWindows,
480
+ };
481
+ if (this.$options.nativeHost) {
482
+ opts.env = Object.assign({ USER_PROJECT_PLATFORMS_ANDROID: path.resolve((0, process_1.cwd)(), this.$options.nativeHost) }, process.env);
483
+ }
501
484
  try {
502
- yield this.$childProcess.spawnFromEvent(gradlew, localArgs, "close", {
503
- cwd: pluginBuildSettings.pluginDir,
504
- stdio: "inherit",
505
- shell: this.$hostInfo.isWindows,
506
- });
485
+ yield this.$childProcess.spawnFromEvent(gradlew, localArgs, "close", opts);
507
486
  }
508
487
  catch (err) {
509
488
  this.$errors.fail(`Failed to build plugin ${pluginBuildSettings.pluginName} : \n${err}`);
@@ -544,4 +523,3 @@ __decorate([
544
523
  ], AndroidPluginBuildService.prototype, "buildPlugin", null);
545
524
  exports.AndroidPluginBuildService = AndroidPluginBuildService;
546
525
  yok_1.injector.register("androidPluginBuildService", AndroidPluginBuildService);
547
- //# sourceMappingURL=android-plugin-build-service.js.map