@amplitude/plugin-engagement-react-native 1.7.0 → 1.8.0

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.
@@ -16,7 +16,20 @@ Pod::Spec.new do |s|
16
16
  s.source_files = "ios/**/*.{h,m,mm,cpp,swift}"
17
17
  s.private_header_files = "ios/**/*.h"
18
18
 
19
- s.dependency "AmplitudeEngagementSwift", "1.7.0"
19
+ # Conditionally vendor frameworks based on CI environment variable
20
+ # This functionality exists to enable development of the SDK locally in React Native/Flutter projects without having to publish the frameworks to a public repository.
21
+ # Use local frameworks when NOT in CI (for local development), use CocoaPods dependency in CI
22
+ use_local_frameworks = ENV['IOS_USE_LOCAL_SDK_SOURCE'] == 'true'
23
+
24
+ if use_local_frameworks
25
+ s.ios.vendored_frameworks = [
26
+ 'ios/Frameworks/AmplitudeEngagementSwift.xcframework',
27
+ 'ios/Frameworks/CQuickJS.xcframework',
28
+ ]
29
+ s.dependency 'AmplitudeCore', '>=1.0.12', '<2.0.0'
30
+ else
31
+ s.dependency "AmplitudeEngagementSwift", "1.8.0"
32
+ end
20
33
 
21
34
  install_modules_dependencies(s)
22
35
  end
@@ -9,7 +9,7 @@ buildscript {
9
9
  }
10
10
 
11
11
  dependencies {
12
- classpath "com.android.tools.build:gradle:8.7.2"
12
+ classpath "com.android.tools.build:gradle:8.9.1"
13
13
  // noinspection DifferentKotlinGradleVersion
14
14
  classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${getExtOrDefault('kotlinVersion')}"
15
15
  }
@@ -67,6 +67,16 @@ android {
67
67
  repositories {
68
68
  mavenCentral()
69
69
  google()
70
+
71
+ def localAndroidDir = new File(rootDir, "../../android")
72
+ if (localAndroidDir.exists()) {
73
+ maven {
74
+ url = new File(localAndroidDir, "engagement/build/outputs/fat-aar/release").toURI()
75
+ metadataSources {
76
+ artifact()
77
+ }
78
+ }
79
+ }
70
80
  }
71
81
 
72
82
  def kotlin_version = getExtOrDefault("kotlinVersion")
@@ -76,7 +86,7 @@ dependencies {
76
86
  implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
77
87
 
78
88
  // Amplitude Engagement SDK
79
- implementation "com.amplitude:amplitude-engagement-android:1.7.0"
89
+ implementation "com.amplitude:amplitude-engagement-android:1.8.0"
80
90
 
81
91
  // Amplitude Analytics SDK (required dependency)
82
92
  implementation "com.amplitude:analytics-android:1.+"
@@ -0,0 +1,12 @@
1
+ rootProject.name = "plugin-engagement-react-native"
2
+
3
+ def localAndroidDir = new File(rootDir, "../../android")
4
+ if (localAndroidDir.exists()) {
5
+ includeBuild(localAndroidDir) {
6
+ dependencySubstitution {
7
+ substitute(module("com.amplitude:amplitude-engagement-android"))
8
+ .using(project(":engagement"))
9
+ }
10
+ }
11
+ }
12
+
@@ -1 +1 @@
1
- {"version":"1.7.0"}
1
+ {"version":"1.8.0"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amplitude/plugin-engagement-react-native",
3
- "version": "1.7.0",
3
+ "version": "1.8.0",
4
4
  "description": "Amplitude Engagement plugin for React Native",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",
@@ -96,6 +96,10 @@
96
96
  "<rootDir>/testproject/node_modules",
97
97
  "<rootDir>/example/node_modules",
98
98
  "<rootDir>/lib/"
99
+ ],
100
+ "testPathIgnorePatterns": [
101
+ "<rootDir>/testproject/.*\\.test\\.[jt]sx?$",
102
+ "<rootDir>/testproject/.*\\.spec\\.[jt]sx?$"
99
103
  ]
100
104
  },
101
105
  "commitlint": {