Remove JitPack from default Android build.gradle template
Gunnar Torfi Steinarsson
JitPack is included in the default Android
build.gradle
under allprojects.repositories
, which makes Gradle query it for all dependency resolution — even packages like BouncyCastle that only exist on Maven Central.JitPack went down for 24+ hours (March 8-9, 2026) with no communication, completely blocking Android builds for all Expo projects. The failure happens because
expo-updates
depends on BouncyCastle via a version range, and Gradle times out trying to fetch metadata from JitPack.This wasn't just us — many projects were affected (jitpack/jitpack.io#7836).
JitPack appears minimally maintained at this point (no status page, no incident communication), and Maven Central + Google's Maven repo cover all core dependencies. If specific Expo packages still need JitPack, they could declare it in their own module-level
build.gradle
with content filtering instead of polluting the global repo list.Would love to see JitPack removed or at least scoped in the default template so a third-party outage can't block all Android builds.
kudochien
Hi there! We can remove jitpack from default template in the next SDK. However, the jitpack respository is also added by react-native. You can refer to the RFC to disable jitpack: https://github.com/react-native-community/discussions-and-proposals/discussions/877. Removing jitpack would affect some libraries and that's main reason it's not removed by default.
You can try to use the config-plugin to remove jitpack now
const { withGradleProperties, withDangerousMod } = require('expo/config-plugins');
const fs = require('node:fs');
const path = require('node:path');
module.exports = function withDisableJitpack(config) {
// Add react.includeJitpackRepository=false to gradle.properties
config = withGradleProperties(config, (config) => {
config.modResults = config.modResults.filter(
(item) => !(item.type === 'property' && item.key === 'react.includeJitpackRepository')
);
config.modResults.push({
type: 'property',
key: 'react.includeJitpackRepository',
value: 'false',
});
return config;
});
// Remove jitpack.io maven repo from android/build.gradle
// This may not be necessary in SDK 56.
config = withDangerousMod(config, [
'android',
async (config) => {
const buildGradlePath = path.join(config.modRequest.platformProjectRoot, 'build.gradle');
let contents = fs.readFileSync(buildGradlePath, 'utf-8');
// Remove lines like: maven { url 'https://www.jitpack.io' }
contents = contents.replace(/\s*maven\s*\{\s*url\s*['"]https:\/\/www\.jitpack\.io['"]\s*\}\s*\n?/g, '\n');
fs.writeFileSync(buildGradlePath, contents);
return config;
},
]);
return config;
};