Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export var LIVESYNC_EXCLUDED_DIRECTORIES = ["app_resources"];
export var TESTING_FRAMEWORKS = ['jasmine', 'mocha', 'qunit'];
export let TEST_RUNNER_NAME = "nativescript-unit-test-runner";
export let LIVESYNC_EXCLUDED_FILE_PATTERNS = ["**/*.js.map", "**/*.ts"];
export let XML_FILE_EXTENSION = ".xml";

export class ReleaseType {
static MAJOR = "major";
Expand Down
9 changes: 5 additions & 4 deletions lib/services/android-project-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -327,10 +327,11 @@ export class AndroidProjectService extends projectServiceBaseLib.PlatformProject
this.$fs.ensureDirectoryExists(resourcesDestinationDirectoryPath).wait();
shell.cp("-Rf", path.join(pluginPlatformsFolderPath, "*"), resourcesDestinationDirectoryPath);

let pluginConfigurationFilePath = path.join(resourcesDestinationDirectoryPath, this.platformData.configurationFileName);
if (this.$fs.exists(pluginConfigurationFilePath).wait()) {
this.$pluginVariablesService.interpolate(pluginData, pluginConfigurationFilePath).wait();
}
(this.$fs.enumerateFilesInDirectorySync(resourcesDestinationDirectoryPath, file => this.$fs.getFsStats(file).wait().isDirectory() || path.extname(file) === constants.XML_FILE_EXTENSION) || [])
.forEach(file => {
this.$logger.trace(`Interpolate data for plugin file: ${file}`);
this.$pluginVariablesService.interpolate(pluginData, file).wait();
});
}

// Copy include.gradle file
Expand Down
3 changes: 2 additions & 1 deletion lib/xml-validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"use strict";

import { EOL } from "os";
import * as constants from "./constants";

export class XmlValidator implements IXmlValidator {
constructor(private $fs: IFileSystem,
Expand All @@ -11,7 +12,7 @@ export class XmlValidator implements IXmlValidator {
return (() => {
let xmlHasErrors = false;
sourceFiles
.filter(file => _.endsWith(file, ".xml"))
.filter(file => _.endsWith(file, constants.XML_FILE_EXTENSION))
.forEach(file => {
let errorOutput = this.getXmlFileErrors(file).wait();
let hasErrors = !!errorOutput;
Expand Down