Skip to content

Replace plugin variables in all Android .xml files #1633

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
Mar 22, 2016

Conversation

rosen-vladimirov
Copy link
Contributor

In case a plugin has plugin variable, during project preparation CLI replaces the usage of the variable in plugin's AndroidManifest with the value set in the current project's package.json.
This is not enough, we have to set the variables in all plugin's .xml files, so the value could be used in resource and later read from the JAVA code.
Enumarate plugin's files and replace plugin variables in all .xml files.

#1634

@rosen-vladimirov
Copy link
Contributor Author

run ci

if (this.$fs.exists(pluginConfigurationFilePath).wait()) {
this.$pluginVariablesService.interpolate(pluginData, pluginConfigurationFilePath).wait();
}
let files = this.$fs.enumerateFilesInDirectorySync(resourcesDestinationDirectoryPath, file => this.$fs.getFsStats(file).wait().isDirectory() || path.extname(file) === ".xml");
Copy link
Contributor

Choose a reason for hiding this comment

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

You can extract ".xml" as a constant as it's also used in xml-validator

In case a plugin has plugin variable, during project preparation CLI replaces the usage of the variable in plugin's AndroidManifest with the value set in the current project's package.json.
This is not enough, we have to set the variables in all plugin's .xml files, so the value could be used in resource and later read from the JAVA code.
Enumarate plugin's files and replace plugin variables in all .xml files.
@rosen-vladimirov rosen-vladimirov force-pushed the vladimirov/interpolate-all-android-files branch from 869bd74 to d30b2ff Compare March 22, 2016 12:20
@Mitko-Kerezov
Copy link
Contributor

👍

@rosen-vladimirov
Copy link
Contributor Author

run ci

rosen-vladimirov added a commit that referenced this pull request Mar 22, 2016
…-android-files

Replace plugin variables in all Android .xml files
@rosen-vladimirov rosen-vladimirov merged commit 8b59feb into release Mar 22, 2016
@rosen-vladimirov rosen-vladimirov deleted the vladimirov/interpolate-all-android-files branch March 22, 2016 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants