Skip to content

Commit dfdfa13

Browse files
committed
chore(format): format app.plugin.js with Prettier
1 parent e5ba98e commit dfdfa13

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

app.plugin.js

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
// Inject core-splashscreen dependency to fix Android resource linking errors for Theme.SplashScreen
22
// This runs during EAS prebuild and modifies android/app/build.gradle
3-
const { withAppBuildGradle, createRunOncePlugin, WarningAggregator } = require('@expo/config-plugins');
3+
const {
4+
withAppBuildGradle,
5+
createRunOncePlugin,
6+
WarningAggregator,
7+
} = require("@expo/config-plugins");
48

59
const DEP_LINE = 'implementation("androidx.core:core-splashscreen:1.0.1")';
610

711
function ensureDependency(contents) {
812
if (contents.includes(DEP_LINE)) return contents; // already present
9-
return contents.replace(/dependencies\s*\{/m, (match) => `${match}\n ${DEP_LINE}`);
13+
return contents.replace(
14+
/dependencies\s*\{/m,
15+
(match) => `${match}\n ${DEP_LINE}`,
16+
);
1017
}
1118

1219
const withCoreSplashscreenDependency = (config) =>
@@ -15,16 +22,16 @@ const withCoreSplashscreenDependency = (config) =>
1522
config.modResults.contents = ensureDependency(config.modResults.contents);
1623
} catch (e) {
1724
WarningAggregator.addWarningAndroid(
18-
'core-splashscreen',
19-
`Failed to add androidx.core:core-splashscreen dependency: ${e?.message ?? e}`
25+
"core-splashscreen",
26+
`Failed to add androidx.core:core-splashscreen dependency: ${e?.message ?? e}`,
2027
);
2128
}
2229
return config;
2330
});
2431

25-
// module exp
32+
// module exp
2633
module.exports = createRunOncePlugin(
2734
withCoreSplashscreenDependency,
28-
'with-core-splashscreen-dependency',
29-
'1.0.0'
35+
"with-core-splashscreen-dependency",
36+
"1.0.0",
3037
);

0 commit comments

Comments
 (0)