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

Function kotlinNeededCheck

cli/src/android/update.ts:306–323  ·  view source on GitHub ↗
(config: Config, cordovaPlugins: Plugin[])

Source from the content-addressed store, hash-verified

304}
305
306async function kotlinNeededCheck(config: Config, cordovaPlugins: Plugin[]) {
307 if (config.app.extConfig.cordova?.preferences?.GradlePluginKotlinEnabled !== 'true') {
308 for (const plugin of cordovaPlugins) {
309 const androidPlatform = getPluginPlatform(plugin, platform);
310 const sourceFiles = androidPlatform['source-file'];
311 if (sourceFiles) {
312 for (const srcFile of sourceFiles) {
313 if (/^.*\.kt$/.test(srcFile['$'].src)) {
314 return true;
315 }
316 }
317 }
318 }
319 return false;
320 } else {
321 return true;
322 }
323}
324
325async function copyPluginsNativeFiles(config: Config, cordovaPlugins: Plugin[]) {
326 const pluginsPath = join(config.android.cordovaPluginsDirAbs, 'src', 'main');

Callers 1

Calls 1

getPluginPlatformFunction · 0.90

Tested by

no test coverage detected