(config: Config)
| 48 | } |
| 49 | |
| 50 | async function checkAndroidManifestFile(config: Config): Promise<string | null> { |
| 51 | const manifestFileName = 'AndroidManifest.xml'; |
| 52 | const manifestFilePath = join(config.android.srcMainDirAbs, manifestFileName); |
| 53 | |
| 54 | if (!(await pathExists(manifestFilePath))) { |
| 55 | return `${c.strong(manifestFileName)} is missing in ${c.strong(config.android.srcMainDir)}`; |
| 56 | } |
| 57 | |
| 58 | try { |
| 59 | const xmlData = await readXML(manifestFilePath); |
| 60 | return checkAndroidManifestData(config, xmlData); |
| 61 | } catch (e: any) { |
| 62 | return e; |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | async function checkAndroidManifestData(config: Config, xmlData: any): Promise<string | null> { |
| 67 | const manifestNode: any = xmlData.manifest; |
no test coverage detected