mindbox-expo-plugin 1.0.6-rc → 1.0.8-rc

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.
@@ -21,12 +21,7 @@ const addMindboxDependencies = (config, props = {}) => {
21
21
  }
22
22
  return (0, config_plugins_1.withAppBuildGradle)(config, (buildGradle) => {
23
23
  const contents = buildGradle.modResults.contents;
24
- const extraDependencies = [];
25
- if (props.workRuntimeWorkaround === true) {
26
- extraDependencies.push(` ${androidConstants_1.ANDROID_CONSTANTS.IMPLEMENTATION} 'androidx.work:work-runtime-ktx:${androidConstants_1.ANDROID_CONSTANTS.WORK_RUNTIME_KTX_VERSION}'`);
27
- }
28
- const mindboxDependencies = providersToAdd.map(provider => ` ${androidConstants_1.ANDROID_CONSTANTS.IMPLEMENTATION} '${libraryMap[provider]}'`);
29
- const dependencies = [...extraDependencies, ...mindboxDependencies].join('\n');
24
+ const dependencies = providersToAdd.map(provider => ` ${androidConstants_1.ANDROID_CONSTANTS.IMPLEMENTATION} '${libraryMap[provider]}'`).join('\n');
30
25
  buildGradle.modResults.contents = buildGradle.modResults.contents.replace(/(\s*)dependencies\s*\{/, `$1dependencies {\n${dependencies}`);
31
26
  return buildGradle;
32
27
  });
@@ -14,7 +14,6 @@ export declare const ANDROID_CONSTANTS: {
14
14
  readonly RUSTORE_MAVEN_URL: "https://artifactory-external.vkpartner.ru/artifactory/maven";
15
15
  readonly RUSTORE_MAVEN_REPO: " maven { url = uri(\"https://artifactory-external.vkpartner.ru/artifactory/maven\") }";
16
16
  readonly RUSTORE_PROJECT_ID_META_DATA_NAME: "ru.rustore.sdk.pushclient.project_id";
17
- readonly WORK_RUNTIME_KTX_VERSION: "2.8.1";
18
17
  };
19
18
  export declare const REGEX_CAPTURE_GROUPS: {
20
19
  readonly FIRST: 1;
@@ -5,7 +5,6 @@ const VERSIONS = {
5
5
  GOOGLE_SERVICES: "4.4.0",
6
6
  HUAWEI_AGCP: "1.9.1.300",
7
7
  HUAWEI_PUSH: "6.11.0.300",
8
- WORK_RUNTIME_KTX: "2.8.1",
9
8
  };
10
9
  exports.ANDROID_CONSTANTS = {
11
10
  IMPLEMENTATION: "implementation",
@@ -23,7 +22,6 @@ exports.ANDROID_CONSTANTS = {
23
22
  RUSTORE_MAVEN_URL: "https://artifactory-external.vkpartner.ru/artifactory/maven",
24
23
  RUSTORE_MAVEN_REPO: " maven { url = uri(\"https://artifactory-external.vkpartner.ru/artifactory/maven\") }",
25
24
  RUSTORE_PROJECT_ID_META_DATA_NAME: "ru.rustore.sdk.pushclient.project_id",
26
- WORK_RUNTIME_KTX_VERSION: VERSIONS.WORK_RUNTIME_KTX,
27
25
  };
28
26
  exports.REGEX_CAPTURE_GROUPS = {
29
27
  FIRST: 1,
@@ -40,6 +40,7 @@ const iosConstants_1 = require("../helpers/iosConstants");
40
40
  const errorUtils_1 = require("../utils/errorUtils");
41
41
  const TARGET_REGEX = /^target\s+'[^']+'\s+do\s*\n/m;
42
42
  const USE_EXPO_MODULES_REGEX = /^\s*use_expo_modules!\s*$/m;
43
+ const USE_FRAMEWORKS_REGEX = /^\s*use_frameworks!.*$/m;
43
44
  const withMindboxPodfile = (config) => {
44
45
  return (0, config_plugins_1.withDangerousMod)(config, [
45
46
  "ios",
@@ -78,7 +79,9 @@ function insertTargetIfMissing(podfile, targetName, podLine, logMessage) {
78
79
  if (headerIdx === -1) {
79
80
  return podfile;
80
81
  }
81
- const insertion = `target '${targetName}' do\n ${podLine}\nend\n\n`;
82
+ const frameworksMatch = podfile.match(USE_FRAMEWORKS_REGEX);
83
+ const frameworksLine = frameworksMatch ? ` ${frameworksMatch[0].trim()}\n` : "";
84
+ const insertion = `target '${targetName}' do\n${frameworksLine} ${podLine}\nend\n\n`;
82
85
  (0, errorUtils_1.logSuccess)(logMessage);
83
86
  return podfile.slice(0, headerIdx) + insertion + podfile.slice(headerIdx);
84
87
  }
@@ -22,5 +22,4 @@ export type MindboxPluginProps = {
22
22
  iosAppGroupId?: string;
23
23
  nativeRequestPermission?: boolean;
24
24
  usedExpoNotification?: boolean;
25
- workRuntimeWorkaround?: boolean;
26
25
  };
@@ -19,7 +19,6 @@ const MINDBOX_PLUGIN_PROPS = [
19
19
  "iosDeploymentTarget",
20
20
  "iosDevTeam",
21
21
  "usedExpoNotification",
22
- "workRuntimeWorkaround",
23
22
  ];
24
23
  const VALID_ANDROID_PROVIDERS = ["firebase", "huawei", "rustore"];
25
24
  const VALID_IOS_MODES = ["development", "production"];
@@ -80,7 +79,6 @@ function validatePluginProps(props) {
80
79
  validateStringProp(props.smallIconAccentColor, "smallIconAccentColor");
81
80
  validateBooleanProp(props.nativeRequestPermission, "nativeRequestPermission");
82
81
  validateBooleanProp(props.usedExpoNotification, "usedExpoNotification");
83
- validateBooleanProp(props.workRuntimeWorkaround, "workRuntimeWorkaround");
84
82
  validateStringProp(props.iosNseFilePath, "iosNseFilePath");
85
83
  validateStringProp(props.iosNceFilePath, "iosNceFilePath");
86
84
  validateStringProp(props.iosAppGroupId, "iosAppGroupId");
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mindbox-expo-plugin",
3
- "version": "1.0.6-rc",
4
- "target-version": "1.0.6-rc",
3
+ "version": "1.0.8-rc",
4
+ "target-version": "1.0.8-rc",
5
5
  "main": "app.plugin.js",
6
6
  "react-native": "build/runtime/index.js",
7
7
  "types": "build/index.d.ts",