Skip to content

Commit fddabef

Browse files
authored
Merge pull request #1869 from NativeScript/drawable-code
drawable code removed
2 parents 26cb929 + 5f8caf0 commit fddabef

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

lib/services/android-project-service.ts

-20
Original file line numberDiff line numberDiff line change
@@ -255,26 +255,6 @@ export class AndroidProjectService extends projectServiceBaseLib.PlatformProject
255255
public buildProject(projectRoot: string, buildConfig?: IBuildConfig): IFuture<void> {
256256
return (() => {
257257
if (this.canUseGradle().wait()) {
258-
259-
// Validate App_Resources drawable resources accoring to the official docs: https://developer.android.com/guide/topics/resources/providing-resources.html
260-
let drawableFilePrefix = "drawable-";
261-
let drawableRTLPrefix = "ldrtl-";
262-
let drawableLTRPrefix = "ldltr-";
263-
let allowedDrawables = ["ldpi", "mdpi", "hdpi", "xhdpi", "xxhdpi", "xxxhdpi", "nodpi", "tvdpi"];
264-
let appSourceDirectoryPath = path.join(this.$projectData.projectDir, constants.APP_FOLDER_NAME);
265-
let sourceAppResourcesDirectoryPath = path.join(appSourceDirectoryPath, constants.APP_RESOURCES_FOLDER_NAME, this.$devicePlatformsConstants.Android);
266-
267-
if (this.$fs.exists(sourceAppResourcesDirectoryPath).wait()) {
268-
this.$fs.enumerateFilesInDirectorySync(sourceAppResourcesDirectoryPath, (file: string, stat: IFsStats) => {
269-
if (stat.isDirectory() && (file.indexOf(drawableFilePrefix) !== -1) &&
270-
allowedDrawables.indexOf(path.basename(file).replace(drawableFilePrefix, "").replace(drawableRTLPrefix, "").replace(drawableLTRPrefix, "")) === -1) {
271-
this.$errors.failWithoutHelp(`Invalid Android drawable resource folder detected: ${file}. Please check your ${constants.APP_RESOURCES_FOLDER_NAME} folder.`);
272-
return false;
273-
}
274-
return true;
275-
});
276-
}
277-
278258
let buildOptions = this.getBuildOptions();
279259
buildOptions.unshift("buildapk");
280260

0 commit comments

Comments
 (0)