@apirtc/expo-apirtc-options-plugin 0.0.10 → 0.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -104,9 +104,9 @@ function getPackageName(projectRoot, packageNameHint) {
104
104
  .split(path.sep)
105
105
  .join('.');
106
106
  }
107
- function copyAndPatchJavaFiles(projectRoot) {
107
+ function copyAndPatchJavaFiles(projectRoot, packageNameHint) {
108
108
  const srcDir = path.join(__dirname, 'static/java');
109
- const destDir = getAndroidPackagePath(projectRoot);
109
+ const destDir = getAndroidPackagePath(projectRoot, packageNameHint);
110
110
  const packageName = destDir
111
111
  .replace(path.join(projectRoot, 'android/app/src/main/java') + path.sep, '')
112
112
  .split(path.sep)
@@ -125,9 +125,9 @@ function copyAndPatchJavaFiles(projectRoot) {
125
125
  }
126
126
  });
127
127
  }
128
- function copyAndPatchKotlinFiles(projectRoot) {
128
+ function copyAndPatchKotlinFiles(projectRoot, packageNameHint) {
129
129
  const srcDir = path.join(__dirname, 'static/kotlin');
130
- const destDir = getAndroidPackagePath(projectRoot);
130
+ const destDir = getAndroidPackagePath(projectRoot, packageNameHint);
131
131
  const packageName = destDir
132
132
  .replace(path.join(projectRoot, 'android/app/src/main/java') + path.sep, '')
133
133
  .split(path.sep)
@@ -187,6 +187,7 @@ const withMlKitGradleDep = (config) => {
187
187
  const withAndroidPlugin = (config, props) => {
188
188
  logger_1.logger.info('withAndroidPlugin called with props:', props);
189
189
  let updatedConfig = (0, config_plugins_1.withMainApplication)(config, (config) => {
190
+ var _a, _b, _c, _d;
190
191
  const mainApplication = config.modResults;
191
192
  const packageName = (() => {
192
193
  var _a, _b;
@@ -238,10 +239,10 @@ const withAndroidPlugin = (config, props) => {
238
239
  mainApplication.contents = mainApplication.contents.replace(/(\/\/ add\(MyReactNativePackage\(\)\))/, match => `${match}\n add(BackgroundBlurPackage())`);
239
240
  }
240
241
  // Copy Kotlin native files
241
- copyAndPatchKotlinFiles(config.modRequest.projectRoot);
242
+ copyAndPatchKotlinFiles(config.modRequest.projectRoot, (_b = (_a = config.android) === null || _a === void 0 ? void 0 : _a.package) !== null && _b !== void 0 ? _b : undefined);
242
243
  }
243
244
  // Copy Java native files
244
- copyAndPatchJavaFiles(config.modRequest.projectRoot);
245
+ copyAndPatchJavaFiles(config.modRequest.projectRoot, (_d = (_c = config.android) === null || _c === void 0 ? void 0 : _c.package) !== null && _d !== void 0 ? _d : undefined);
245
246
  return config;
246
247
  });
247
248
  // Add ML Kit Gradle dependency when video effects are enabled
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apirtc/expo-apirtc-options-plugin",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "description": "Expo Plugin to add apiRTC features in a React Native application",
5
5
  "main": "index.js",
6
6
  "keywords": [