INNER CODE UNIT · TypeScript
getDebugRoot
bamlab/react-native-flipper-performance-monitor · flipper-native/plugin/src/index.ts:76
function getDebugRoot(projectRoot: string) {
return path.join(projectRoot, "android", "app", "src", "debug", "java");
}
async function addReactNativePerformancePluginForExpoAndroid(
config: ExportedConfigWithProps
) {
if (config.android) {
const projectRoot = config.modRequest.projectRoot;
const packageDebugRoot = getDebugRoot(projectRoot);
const packageName = config.android.package || "";
const reactNativeFlipperFilePath = path.join(
packageDebugRoot,
`${packageName.split(".").join("/")}/ReactNativeFlipper.java`
);
try {
// since there is no mod to get the contents of the file, we need to read it first