1import { FileTransforms, StringTransform } from '../../../Transforms.types';
2
3export function vendoredModulesTransforms(prefix: string): Record<string, FileTransforms> {
4  return {
5    '@shopify/react-native-skia': {
6      content: [
7        {
8          paths: 'build.gradle',
9          find: `def nodeModules = Paths.get(projectDir.getPath(), '../../../../../..', 'react-native-lab').toString()`,
10          replaceWith: `def nodeModules = Paths.get(projectDir.getPath(), '../../../../..').toString()`,
11        },
12        {
13          paths: 'build.gradle',
14          find: 'sourceBuild = true',
15          replaceWith: 'sourceBuild = false',
16        },
17        {
18          paths: 'ExponentPackage.kt',
19          find: 'import com.shopify',
20          replaceWith: `import ${prefix}.com.shopify`,
21        },
22      ],
23    },
24  };
25}
26
27export function exponentPackageTransforms(prefix: string): Record<string, StringTransform[]> {
28  return {
29    '@shopify/react-native-skia': [
30      {
31        find: 'import com.shopify',
32        replaceWith: `import ${prefix}.com.shopify`,
33      },
34    ],
35  };
36}
37