Skip to content

Commit 657f6f4

Browse files
petekanevPlamen5kov
authored andcommitted
fix(plugin-build): strip npm scope names from android plugin names
1 parent b073e8a commit 657f6f4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/services/android-plugin-build-service.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,12 @@ export class AndroidPluginBuildService implements IAndroidPluginBuildService {
3838
}
3939

4040
private getShortPluginName(pluginName: string): string {
41-
return pluginName.replace(/[\-]/g, "_");
41+
return this.sanitizePluginName(pluginName).replace(/[\-]/g, "_");
42+
}
43+
44+
private sanitizePluginName(pluginName: string): string {
45+
// avoid long plugin names, exclude the npm module scope (@scope/nativescript-plugin) from the android plugin name
46+
return pluginName.split("/").pop();
4247
}
4348

4449
private async updateManifestContent(oldManifestContent: string, defaultPackageName: string): Promise<string> {

0 commit comments

Comments
 (0)