@expo/prebuild-config 55.0.3 → 55.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,6 @@
1
1
  import { ConfigPlugin, ExportedConfigWithProps, AndroidConfig } from '@expo/config-plugins';
2
2
  import { type ExpoConfig } from '@expo/config-types';
3
3
  export type ResourceXMLConfig = ExportedConfigWithProps<AndroidConfig.Resources.ResourceXML>;
4
- export type GradlePropertiesConfig = ExportedConfigWithProps<AndroidConfig.Properties.PropertiesItem[]>;
5
4
  export declare const withEdgeToEdge: ConfigPlugin;
6
5
  export declare function applyEdgeToEdge(config: ExpoConfig): ExpoConfig;
7
6
  export default withEdgeToEdge;
@@ -5,16 +5,9 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.applyEdgeToEdge = applyEdgeToEdge;
7
7
  exports.withEdgeToEdge = exports.default = void 0;
8
- function _withConfigureEdgeToEdgeEnforcement() {
9
- const data = require("./withConfigureEdgeToEdgeEnforcement");
10
- _withConfigureEdgeToEdgeEnforcement = function () {
11
- return data;
12
- };
13
- return data;
14
- }
15
- function _withEdgeToEdgeEnabledGradleProperties() {
16
- const data = require("./withEdgeToEdgeEnabledGradleProperties");
17
- _withEdgeToEdgeEnabledGradleProperties = function () {
8
+ function _configPlugins() {
9
+ const data = require("@expo/config-plugins");
10
+ _configPlugins = function () {
18
11
  return data;
19
12
  };
20
13
  return data;
@@ -39,13 +32,9 @@ const withEdgeToEdge = config => {
39
32
  };
40
33
  exports.withEdgeToEdge = withEdgeToEdge;
41
34
  function applyEdgeToEdge(config) {
42
- config = (0, _withEdgeToEdgeEnabledGradleProperties().withEdgeToEdgeEnabledGradleProperties)(config, {
43
- edgeToEdgeEnabled: true
44
- });
45
- // Enable/disable edge-to-edge enforcement
46
- config = (0, _withConfigureEdgeToEdgeEnforcement().withConfigureEdgeToEdgeEnforcement)(config, {
47
- disableEdgeToEdgeEnforcement: false
48
- });
35
+ if ('edgeToEdgeEnabled' in (config.android ?? {})) {
36
+ _configPlugins().WarningAggregator.addWarningAndroid(TAG, '`edgeToEdgeEnabled` customization is no longer available - Android 16 makes edge-to-edge mandatory. Remove the `edgeToEdgeEnabled` entry from your app.json/app.config.js.');
37
+ }
49
38
  config = (0, _withEnforceNavigationBarContrast().withEnforceNavigationBarContrast)(config, config.androidNavigationBar?.enforceContrast !== false);
50
39
 
51
40
  // We always restore the default theme in case the project has a leftover react-native-edge-to-edge theme from SDK 53.
@@ -1 +1 @@
1
- {"version":3,"file":"withEdgeToEdge.js","names":["_withConfigureEdgeToEdgeEnforcement","data","require","_withEdgeToEdgeEnabledGradleProperties","_withEnforceNavigationBarContrast","_withRestoreDefaultTheme","TAG","withEdgeToEdge","config","applyEdgeToEdge","exports","withEdgeToEdgeEnabledGradleProperties","edgeToEdgeEnabled","withConfigureEdgeToEdgeEnforcement","disableEdgeToEdgeEnforcement","withEnforceNavigationBarContrast","androidNavigationBar","enforceContrast","withRestoreDefaultTheme","_default","default"],"sources":["../../../../src/plugins/unversioned/edge-to-edge/withEdgeToEdge.ts"],"sourcesContent":["import {\n ConfigPlugin,\n ExportedConfigWithProps,\n WarningAggregator,\n AndroidConfig,\n} from '@expo/config-plugins';\nimport { type ExpoConfig } from '@expo/config-types';\n\nimport { withConfigureEdgeToEdgeEnforcement } from './withConfigureEdgeToEdgeEnforcement';\nimport { withEdgeToEdgeEnabledGradleProperties } from './withEdgeToEdgeEnabledGradleProperties';\nimport { withEnforceNavigationBarContrast } from './withEnforceNavigationBarContrast';\nimport { withRestoreDefaultTheme } from './withRestoreDefaultTheme';\n\nconst TAG = 'EDGE_TO_EDGE_PLUGIN';\n\nexport type ResourceXMLConfig = ExportedConfigWithProps<AndroidConfig.Resources.ResourceXML>;\nexport type GradlePropertiesConfig = ExportedConfigWithProps<\n AndroidConfig.Properties.PropertiesItem[]\n>;\n\nexport const withEdgeToEdge: ConfigPlugin = (config) => {\n return applyEdgeToEdge(config);\n};\n\nexport function applyEdgeToEdge(config: ExpoConfig): ExpoConfig {\n config = withEdgeToEdgeEnabledGradleProperties(config, { edgeToEdgeEnabled: true });\n // Enable/disable edge-to-edge enforcement\n config = withConfigureEdgeToEdgeEnforcement(config, {\n disableEdgeToEdgeEnforcement: false,\n });\n\n config = withEnforceNavigationBarContrast(\n config,\n config.androidNavigationBar?.enforceContrast !== false\n );\n\n // We always restore the default theme in case the project has a leftover react-native-edge-to-edge theme from SDK 53.\n // If they are using react-native-edge-to-edge config plugin it'll be reapplied later.\n return withRestoreDefaultTheme(config);\n}\n\nexport default withEdgeToEdge;\n"],"mappings":";;;;;;;AAQA,SAAAA,oCAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,mCAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,uCAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,sCAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,kCAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,iCAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,yBAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,wBAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,MAAMK,GAAG,GAAG,qBAAqB;AAO1B,MAAMC,cAA4B,GAAIC,MAAM,IAAK;EACtD,OAAOC,eAAe,CAACD,MAAM,CAAC;AAChC,CAAC;AAACE,OAAA,CAAAH,cAAA,GAAAA,cAAA;AAEK,SAASE,eAAeA,CAACD,MAAkB,EAAc;EAC9DA,MAAM,GAAG,IAAAG,8EAAqC,EAACH,MAAM,EAAE;IAAEI,iBAAiB,EAAE;EAAK,CAAC,CAAC;EACnF;EACAJ,MAAM,GAAG,IAAAK,wEAAkC,EAACL,MAAM,EAAE;IAClDM,4BAA4B,EAAE;EAChC,CAAC,CAAC;EAEFN,MAAM,GAAG,IAAAO,oEAAgC,EACvCP,MAAM,EACNA,MAAM,CAACQ,oBAAoB,EAAEC,eAAe,KAAK,KACnD,CAAC;;EAED;EACA;EACA,OAAO,IAAAC,kDAAuB,EAACV,MAAM,CAAC;AACxC;AAAC,IAAAW,QAAA,GAAAT,OAAA,CAAAU,OAAA,GAEcb,cAAc","ignoreList":[]}
1
+ {"version":3,"file":"withEdgeToEdge.js","names":["_configPlugins","data","require","_withEnforceNavigationBarContrast","_withRestoreDefaultTheme","TAG","withEdgeToEdge","config","applyEdgeToEdge","exports","android","WarningAggregator","addWarningAndroid","withEnforceNavigationBarContrast","androidNavigationBar","enforceContrast","withRestoreDefaultTheme","_default","default"],"sources":["../../../../src/plugins/unversioned/edge-to-edge/withEdgeToEdge.ts"],"sourcesContent":["import {\n ConfigPlugin,\n ExportedConfigWithProps,\n WarningAggregator,\n AndroidConfig,\n} from '@expo/config-plugins';\nimport { type ExpoConfig } from '@expo/config-types';\n\nimport { withEnforceNavigationBarContrast } from './withEnforceNavigationBarContrast';\nimport { withRestoreDefaultTheme } from './withRestoreDefaultTheme';\n\nconst TAG = 'EDGE_TO_EDGE_PLUGIN';\n\nexport type ResourceXMLConfig = ExportedConfigWithProps<AndroidConfig.Resources.ResourceXML>;\n\nexport const withEdgeToEdge: ConfigPlugin = (config) => {\n return applyEdgeToEdge(config);\n};\n\nexport function applyEdgeToEdge(config: ExpoConfig): ExpoConfig {\n if ('edgeToEdgeEnabled' in (config.android ?? {})) {\n WarningAggregator.addWarningAndroid(\n TAG,\n '`edgeToEdgeEnabled` customization is no longer available - Android 16 makes edge-to-edge mandatory. Remove the `edgeToEdgeEnabled` entry from your app.json/app.config.js.'\n );\n }\n\n config = withEnforceNavigationBarContrast(\n config,\n config.androidNavigationBar?.enforceContrast !== false\n );\n\n // We always restore the default theme in case the project has a leftover react-native-edge-to-edge theme from SDK 53.\n // If they are using react-native-edge-to-edge config plugin it'll be reapplied later.\n return withRestoreDefaultTheme(config);\n}\n\nexport default withEdgeToEdge;\n"],"mappings":";;;;;;;AAAA,SAAAA,eAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,cAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAQA,SAAAE,kCAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,iCAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,yBAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,wBAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,MAAMI,GAAG,GAAG,qBAAqB;AAI1B,MAAMC,cAA4B,GAAIC,MAAM,IAAK;EACtD,OAAOC,eAAe,CAACD,MAAM,CAAC;AAChC,CAAC;AAACE,OAAA,CAAAH,cAAA,GAAAA,cAAA;AAEK,SAASE,eAAeA,CAACD,MAAkB,EAAc;EAC9D,IAAI,mBAAmB,KAAKA,MAAM,CAACG,OAAO,IAAI,CAAC,CAAC,CAAC,EAAE;IACjDC,kCAAiB,CAACC,iBAAiB,CACjCP,GAAG,EACH,4KACF,CAAC;EACH;EAEAE,MAAM,GAAG,IAAAM,oEAAgC,EACvCN,MAAM,EACNA,MAAM,CAACO,oBAAoB,EAAEC,eAAe,KAAK,KACnD,CAAC;;EAED;EACA;EACA,OAAO,IAAAC,kDAAuB,EAACT,MAAM,CAAC;AACxC;AAAC,IAAAU,QAAA,GAAAR,OAAA,CAAAS,OAAA,GAEcZ,cAAc","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expo/prebuild-config",
3
- "version": "55.0.3",
3
+ "version": "55.0.4",
4
4
  "description": "Get the prebuild config",
5
5
  "main": "build/index.js",
6
6
  "scripts": {
@@ -40,11 +40,11 @@
40
40
  "expo-module-scripts": "^55.0.2"
41
41
  },
42
42
  "dependencies": {
43
- "@expo/config": "~55.0.3",
44
- "@expo/config-plugins": "~55.0.3",
45
- "@expo/config-types": "^55.0.3",
46
- "@expo/image-utils": "^0.8.11",
47
- "@expo/json-file": "^10.0.11",
43
+ "@expo/config": "~55.0.4",
44
+ "@expo/config-plugins": "~55.0.4",
45
+ "@expo/config-types": "^55.0.4",
46
+ "@expo/image-utils": "^0.8.12",
47
+ "@expo/json-file": "^10.0.12",
48
48
  "@react-native/normalize-colors": "0.83.1",
49
49
  "debug": "^4.3.1",
50
50
  "resolve-from": "^5.0.0",
@@ -54,5 +54,5 @@
54
54
  "publishConfig": {
55
55
  "access": "public"
56
56
  },
57
- "gitHead": "7d7f6762fc6907c27a329953c682134a84410dea"
57
+ "gitHead": "436ffb4355d5207f4a03fbc3568cd33424a40f3e"
58
58
  }
@@ -1,6 +0,0 @@
1
- import { ConfigPlugin } from '@expo/config-plugins';
2
- import { ResourceXMLConfig } from './withEdgeToEdge';
3
- export declare const withConfigureEdgeToEdgeEnforcement: ConfigPlugin<{
4
- disableEdgeToEdgeEnforcement: boolean;
5
- }>;
6
- export declare function configureEdgeToEdgeEnforcement(config: ResourceXMLConfig, disableEdgeToEdgeEnforcement: boolean): ResourceXMLConfig;
@@ -1,53 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.configureEdgeToEdgeEnforcement = configureEdgeToEdgeEnforcement;
7
- exports.withConfigureEdgeToEdgeEnforcement = void 0;
8
- function _configPlugins() {
9
- const data = require("@expo/config-plugins");
10
- _configPlugins = function () {
11
- return data;
12
- };
13
- return data;
14
- }
15
- const OPT_OUT_EDGE_TO_EDGE_ATTRIBUTE = 'android:windowOptOutEdgeToEdgeEnforcement';
16
- const withConfigureEdgeToEdgeEnforcement = (config, {
17
- disableEdgeToEdgeEnforcement
18
- }) => {
19
- return (0, _configPlugins().withAndroidStyles)(config, config => {
20
- return configureEdgeToEdgeEnforcement(config, disableEdgeToEdgeEnforcement);
21
- });
22
- };
23
- exports.withConfigureEdgeToEdgeEnforcement = withConfigureEdgeToEdgeEnforcement;
24
- function configureEdgeToEdgeEnforcement(config, disableEdgeToEdgeEnforcement) {
25
- const {
26
- style = []
27
- } = config.modResults.resources;
28
- const disableEdgeToEdgeEnforcementItem = {
29
- _: 'true',
30
- $: {
31
- name: OPT_OUT_EDGE_TO_EDGE_ATTRIBUTE,
32
- 'tools:targetApi': '35'
33
- }
34
- };
35
- const mainThemeIndex = style.findIndex(({
36
- $
37
- }) => $.name === 'AppTheme');
38
- if (mainThemeIndex === -1) {
39
- return config;
40
- }
41
- const existingItem = style[mainThemeIndex].item.filter(({
42
- $
43
- }) => $.name !== OPT_OUT_EDGE_TO_EDGE_ATTRIBUTE);
44
- if (disableEdgeToEdgeEnforcement) {
45
- existingItem.push(disableEdgeToEdgeEnforcementItem);
46
- }
47
- if (!config.modResults.resources.style) {
48
- return config;
49
- }
50
- config.modResults.resources.style[mainThemeIndex].item = existingItem;
51
- return config;
52
- }
53
- //# sourceMappingURL=withConfigureEdgeToEdgeEnforcement.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"withConfigureEdgeToEdgeEnforcement.js","names":["_configPlugins","data","require","OPT_OUT_EDGE_TO_EDGE_ATTRIBUTE","withConfigureEdgeToEdgeEnforcement","config","disableEdgeToEdgeEnforcement","withAndroidStyles","configureEdgeToEdgeEnforcement","exports","style","modResults","resources","disableEdgeToEdgeEnforcementItem","_","$","name","mainThemeIndex","findIndex","existingItem","item","filter","push"],"sources":["../../../../src/plugins/unversioned/edge-to-edge/withConfigureEdgeToEdgeEnforcement.ts"],"sourcesContent":["import { ConfigPlugin, withAndroidStyles } from '@expo/config-plugins';\n\nimport { ResourceXMLConfig } from './withEdgeToEdge';\n\nconst OPT_OUT_EDGE_TO_EDGE_ATTRIBUTE = 'android:windowOptOutEdgeToEdgeEnforcement';\n\nexport const withConfigureEdgeToEdgeEnforcement: ConfigPlugin<{\n disableEdgeToEdgeEnforcement: boolean;\n}> = (config, { disableEdgeToEdgeEnforcement }) => {\n return withAndroidStyles(config, (config) => {\n return configureEdgeToEdgeEnforcement(config, disableEdgeToEdgeEnforcement);\n });\n};\n\nexport function configureEdgeToEdgeEnforcement(\n config: ResourceXMLConfig,\n disableEdgeToEdgeEnforcement: boolean\n): ResourceXMLConfig {\n const { style = [] } = config.modResults.resources;\n\n const disableEdgeToEdgeEnforcementItem = {\n _: 'true',\n $: {\n name: OPT_OUT_EDGE_TO_EDGE_ATTRIBUTE,\n 'tools:targetApi': '35',\n },\n };\n\n const mainThemeIndex = style.findIndex(({ $ }) => $.name === 'AppTheme');\n\n if (mainThemeIndex === -1) {\n return config;\n }\n\n const existingItem = style[mainThemeIndex].item.filter(\n ({ $ }) => $.name !== OPT_OUT_EDGE_TO_EDGE_ATTRIBUTE\n );\n\n if (disableEdgeToEdgeEnforcement) {\n existingItem.push(disableEdgeToEdgeEnforcementItem);\n }\n if (!config.modResults.resources.style) {\n return config;\n }\n\n config.modResults.resources.style[mainThemeIndex].item = existingItem;\n return config;\n}\n"],"mappings":";;;;;;;AAAA,SAAAA,eAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,cAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAIA,MAAME,8BAA8B,GAAG,2CAA2C;AAE3E,MAAMC,kCAEX,GAAGA,CAACC,MAAM,EAAE;EAAEC;AAA6B,CAAC,KAAK;EACjD,OAAO,IAAAC,kCAAiB,EAACF,MAAM,EAAGA,MAAM,IAAK;IAC3C,OAAOG,8BAA8B,CAACH,MAAM,EAAEC,4BAA4B,CAAC;EAC7E,CAAC,CAAC;AACJ,CAAC;AAACG,OAAA,CAAAL,kCAAA,GAAAA,kCAAA;AAEK,SAASI,8BAA8BA,CAC5CH,MAAyB,EACzBC,4BAAqC,EAClB;EACnB,MAAM;IAAEI,KAAK,GAAG;EAAG,CAAC,GAAGL,MAAM,CAACM,UAAU,CAACC,SAAS;EAElD,MAAMC,gCAAgC,GAAG;IACvCC,CAAC,EAAE,MAAM;IACTC,CAAC,EAAE;MACDC,IAAI,EAAEb,8BAA8B;MACpC,iBAAiB,EAAE;IACrB;EACF,CAAC;EAED,MAAMc,cAAc,GAAGP,KAAK,CAACQ,SAAS,CAAC,CAAC;IAAEH;EAAE,CAAC,KAAKA,CAAC,CAACC,IAAI,KAAK,UAAU,CAAC;EAExE,IAAIC,cAAc,KAAK,CAAC,CAAC,EAAE;IACzB,OAAOZ,MAAM;EACf;EAEA,MAAMc,YAAY,GAAGT,KAAK,CAACO,cAAc,CAAC,CAACG,IAAI,CAACC,MAAM,CACpD,CAAC;IAAEN;EAAE,CAAC,KAAKA,CAAC,CAACC,IAAI,KAAKb,8BACxB,CAAC;EAED,IAAIG,4BAA4B,EAAE;IAChCa,YAAY,CAACG,IAAI,CAACT,gCAAgC,CAAC;EACrD;EACA,IAAI,CAACR,MAAM,CAACM,UAAU,CAACC,SAAS,CAACF,KAAK,EAAE;IACtC,OAAOL,MAAM;EACf;EAEAA,MAAM,CAACM,UAAU,CAACC,SAAS,CAACF,KAAK,CAACO,cAAc,CAAC,CAACG,IAAI,GAAGD,YAAY;EACrE,OAAOd,MAAM;AACf","ignoreList":[]}
@@ -1,6 +0,0 @@
1
- import type { ExpoConfig } from '@expo/config-types';
2
- import { GradlePropertiesConfig } from './withEdgeToEdge';
3
- export declare function withEdgeToEdgeEnabledGradleProperties(config: ExpoConfig, props: {
4
- edgeToEdgeEnabled: boolean;
5
- }): ExpoConfig;
6
- export declare function configureEdgeToEdgeEnabledGradleProperties(config: GradlePropertiesConfig, edgeToEdgeEnabled: boolean): GradlePropertiesConfig;
@@ -1,59 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.configureEdgeToEdgeEnabledGradleProperties = configureEdgeToEdgeEnabledGradleProperties;
7
- exports.withEdgeToEdgeEnabledGradleProperties = withEdgeToEdgeEnabledGradleProperties;
8
- function _configPlugins() {
9
- const data = require("@expo/config-plugins");
10
- _configPlugins = function () {
11
- return data;
12
- };
13
- return data;
14
- }
15
- const OLD_EXPO_EDGE_TO_EDGE_ENABLED_GRADLE_PROPERTY_COMMENT = 'Whether the app is configured to use edge-to-edge via the app config or `react-native-edge-to-edge` plugin';
16
- const EXPO_EDGE_TO_EDGE_ENABLED_GRADLE_PROPERTY_KEY = 'expo.edgeToEdgeEnabled';
17
- const EXPO_EDGE_TO_EDGE_ENABLED_GRADLE_PROPERTY_COMMENT = 'Specifies whether the app is configured to use edge-to-edge via the app config or plugin\n' + '# WARNING: This property has been deprecated and will be removed in Expo SDK 55. Use `edgeToEdgeEnabled` or `react.edgeToEdgeEnabled` to determine whether the project is using edge-to-edge.';
18
- const REACT_EDGE_TO_EDGE_ENABLED_GRADLE_PROPERTY_KEY = 'edgeToEdgeEnabled';
19
- const REACT_EDGE_TO_EDGE_ENABLED_GRADLE_PROPERTY_COMMENT = 'Use this property to enable edge-to-edge display support.\n' + '# This allows your app to draw behind system bars for an immersive UI.\n' + '# Note: Only works with ReactActivity and should not be used with custom Activity.';
20
- function withEdgeToEdgeEnabledGradleProperties(config, props) {
21
- return (0, _configPlugins().withGradleProperties)(config, config => {
22
- return configureEdgeToEdgeEnabledGradleProperties(config, props.edgeToEdgeEnabled);
23
- });
24
- }
25
- function configureEdgeToEdgeEnabledGradleProperties(config, edgeToEdgeEnabled) {
26
- // TODO: Remove for SDK 55
27
- config = removeOldExpoEdgeToEdgeEnabledComment(config);
28
-
29
- // TODO: Remove for SDK 55
30
- config = configureGradleProperty(config, EXPO_EDGE_TO_EDGE_ENABLED_GRADLE_PROPERTY_KEY, edgeToEdgeEnabled ? 'true' : 'false', EXPO_EDGE_TO_EDGE_ENABLED_GRADLE_PROPERTY_COMMENT);
31
- return configureGradleProperty(config, REACT_EDGE_TO_EDGE_ENABLED_GRADLE_PROPERTY_KEY, edgeToEdgeEnabled ? 'true' : 'false', REACT_EDGE_TO_EDGE_ENABLED_GRADLE_PROPERTY_COMMENT);
32
- }
33
-
34
- // TODO: Remove for SDK 55
35
- function removeOldExpoEdgeToEdgeEnabledComment(config) {
36
- const commentIndex = config.modResults.findIndex(item => item.type === 'comment' && item.value === OLD_EXPO_EDGE_TO_EDGE_ENABLED_GRADLE_PROPERTY_COMMENT);
37
- if (commentIndex !== -1) {
38
- config.modResults.splice(commentIndex, 1);
39
- }
40
- return config;
41
- }
42
- function configureGradleProperty(config, key, value, comment, addNewLine = true) {
43
- const propertyIndex = config.modResults.findIndex(item => item.type === 'property' && item.key === key);
44
- if (propertyIndex !== -1 && config.modResults[propertyIndex].type === 'property') {
45
- config.modResults[propertyIndex].value = value;
46
- } else {
47
- config.modResults.push({
48
- type: 'comment',
49
- value: comment
50
- });
51
- config.modResults.push({
52
- type: 'property',
53
- key,
54
- value: addNewLine ? value + '\n' : value
55
- });
56
- }
57
- return config;
58
- }
59
- //# sourceMappingURL=withEdgeToEdgeEnabledGradleProperties.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"withEdgeToEdgeEnabledGradleProperties.js","names":["_configPlugins","data","require","OLD_EXPO_EDGE_TO_EDGE_ENABLED_GRADLE_PROPERTY_COMMENT","EXPO_EDGE_TO_EDGE_ENABLED_GRADLE_PROPERTY_KEY","EXPO_EDGE_TO_EDGE_ENABLED_GRADLE_PROPERTY_COMMENT","REACT_EDGE_TO_EDGE_ENABLED_GRADLE_PROPERTY_KEY","REACT_EDGE_TO_EDGE_ENABLED_GRADLE_PROPERTY_COMMENT","withEdgeToEdgeEnabledGradleProperties","config","props","withGradleProperties","configureEdgeToEdgeEnabledGradleProperties","edgeToEdgeEnabled","removeOldExpoEdgeToEdgeEnabledComment","configureGradleProperty","commentIndex","modResults","findIndex","item","type","value","splice","key","comment","addNewLine","propertyIndex","push"],"sources":["../../../../src/plugins/unversioned/edge-to-edge/withEdgeToEdgeEnabledGradleProperties.ts"],"sourcesContent":["import { withGradleProperties } from '@expo/config-plugins';\nimport type { ExpoConfig } from '@expo/config-types';\n\nimport { GradlePropertiesConfig } from './withEdgeToEdge';\n\nconst OLD_EXPO_EDGE_TO_EDGE_ENABLED_GRADLE_PROPERTY_COMMENT =\n 'Whether the app is configured to use edge-to-edge via the app config or `react-native-edge-to-edge` plugin';\nconst EXPO_EDGE_TO_EDGE_ENABLED_GRADLE_PROPERTY_KEY = 'expo.edgeToEdgeEnabled';\nconst EXPO_EDGE_TO_EDGE_ENABLED_GRADLE_PROPERTY_COMMENT =\n 'Specifies whether the app is configured to use edge-to-edge via the app config or plugin\\n' +\n '# WARNING: This property has been deprecated and will be removed in Expo SDK 55. Use `edgeToEdgeEnabled` or `react.edgeToEdgeEnabled` to determine whether the project is using edge-to-edge.';\n\nconst REACT_EDGE_TO_EDGE_ENABLED_GRADLE_PROPERTY_KEY = 'edgeToEdgeEnabled';\nconst REACT_EDGE_TO_EDGE_ENABLED_GRADLE_PROPERTY_COMMENT =\n 'Use this property to enable edge-to-edge display support.\\n' +\n '# This allows your app to draw behind system bars for an immersive UI.\\n' +\n '# Note: Only works with ReactActivity and should not be used with custom Activity.';\n\nexport function withEdgeToEdgeEnabledGradleProperties(\n config: ExpoConfig,\n props: {\n edgeToEdgeEnabled: boolean;\n }\n) {\n return withGradleProperties(config, (config) => {\n return configureEdgeToEdgeEnabledGradleProperties(config, props.edgeToEdgeEnabled);\n });\n}\n\nexport function configureEdgeToEdgeEnabledGradleProperties(\n config: GradlePropertiesConfig,\n edgeToEdgeEnabled: boolean\n): GradlePropertiesConfig {\n // TODO: Remove for SDK 55\n config = removeOldExpoEdgeToEdgeEnabledComment(config);\n\n // TODO: Remove for SDK 55\n config = configureGradleProperty(\n config,\n EXPO_EDGE_TO_EDGE_ENABLED_GRADLE_PROPERTY_KEY,\n edgeToEdgeEnabled ? 'true' : 'false',\n EXPO_EDGE_TO_EDGE_ENABLED_GRADLE_PROPERTY_COMMENT\n );\n\n return configureGradleProperty(\n config,\n REACT_EDGE_TO_EDGE_ENABLED_GRADLE_PROPERTY_KEY,\n edgeToEdgeEnabled ? 'true' : 'false',\n REACT_EDGE_TO_EDGE_ENABLED_GRADLE_PROPERTY_COMMENT\n );\n}\n\n// TODO: Remove for SDK 55\nfunction removeOldExpoEdgeToEdgeEnabledComment(\n config: GradlePropertiesConfig\n): GradlePropertiesConfig {\n const commentIndex = config.modResults.findIndex(\n (item) =>\n item.type === 'comment' &&\n item.value === OLD_EXPO_EDGE_TO_EDGE_ENABLED_GRADLE_PROPERTY_COMMENT\n );\n if (commentIndex !== -1) {\n config.modResults.splice(commentIndex, 1);\n }\n return config;\n}\n\nfunction configureGradleProperty(\n config: GradlePropertiesConfig,\n key: string,\n value: string,\n comment: string,\n addNewLine: boolean = true\n): GradlePropertiesConfig {\n const propertyIndex = config.modResults.findIndex(\n (item) => item.type === 'property' && item.key === key\n );\n\n if (propertyIndex !== -1 && config.modResults[propertyIndex].type === 'property') {\n config.modResults[propertyIndex].value = value;\n } else {\n config.modResults.push({\n type: 'comment',\n value: comment,\n });\n\n config.modResults.push({\n type: 'property',\n key,\n value: addNewLine ? value + '\\n' : value,\n });\n }\n\n return config;\n}\n"],"mappings":";;;;;;;AAAA,SAAAA,eAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,cAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAKA,MAAME,qDAAqD,GACzD,4GAA4G;AAC9G,MAAMC,6CAA6C,GAAG,wBAAwB;AAC9E,MAAMC,iDAAiD,GACrD,4FAA4F,GAC5F,+LAA+L;AAEjM,MAAMC,8CAA8C,GAAG,mBAAmB;AAC1E,MAAMC,kDAAkD,GACtD,6DAA6D,GAC7D,0EAA0E,GAC1E,oFAAoF;AAE/E,SAASC,qCAAqCA,CACnDC,MAAkB,EAClBC,KAEC,EACD;EACA,OAAO,IAAAC,qCAAoB,EAACF,MAAM,EAAGA,MAAM,IAAK;IAC9C,OAAOG,0CAA0C,CAACH,MAAM,EAAEC,KAAK,CAACG,iBAAiB,CAAC;EACpF,CAAC,CAAC;AACJ;AAEO,SAASD,0CAA0CA,CACxDH,MAA8B,EAC9BI,iBAA0B,EACF;EACxB;EACAJ,MAAM,GAAGK,qCAAqC,CAACL,MAAM,CAAC;;EAEtD;EACAA,MAAM,GAAGM,uBAAuB,CAC9BN,MAAM,EACNL,6CAA6C,EAC7CS,iBAAiB,GAAG,MAAM,GAAG,OAAO,EACpCR,iDACF,CAAC;EAED,OAAOU,uBAAuB,CAC5BN,MAAM,EACNH,8CAA8C,EAC9CO,iBAAiB,GAAG,MAAM,GAAG,OAAO,EACpCN,kDACF,CAAC;AACH;;AAEA;AACA,SAASO,qCAAqCA,CAC5CL,MAA8B,EACN;EACxB,MAAMO,YAAY,GAAGP,MAAM,CAACQ,UAAU,CAACC,SAAS,CAC7CC,IAAI,IACHA,IAAI,CAACC,IAAI,KAAK,SAAS,IACvBD,IAAI,CAACE,KAAK,KAAKlB,qDACnB,CAAC;EACD,IAAIa,YAAY,KAAK,CAAC,CAAC,EAAE;IACvBP,MAAM,CAACQ,UAAU,CAACK,MAAM,CAACN,YAAY,EAAE,CAAC,CAAC;EAC3C;EACA,OAAOP,MAAM;AACf;AAEA,SAASM,uBAAuBA,CAC9BN,MAA8B,EAC9Bc,GAAW,EACXF,KAAa,EACbG,OAAe,EACfC,UAAmB,GAAG,IAAI,EACF;EACxB,MAAMC,aAAa,GAAGjB,MAAM,CAACQ,UAAU,CAACC,SAAS,CAC9CC,IAAI,IAAKA,IAAI,CAACC,IAAI,KAAK,UAAU,IAAID,IAAI,CAACI,GAAG,KAAKA,GACrD,CAAC;EAED,IAAIG,aAAa,KAAK,CAAC,CAAC,IAAIjB,MAAM,CAACQ,UAAU,CAACS,aAAa,CAAC,CAACN,IAAI,KAAK,UAAU,EAAE;IAChFX,MAAM,CAACQ,UAAU,CAACS,aAAa,CAAC,CAACL,KAAK,GAAGA,KAAK;EAChD,CAAC,MAAM;IACLZ,MAAM,CAACQ,UAAU,CAACU,IAAI,CAAC;MACrBP,IAAI,EAAE,SAAS;MACfC,KAAK,EAAEG;IACT,CAAC,CAAC;IAEFf,MAAM,CAACQ,UAAU,CAACU,IAAI,CAAC;MACrBP,IAAI,EAAE,UAAU;MAChBG,GAAG;MACHF,KAAK,EAAEI,UAAU,GAAGJ,KAAK,GAAG,IAAI,GAAGA;IACrC,CAAC,CAAC;EACJ;EAEA,OAAOZ,MAAM;AACf","ignoreList":[]}