Skip to content

[@next] CLI does not handle platform specific files #2586

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dtopuzov opened this issue Mar 7, 2017 · 2 comments
Closed

[@next] CLI does not handle platform specific files #2586

dtopuzov opened this issue Mar 7, 2017 · 2 comments
Assignees
Milestone

Comments

@dtopuzov
Copy link
Contributor

dtopuzov commented Mar 7, 2017

Steps to reproduce:

tns create TestApp
tns prepare android --path TestApp -> everything is ok
edit some file, for example TestApp/app/main-view-model.js (repalace 42 with 50).
tns prepare android --path TestApp -> platform specific files are there.

Files like <modules folder>/application/application.android.js and <modules folder>/application/application.ios.js are not processed.

Caused by this commit:
a008db1

dtopuzov pushed a commit to NativeScript/nativescript-cli-tests that referenced this issue Mar 7, 2017
@rosen-vladimirov
Copy link
Contributor

@dtopuzov please provide more information as I'm unable to reproduce the issue with both latest master and @next version of CLI:

$ ../bin/tns create TestApp
Installing  tns-template-hello-world
D:\Rosen\Work\temp\nativescript-cli\scratch\TestApp
`-- [email protected]
  `-- [email protected]


D:\Rosen\Work\temp\nativescript-cli\scratch\TestApp
`-- [email protected]
  `-- [email protected]



> [email protected] postinstall D:\Rosen\Work\temp\nativescript-cli\scratch\TestApp\node_modules\nativescript-dev-android-snapshot
> node postinstall.js

D:\Rosen\Work\temp\nativescript-cli\scratch\TestApp
`-- [email protected]
  +-- [email protected]
  +-- [email protected]
  | +-- [email protected]
  | | +-- [email protected]
  | | | `-- [email protected]
  | | +-- [email protected]
  | | +-- [email protected]
  | | | `-- [email protected]
  | | |   +-- [email protected]
  | | |   `-- [email protected]
  | | +-- [email protected]
  | | `-- [email protected]
  | `-- [email protected]
  |   `-- [email protected]
  +-- [email protected]
  `-- [email protected]


Project TestApp was successfully created.

$ ../bin/tns prepare android --path TestApp
Copying template files...
  - Installing tns-androidInstalling  tns-android
D:\Rosen\Work\temp\nativescript-cli\scratch\TestApp
`-- [email protected] roid


  extract:babel-types -> gu | |#####################################################################################################################################################################--------------------------------------------Installing tns-androidextract:babel-traverse -> - |#####################################################################################################################################################################------------------------- extract:babel-runtime ->  | |########################################################################################################################################################################-----------------------------------------
  - Installing tns-androidD:\Rosen\Work\temp\nativescript-cli\scratch\TestApp
`-- [email protected] d
  +-- [email protected]
  | +-- [email protected]
  | | +-- [email protected]
  | | +-- [email protected]
  | | +-- [email protected]
  | | | `-- [email protected]
  | | +-- [email protected]
  | | `-- [email protected]
  | +-- [email protected]
  | `-- [email protected]
  +-- [email protected]
  | `-- [email protected]
  |   +-- [email protected]
  |   `-- [email protected]
  +-- [email protected]
  | `-- [email protected]
  +-- [email protected]
  | +-- [email protected]
  | +-- [email protected]
  | `-- [email protected]
  +-- [email protected]
  +-- [email protected]
  | `-- [email protected]
  +-- [email protected]
  +-- [email protected]
  | `-- [email protected]
  +-- [email protected]
  `-- [email protected]
    `-- [email protected]
      `-- [email protected]


  [email protected] node_modules\regenerator-runtime -> node_modules\babel-messages\node_modules\babel-runtime\node_modules\regenerator-runtime
\ Installing tns-android- [email protected] node_modules\babel-types\node_modules\babel-runtime
- [email protected] node_modules\babel-types\node_modules\lodash
D:\Rosen\Work\temp\nativescript-cli\scratch\TestApp
`-- [email protected]


D:\Rosen\Work\temp\nativescript-cli\scratch\TestApp
`-- [email protected] -android


D:\Rosen\Work\temp\nativescript-cli\scratch\TestApp
`-- [email protected] ns-android


Project successfully created.
Executing before-prepare hook from D:\Rosen\Work\temp\nativescript-cli\scratch\TestApp\hooks\before-prepare\nativescript-dev-android-snapshot.js
Preparing project...

:config phase:  createDefaultIncludeFiles

:config phase:  copyAarDependencies

:config phase:  addAarDependencies
        +adding dependency: D:\Rosen\Work\temp\nativescript-cli\scratch\TestApp\platforms\android\libs\aar\widgets-release.aar
Incremental java compilation is an incubating feature.
:asbg:clean UP-TO-DATE
:deleteMetadata
:deleteFlavors
:deleteConfigurations UP-TO-DATE
:clean

BUILD SUCCESSFUL

Total time: 9.404 secs
Successfully prepared plugin nativescript-theme-core for android.
Successfully prepared plugin tns-core-modules for android.
Successfully prepared plugin tns-core-modules-widgets for android.
process platform specific files will be called for directoryPath:  D:\Rosen\Work\temp\nativescript-cli\scratch\TestApp\platforms\android\src\main\assets\app   platform:  android   excludedDirs:  [ 'App_Resources', 'tns_modules' ]
Project successfully prepared (android)
Executing after-prepare hook from D:\Rosen\Work\temp\nativescript-cli\scratch\TestApp\hooks\after-prepare\nativescript-dev-android-snapshot.js

$ ls -l TestApp/platforms/android/src/main/assets/app/tns_modules/tns-core-modules/application/
total 17
-rw-r--r-- 1 rosen 197609  3642 Mar  7 23:15 application-common.js
-rw-r--r-- 1 rosen 197609 11203 Mar  7 23:15 application.js
-rw-r--r-- 1 rosen 197609    74 Mar  7 23:15 package.json

As you can see, I've tried the steps you've provided and there's not application.android.js on my side.

@Plamen5kov
Copy link
Contributor

steps to reproduce:
cli -> 3.0.0 master

tns create cliapp && cd cliapp
tns platform add android@next
tns build android
modify "app/App_Resources/Android/AndroidManifest.xml" minSdkVersion or whatever
tns prepare android

after the last prepare:
ls -la platforms/android/src/main/assets/app/tns_modules/tns-core-modules/application
result:

-rw-r--r--.  1 plamen5kov plamen5kov 11211 Mar  8 17:02 application.android.js
-rw-r--r--.  1 plamen5kov plamen5kov  3642 Mar  8 17:02 application-common.js
-rw-r--r--.  1 plamen5kov plamen5kov 10994 Mar  8 17:02 application.ios.js
-rw-r--r--.  1 plamen5kov plamen5kov 11203 Mar  8 17:01 application.js
-rw-r--r--.  1 plamen5kov plamen5kov    74 Mar  8 17:02 package.json

dtopuzov pushed a commit to NativeScript/nativescript-cli-tests that referenced this issue Mar 8, 2017
@Plamen5kov Plamen5kov self-assigned this Mar 9, 2017
Plamen5kov added a commit that referenced this issue Mar 9, 2017
@Plamen5kov Plamen5kov added this to the 3.0.0-RC milestone Mar 9, 2017
Plamen5kov added a commit that referenced this issue Mar 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants