xref: /expo/tools/src/versioning/android/libraries.ts (revision 75f652f0)
1import fs from 'fs-extra';
2import path from 'path';
3import { getExpotoolsDir } from '../../Directories';
4
5export const JniLibNames = [
6  'libfb',
7  'libfolly_json',
8  'libglog_init',
9  'glog',
10  'reactnativejni',
11  'reactnativejnifb',
12  'csslayout',
13  'yoga',
14  'fbgloginit',
15  'yogajni',
16  'jschelpers',
17  'packagerconnectionjnifb',
18  'privatedata',
19  'yogafastmath',
20  'fabricjscjni',
21  'jscexecutor',
22  'libjscexecutor',
23  'jsinspector',
24  'libjsinspector',
25  'fabricjni',
26  'turbomodulejsijni',
27  'reactnativeblob',
28  'jsijniprofiler',
29  'hermes',
30  'hermes-executor-release',
31  'hermes-executor-common-release',
32  'hermes-executor-debug',
33  'hermes-executor-common-debug',
34  'reanimated',
35  'hermes-inspector',
36  'folly_futures',
37  'react_codegen_reactandroidspec',
38  'react_nativemodule_core',
39  'reactnativeutilsjni',
40  'reactperfloggerjni',
41
42  // TODO: considering versioning prebuilt fbjni by patchelf after RN 0.65 which has newer fbjni version.
43  // or simply upgrade old SDK to use latest fbjni.
44  //
45  // 'fbjni',
46  // 'libfbjni',
47];
48
49// this list is used in the shell scripts as well as directly by expotools
50// we read it in here to keep the source of truth in one place
51export const getJavaPackagesToRename = async () => {
52  const packagesToRename = await fs.readFile(
53    path.join(getExpotoolsDir(), 'src/versioning/android/android-packages-to-rename.txt'),
54    'utf8'
55  );
56  return packagesToRename.split('\n').filter((p: string) => !!p);
57};
58