Skip to content

Validate drawable resources before building anything #1830

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
Jun 13, 2016

Conversation

enchev
Copy link
Contributor

@enchev enchev commented Jun 10, 2016

Second attempt to fix #1296 :(

The result:
untitled

@enchev enchev force-pushed the validate-android-drawable-resources branch 2 times, most recently from 6cffa50 to 61b8c26 Compare June 10, 2016 10:43
let drawableFilePrefix = "drawable-";
let allowedDrawables = ["ldpi", "mdpi", "hdpi", "xhdpi", "xxhdpi", "xxxhdpi", "nodpi", "tvdpi"];
let appSourceDirectoryPath = path.join(this.$projectData.projectDir, constants.APP_FOLDER_NAME);
let sourceAppResourcesDirectoryPath = path.join(appSourceDirectoryPath, constants.APP_RESOURCES_FOLDER_NAME);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't something missing here - the path will be <project dir>/app/App_Resources, while in fact you need Android dir if I'm not mistaken. Later you are using enumerateFilesInDirectorySync which will include all files from App_Resources, so you'll evalute any files/directories inside iOS dir as well.

I suggest adding Android platform in the path:

let sourceAppResourcesDirectoryPath = path.join(appSourceDirectoryPath, constants.APP_RESOURCES_FOLDER_NAME, this.$devicePlatformsConstants.Android);

@enchev enchev force-pushed the validate-android-drawable-resources branch from 61b8c26 to 5b90a4e Compare June 10, 2016 14:15
@rosen-vladimirov
Copy link
Contributor

👍

@enchev enchev merged commit fb0bb15 into master Jun 13, 2016
@enchev enchev deleted the validate-android-drawable-resources branch June 13, 2016 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tns build breaks permanately if you have drawable-invalid name
2 participants