chore(plugins,ci): remove livekit audio switch patch plugin and simplify build config
Remove the LiveKit audio switch patch plugin as it's no longer needed after the JitPack repository was restricted to GitHub packages only. Simplify CI by removing npm caching and Android NDK caching/installation steps. Update privacy policy and terms of service to reflect JPush SDK naming changes.
This commit is contained in:
@@ -1,40 +0,0 @@
|
||||
const { withDangerousMod } = require('@expo/config-plugins');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
// @livekit/react-native depends on com.github.davidliu:audioswitch via JitPack.
|
||||
// That JitPack artifact returns 403 Forbidden (repo/commit no longer accessible).
|
||||
// The original upstream com.twilio:audioswitch is published on Maven Central.
|
||||
// This plugin patches livekit's build.gradle during prebuild to swap the
|
||||
// JitPack dependency for the Maven Central one.
|
||||
const withLivekitAudioswitchPatch = (config) =>
|
||||
withDangerousMod(config, [
|
||||
'android',
|
||||
async (config) => {
|
||||
const root = config.modRequest.projectRoot;
|
||||
const gradlePath = path.join(
|
||||
root,
|
||||
'node_modules',
|
||||
'@livekit',
|
||||
'react-native',
|
||||
'android',
|
||||
'build.gradle',
|
||||
);
|
||||
|
||||
if (!fs.existsSync(gradlePath)) return config;
|
||||
|
||||
let content = fs.readFileSync(gradlePath, 'utf-8');
|
||||
const oldDep = /api\s+'com\.github\.davidliu:audioswitch:[a-f0-9]+'/;
|
||||
const newDep = `api 'com.twilio:audioswitch:1.1.5'`;
|
||||
|
||||
if (oldDep.test(content)) {
|
||||
content = content.replace(oldDep, newDep);
|
||||
fs.writeFileSync(gradlePath, content);
|
||||
console.log('[withLivekitAudioswitchPatch] replaced davidliu JitPack audioswitch with com.twilio:audioswitch:1.1.5');
|
||||
}
|
||||
|
||||
return config;
|
||||
},
|
||||
]);
|
||||
|
||||
module.exports = withLivekitAudioswitchPatch;
|
||||
Reference in New Issue
Block a user