Skip to content

fix: values-v<sdk> directories are not prepared correctly #5121

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

Merged
merged 1 commit into from
Nov 11, 2019

Conversation

rosen-vladimirov
Copy link
Contributor

In Android's resources you can have different values-v<sdk version> directories which are used at runtime to differentiate resources for API levels.
In CLI we had a logic to include in native build only the values-v<sdk version> directories which are equal or lower to the SDK used for building the application.
This means that if you are using compileSdk 28, but you have values-v29 directory in your resources it shouldn't be included in the native build.

Due to many changes in the structure of App_Resources/Android and the gradle template in NativeScript 4.0, this logic has been broken.
Fix it and execute it on every prepare of App_Resources.

PR Checklist

What is the current behavior?

What is the new behavior?

CLI prepares values-v directories based on the current compileSdk

Fixes issue #5120

In Android's resources you can have different `values-v<sdk version>` directories which are used at runtime to differentiate resources for API levels.
In CLI we had a logic to include in native build only the `values-v<sdk version>` directories which are equal or lower to the SDK used for building the application.
This means that if you are using compileSdk 28, but you have `values-v29` directory in your resources it shouldn't be included in the native build.

Due to many changes in the structure of App_Resources/Android and the gradle template in NativeScript 4.0, this logic has been broken.
Fix it and execute it on every prepare of App_Resources.
@rosen-vladimirov rosen-vladimirov self-assigned this Nov 8, 2019
@cla-bot cla-bot bot added the cla: yes label Nov 8, 2019
@rosen-vladimirov
Copy link
Contributor Author

test cli-templates cli-run cli-smoke

@miroslavaivanova
Copy link
Contributor

test cli-run

@miroslavaivanova
Copy link
Contributor

test cli-templates

1 similar comment
@miroslavaivanova
Copy link
Contributor

test cli-templates

@rosen-vladimirov
Copy link
Contributor Author

merging as failing test is not caused by this PR

@rosen-vladimirov rosen-vladimirov merged commit dc65d52 into release Nov 11, 2019
@rosen-vladimirov rosen-vladimirov deleted the vladimirov/fix-values-filtering branch November 11, 2019 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants