|
1 | 1 | import * as path from "path";
|
2 | 2 | import { MANIFEST_FILE_NAME, INCLUDE_GRADLE_NAME, ASSETS_DIR, RESOURCES_DIR } from "../constants";
|
| 3 | +import { getShortPluginName } from "../common/helpers"; |
3 | 4 | import { Builder, parseString } from "xml2js";
|
4 | 5 | import { ILogger } from "log4js";
|
5 | 6 |
|
@@ -37,10 +38,6 @@ export class AndroidPluginBuildService implements IAndroidPluginBuildService {
|
37 | 38 | return this.$fs.exists(manifest) ? manifest : null;
|
38 | 39 | }
|
39 | 40 |
|
40 |
| - private getShortPluginName(pluginName: string): string { |
41 |
| - return pluginName.replace(/[\-]/g, "_"); |
42 |
| - } |
43 |
| - |
44 | 41 | private async updateManifestContent(oldManifestContent: string, defaultPackageName: string): Promise<string> {
|
45 | 42 | let xml: any = await this.getXml(oldManifestContent);
|
46 | 43 |
|
@@ -164,7 +161,7 @@ export class AndroidPluginBuildService implements IAndroidPluginBuildService {
|
164 | 161 | // IDEA: apply app.gradle here in order to get any and all user-defined variables
|
165 | 162 | // IDEA: apply the entire include.gradle here instead of copying over the repositories {} and dependencies {} scopes
|
166 | 163 |
|
167 |
| - const shortPluginName = this.getShortPluginName(options.pluginName); |
| 164 | + const shortPluginName = getShortPluginName(options.pluginName); |
168 | 165 | const newPluginDir = path.join(options.tempPluginDirPath, shortPluginName);
|
169 | 166 | const newPluginMainSrcDir = path.join(newPluginDir, "src", "main");
|
170 | 167 | const defaultPackageName = "org.nativescript." + shortPluginName;
|
|
0 commit comments