1 line
2.3 KiB
Plaintext
1 line
2.3 KiB
Plaintext
![]() |
{"version":3,"file":"AndroidManifest.xml.js","sourceRoot":"","sources":["../../src/android/AndroidManifest.xml.ts"],"names":[],"mappings":";;;;;AAAA,gDAAwB;AAGxB,0DAAkF;AAElF,MAAM,8BAA8B,GAAG,uBAAuB,CAAC;AAE/D,SAAS,wBAAwB,CAAC,GAAY;IAC5C,MAAM,MAAM,GAAG,mCAAgB,CAAC,GAAG,EAAE;QACnC,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,UAAU;gBAChB,QAAQ,EAAE;oBACR;wBACE,IAAI,EAAE,aAAa;wBACnB,UAAU,EAAE;4BACV,cAAc,EAAE,kBAAkB;yBACnC;wBACD,QAAQ,EAAE;4BACR;gCACE,IAAI,EAAE,UAAU;gCAChB,UAAU,EAAE;oCACV,cAAc,EAAE,eAAe;oCAC/B,eAAe,EAAE;wCACf,QAAQ,EAAE,+BAA+B;qCAC1C;iCACF;6BACF;yBACF;qBACF;iBACF;aACF;SACF;KACF,CAAC,CAAC;IACH,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;GAEG;AACY,KAAK,UAAU,2BAA2B,CAAC,eAAuB;IAC/E,MAAM,QAAQ,GAAG,cAAI,CAAC,OAAO,CAAC,eAAe,EAAE,8BAA8B,CAAC,CAAC;IAC/E,MAAM,UAAU,GAAG,MAAM,8BAAW,CAAC,QAAQ,CAAC,CAAC;IAC/C,MAAM,oBAAoB,GAAG,wBAAwB,CAAC,UAAU,CAAC,CAAC;IAClE,MAAM,+BAAY,CAAC,QAAQ,EAAE,oBAAoB,CAAC,CAAC;AACrD,CAAC;AALD,8CAKC","sourcesContent":["import path from 'path';\nimport { Element } from 'xml-js';\n\nimport { readXmlFile, writeXmlFile, mergeXmlElements } from '../xml-manipulation';\n\nconst ANDROID_MANIFEST_XML_FILE_PATH = './AndroidManifest.xml';\n\nfunction configureAndroidManifest(xml: Element): Element {\n const result = mergeXmlElements(xml, {\n elements: [\n {\n name: 'manifest',\n elements: [\n {\n name: 'application',\n attributes: {\n 'android:name': '.MainApplication',\n },\n elements: [\n {\n name: 'activity',\n attributes: {\n 'android:name': '.MainActivity',\n 'android:theme': {\n newValue: '@style/Theme.App.SplashScreen',\n },\n },\n },\n ],\n },\n ],\n },\n ],\n });\n return result;\n}\n\n/**\n * @param androidMainPath Path to the main directory containing code and resources in Android project. In general that would be `android/app/src/main`.\n */\nexport default async function configureAndroidManifestXml(androidMainPath: string) {\n const filePath = path.resolve(androidMainPath, ANDROID_MANIFEST_XML_FILE_PATH);\n const xmlContent = await readXmlFile(filePath);\n const configuredXmlContent = configureAndroidManifest(xmlContent);\n await writeXmlFile(filePath, configuredXmlContent);\n}\n"]}
|