Skip to content

Commit

Permalink
Remove unreliable repository (#7176)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon authored Dec 19, 2024
1 parent c2ca84c commit c390c32
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions app.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ module.exports = function (config) {
'./plugins/withAndroidManifestFCMIconPlugin.js',
'./plugins/withAndroidStylesAccentColorPlugin.js',
'./plugins/withAndroidSplashScreenStatusBarTranslucentPlugin.js',
'./plugins/withAndroidNoJitpackPlugin.js',
'./plugins/shareExtension/withShareExtensions.js',
'./plugins/notificationsExtension/withNotificationsExtension.js',
'./plugins/withAppDelegateReferrer.js',
Expand Down
20 changes: 20 additions & 0 deletions plugins/withAndroidNoJitpackPlugin.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const {withProjectBuildGradle} = require('@expo/config-plugins')

const jitpackRepository = "maven { url 'https://www.jitpack.io' }"

module.exports = function withAndroidNoJitpackPlugin(config) {
return withProjectBuildGradle(config, config => {
if (!config.modResults.contents.includes(jitpackRepository)) {
throw Error(
'Expected to find the jitpack string in the config. ' +
'You MUST verify whether it was actually removed upstream, ' +
'or if the format has changed and this plugin no longer recognizes it.',
)
}
config.modResults.contents = config.modResults.contents.replaceAll(
jitpackRepository,
'',
)
return config
})
}

0 comments on commit c390c32

Please sign in to comment.