Fix Windows and Linux plugin template filenames (#66997)
This commit is contained in:
@@ -166,6 +166,7 @@ class Template {
|
||||
final String projectName = context['projectName'] as String;
|
||||
final String androidIdentifier = context['androidIdentifier'] as String;
|
||||
final String pluginClass = context['pluginClass'] as String;
|
||||
final String pluginClassSnakeCase = context['pluginClassSnakeCase'] as String;
|
||||
final String destinationDirPath = destination.absolute.path;
|
||||
final String pathSeparator = _fileSystem.path.separator;
|
||||
String finalDestinationPath = _fileSystem.path
|
||||
@@ -181,6 +182,10 @@ class Template {
|
||||
if (projectName != null) {
|
||||
finalDestinationPath = finalDestinationPath.replaceAll('projectName', projectName);
|
||||
}
|
||||
// This must be before the pluginClass replacement step.
|
||||
if (pluginClassSnakeCase != null) {
|
||||
finalDestinationPath = finalDestinationPath.replaceAll('pluginClassSnakeCase', pluginClassSnakeCase);
|
||||
}
|
||||
if (pluginClass != null) {
|
||||
finalDestinationPath = finalDestinationPath.replaceAll('pluginClass', pluginClass);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user