MCPcopy
hub / github.com/ionic-team/capacitor / replaceFrameworkVariables

Function replaceFrameworkVariables

cli/src/android/update.ts:386–397  ·  view source on GitHub ↗
(config: Config, prefsArray: any[], frameworkString: string)

Source from the content-addressed store, hash-verified

384}
385
386async function replaceFrameworkVariables(config: Config, prefsArray: any[], frameworkString: string) {
387 const variablesGradle = await getVariablesGradleFile(config);
388 prefsArray.map((preference: any) => {
389 if (!variablesGradle.includes(preference.$.name)) {
390 frameworkString = frameworkString.replace(
391 new RegExp(('$' + preference.$.name).replace('$', '\\$&'), 'g'),
392 preference.$.default,
393 );
394 }
395 });
396 return frameworkString;
397}

Callers 2

installGradlePluginsFunction · 0.70

Calls 1

getVariablesGradleFileFunction · 0.85

Tested by

no test coverage detected