★ wanayoo — archive 1999 https://github.com/NativeScript/android-runtime/issues/1589Nouvelle recherche | Portail wanayoo
Skip to content
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

[metadata] not rebuilding on json api usage change #1589

Open
farfromrefug opened this issue Feb 16, 2020 · 3 comments
Open

[metadata] not rebuilding on json api usage change #1589

farfromrefug opened this issue Feb 16, 2020 · 3 comments
Assignees
Projects

Comments

@farfromrefug
Copy link

@farfromrefug farfromrefug commented Feb 16, 2020

i am starting to include native-api-usage.json in my app.
Right now i need to run to see what s being used, update the file, run again.
My issue is that the rebuild of metadata is not triggered on native-api-usage.json, so i need to remove the platforms folder and start again which is slow.

Could you add that feature?
Thanks

@rosen-vladimirov rosen-vladimirov transferred this issue from NativeScript/nativescript-cli Feb 19, 2020
@rosen-vladimirov
Copy link
Contributor

@rosen-vladimirov rosen-vladimirov commented Feb 19, 2020

Hey @farfromrefug ,
I've transferred this issue to android-runtime repository as the problem is only for Android. NativeScript CLI detects the change in the native-api-usage.json file and triggers native build, but it seems some of the gradle tasks are not executed in this case.
Steps to reproduce:

tns create myApp --js
cd myApp
touch app/App_Resources/Android/native-api-usage.json
echo '{ "whitelist":["java.util:List"] }' > app/App_Resources/Android/native-api-usage.json
tns run android --justlaunch # app will fail at runtime
echo '{ }' > app/App_Resources/Android/native-api-usage.json
tns run android --justlaunch # app should work, but it still fails at runtime
rm -rf platforms
tns run android --justlaunch # app will work

NOTE: The issue will be reproduced even if you use tns run android and change the native-api-usage.json file.

@farfromrefug
Copy link
Author

@farfromrefug farfromrefug commented Feb 19, 2020

@rosen-vladimirov exactly what i am seeing!
Thanks

@vmutafov
Copy link
Contributor

@vmutafov vmutafov commented Feb 19, 2020

I made a simple change in the build.gradle of the apps and this should do the trick to run the buildMetadata task. I linked a PR here. I'll test it properly tomorrow as it's getting late now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
CLI Team
  
Inbox
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.