Skip to content

CLI generates aar files on changes in app/ (livesync with webpack) #3707

Closed
@sis0k0

Description

@sis0k0

Please, provide the details below:

Did you verify this is a real problem by searching the NativeScript Forum and the other open issues in this repo?

👍

Tell us about the problem

Setup:

Application with at least one plugin that requires the CLI to generate an .aar file. For example - the sdk samples that use the nativescript-camera plugin.

Command:

tns run android --bundle

Behavior

When you change a file in the app/ folder:

  1. Webpack detects the change and recompiles the JS bundles (for example, bundle.js or vendor.js).
  2. The CLI regenerates all aar files.
  3. The changed JS bundle are deployed on the device and the app is restarted.

Expected behavior

The second step is not needed and slows down the sync of the app. The CLI shouldn't regenerate aar files on changes in the app/ folder.

Why does this happen?

There are a couple of obsolete checks for the --bundle flag that cause the CLI to trigger the rebuilding of aar files every time there's a change in the project.

Which platform(s) does your issue occur on?

Android

Please provide the following version numbers that your issue occurs with:

  • CLI: 4.2.0-2018-06-26-11829 (the same thing happens with the official version - 4.1.2)

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions