@snowplow/react-native-tracker 1.4.0 → 2.0.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.
- package/.editorconfig +15 -0
- package/.eslintignore +6 -0
- package/.gitattributes +3 -0
- package/.github/ISSUE_TEMPLATE/bug_report.md +29 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- package/.github/actions/setup/action.yml +28 -0
- package/.github/workflows/build.yml +150 -0
- package/.github/workflows/deploy.yml +98 -0
- package/.github/workflows/e2e-android.yml +121 -0
- package/.github/workflows/e2e-ios.yml +90 -0
- package/.github/workflows/snyk.yml +21 -0
- package/.gitignore +70 -0
- package/.npmignore +60 -0
- package/.nvmrc +1 -0
- package/.watchmanconfig +1 -0
- package/.yarnrc +3 -0
- package/CHANGELOG +166 -0
- package/CONTRIBUTING.md +80 -0
- package/README.md +23 -110
- package/android/build.gradle +93 -37
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +1 -2
- package/android/gradle.properties +5 -2
- package/android/gradlew +172 -110
- package/android/gradlew.bat +24 -19
- package/android/src/main/AndroidManifest.xml +1 -3
- package/android/src/main/AndroidManifestNew.xml +2 -0
- package/android/src/main/java/com/snowplow/reactnativetracker/ReactNativeTrackerModule.kt +704 -0
- package/android/src/main/java/com/snowplow/reactnativetracker/ReactNativeTrackerPackage.kt +17 -0
- package/android/src/main/java/com/snowplow/reactnativetracker/util/ConfigUtil.kt +271 -0
- package/android/src/main/java/com/snowplow/reactnativetracker/util/EventUtil.kt +213 -0
- package/android/src/main/java/com/snowplow/reactnativetracker/util/TrackerVersion.kt +5 -0
- package/babel.config.js +3 -0
- package/example/.watchmanconfig +1 -0
- package/example/Gemfile +6 -0
- package/example/android/app/build.gradle +129 -0
- package/example/android/app/debug.keystore +0 -0
- package/example/android/app/proguard-rules.pro +10 -0
- package/example/android/app/src/androidTest/java/com/reactnativetrackerexample/DetoxTest.java +36 -0
- package/example/android/app/src/androidTest/java/com/reactnativetrackerexample/DetoxTestAppJUnitRunner.java +21 -0
- package/example/android/app/src/debug/AndroidManifest.xml +13 -0
- package/example/android/app/src/debug/java/com/reactnativetrackerexample/ReactNativeFlipper.java +75 -0
- package/example/android/app/src/main/AndroidManifest.xml +26 -0
- package/example/android/app/src/main/java/com/reactnativetrackerexample/MainActivity.java +32 -0
- package/example/android/app/src/main/java/com/reactnativetrackerexample/MainApplication.java +62 -0
- package/example/android/app/src/main/res/drawable/rn_edit_text_material.xml +36 -0
- package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/values/strings.xml +3 -0
- package/example/android/app/src/main/res/values/styles.xml +9 -0
- package/example/android/app/src/release/java/com/reactnativetrackerexample/ReactNativeFlipper.java +20 -0
- package/example/android/build.gradle +31 -0
- package/example/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/example/android/gradle/wrapper/gradle-wrapper.properties +6 -0
- package/example/android/gradle.properties +44 -0
- package/example/android/gradlew +244 -0
- package/example/android/gradlew.bat +92 -0
- package/example/android/settings.gradle +4 -0
- package/example/app.json +4 -0
- package/example/babel.config.js +17 -0
- package/example/detox.config.js +92 -0
- package/example/e2e/config.json +10 -0
- package/example/e2e/emitEvents.e2e.detox.js +108 -0
- package/example/e2e/environment.js +23 -0
- package/example/e2e/helpers/microCommands.js +153 -0
- package/example/e2e/helpers/microHelpers.js +346 -0
- package/example/e2e/helpers/microHelpers.test.js +308 -0
- package/example/e2e/helpers/schemas.js +62 -0
- package/example/e2e/jest.config.js +16 -0
- package/example/e2e/setup.js +4 -0
- package/example/e2e/testEvents.micro.test.js +300 -0
- package/example/index.js +5 -0
- package/example/ios/.xcode.env +11 -0
- package/example/ios/Podfile +64 -0
- package/example/ios/Podfile.lock +737 -0
- package/example/ios/ReactNativeTrackerExample/AppDelegate.h +6 -0
- package/example/ios/ReactNativeTrackerExample/AppDelegate.mm +26 -0
- package/example/ios/ReactNativeTrackerExample/Images.xcassets/AppIcon.appiconset/Contents.json +53 -0
- package/example/ios/ReactNativeTrackerExample/Images.xcassets/Contents.json +6 -0
- package/example/ios/ReactNativeTrackerExample/Info.plist +55 -0
- package/example/ios/ReactNativeTrackerExample/LaunchScreen.storyboard +47 -0
- package/example/ios/ReactNativeTrackerExample/main.m +10 -0
- package/example/ios/ReactNativeTrackerExample-Bridging-Header.h +3 -0
- package/example/ios/ReactNativeTrackerExample.xcodeproj/project.pbxproj +722 -0
- package/{ios/RNSnowplowTracker.xcodeproj/xcshareddata/xcschemes/RNSnowplowTracker.xcscheme → example/ios/ReactNativeTrackerExample.xcodeproj/xcshareddata/xcschemes/ReactNativeTrackerExample.xcscheme} +29 -21
- package/example/ios/ReactNativeTrackerExample.xcworkspace/contents.xcworkspacedata +10 -0
- package/example/ios/ReactNativeTrackerExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/example/ios/ReactNativeTrackerExampleTests/Info.plist +24 -0
- package/example/ios/ReactNativeTrackerExampleTests/ReactNativeTrackerExampleTests.m +66 -0
- package/example/metro.config.js +45 -0
- package/example/package.json +54 -0
- package/example/react-native.config.js +10 -0
- package/example/src/App.js +557 -0
- package/example/tsconfig.json +5 -0
- package/example/yarn.lock +7379 -0
- package/ios/ReactNativeTracker-Bridging-Header.h +2 -0
- package/ios/ReactNativeTracker.mm +165 -0
- package/ios/ReactNativeTracker.swift +757 -0
- package/ios/{RNSnowplowTracker.xcodeproj → ReactNativeTracker.xcodeproj}/project.pbxproj +55 -79
- package/ios/Util/ConfigUtils.swift +206 -0
- package/ios/Util/TrackerVersion.swift +3 -0
- package/ios/Util/Utilities.swift +37 -0
- package/lefthook.yml +11 -0
- package/lib/commonjs/api.js +475 -0
- package/lib/commonjs/api.js.map +1 -0
- package/lib/commonjs/configurations.js +209 -0
- package/lib/commonjs/configurations.js.map +1 -0
- package/lib/commonjs/constants.js +85 -0
- package/lib/commonjs/constants.js.map +1 -0
- package/lib/commonjs/events.js +256 -0
- package/lib/commonjs/events.js.map +1 -0
- package/lib/commonjs/index.js +141 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/jsCore.js +393 -0
- package/lib/commonjs/jsCore.js.map +1 -0
- package/lib/commonjs/native.js +29 -0
- package/lib/commonjs/native.js.map +1 -0
- package/lib/commonjs/subject.js +248 -0
- package/lib/commonjs/subject.js.map +1 -0
- package/lib/commonjs/tracker.js +221 -0
- package/lib/commonjs/tracker.js.map +1 -0
- package/lib/commonjs/types.js +2 -0
- package/lib/commonjs/types.js.map +1 -0
- package/lib/commonjs/utils.js +85 -0
- package/lib/commonjs/utils.js.map +1 -0
- package/lib/commonjs/webViewInterface.js +79 -0
- package/lib/commonjs/webViewInterface.js.map +1 -0
- package/lib/module/api.js +439 -0
- package/lib/module/api.js.map +1 -0
- package/lib/module/configurations.js +197 -0
- package/lib/module/configurations.js.map +1 -0
- package/lib/module/constants.js +80 -0
- package/lib/module/constants.js.map +1 -0
- package/lib/module/events.js +240 -0
- package/lib/module/events.js.map +1 -0
- package/lib/module/index.js +129 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/jsCore.js +390 -0
- package/lib/module/jsCore.js.map +1 -0
- package/lib/module/native.js +25 -0
- package/lib/module/native.js.map +1 -0
- package/lib/module/subject.js +235 -0
- package/lib/module/subject.js.map +1 -0
- package/lib/module/tracker.js +209 -0
- package/lib/module/tracker.js.map +1 -0
- package/lib/module/types.js +2 -0
- package/lib/module/types.js.map +1 -0
- package/lib/module/utils.js +79 -0
- package/lib/module/utils.js.map +1 -0
- package/lib/module/webViewInterface.js +75 -0
- package/lib/module/webViewInterface.js.map +1 -0
- package/lib/typescript/__tests__/api.test.d.ts +2 -0
- package/lib/typescript/__tests__/api.test.d.ts.map +1 -0
- package/lib/typescript/__tests__/configurations.test.d.ts +2 -0
- package/lib/typescript/__tests__/configurations.test.d.ts.map +1 -0
- package/lib/typescript/__tests__/events.test.d.ts +2 -0
- package/lib/typescript/__tests__/events.test.d.ts.map +1 -0
- package/lib/typescript/__tests__/index.test.d.ts +2 -0
- package/lib/typescript/__tests__/index.test.d.ts.map +1 -0
- package/lib/typescript/__tests__/jsCore.test.d.ts +2 -0
- package/lib/typescript/__tests__/jsCore.test.d.ts.map +1 -0
- package/lib/typescript/__tests__/utils.test.d.ts +2 -0
- package/lib/typescript/__tests__/utils.test.d.ts.map +1 -0
- package/lib/typescript/api.d.ts +226 -0
- package/lib/typescript/api.d.ts.map +1 -0
- package/lib/typescript/configurations.d.ts +73 -0
- package/lib/typescript/configurations.d.ts.map +1 -0
- package/lib/typescript/constants.d.ts +59 -0
- package/lib/typescript/constants.d.ts.map +1 -0
- package/lib/typescript/events.d.ts +101 -0
- package/lib/typescript/events.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +27 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/jsCore.d.ts +140 -0
- package/lib/typescript/jsCore.d.ts.map +1 -0
- package/lib/typescript/native.d.ts +4 -0
- package/lib/typescript/native.d.ts.map +1 -0
- package/lib/typescript/subject.d.ts +91 -0
- package/lib/typescript/subject.d.ts.map +1 -0
- package/lib/typescript/tracker.d.ts +93 -0
- package/lib/typescript/tracker.d.ts.map +1 -0
- package/{dist/index.d.ts → lib/typescript/types.d.ts} +188 -75
- package/lib/typescript/types.d.ts.map +1 -0
- package/lib/typescript/utils.d.ts +35 -0
- package/lib/typescript/utils.d.ts.map +1 -0
- package/lib/typescript/webViewInterface.d.ts +15 -0
- package/lib/typescript/webViewInterface.d.ts.map +1 -0
- package/package.json +134 -52
- package/scripts/bootstrap.js +29 -0
- package/snowplow-react-native-tracker.podspec +42 -0
- package/src/__mocks__/react-native.js +7 -0
- package/src/__tests__/api.test.ts +34 -0
- package/src/__tests__/configurations.test.ts +620 -0
- package/src/__tests__/events.test.ts +749 -0
- package/src/__tests__/index.test.ts +27 -0
- package/src/__tests__/jsCore.test.ts +169 -0
- package/src/__tests__/utils.test.ts +23 -0
- package/src/api.ts +535 -0
- package/src/configurations.ts +337 -0
- package/src/constants.ts +102 -0
- package/src/events.ts +330 -0
- package/src/index.ts +189 -0
- package/src/jsCore.ts +553 -0
- package/src/native.ts +34 -0
- package/src/subject.ts +315 -0
- package/src/tracker.ts +330 -0
- package/src/types.ts +1087 -0
- package/src/utils.ts +78 -0
- package/src/webViewInterface.ts +105 -0
- package/tsconfig.build.json +5 -0
- package/tsconfig.json +28 -0
- package/turbo.json +34 -0
- package/yarn.lock +9333 -0
- package/RNSnowplowTracker.podspec +0 -24
- package/android/src/main/java/com/snowplowanalytics/react/tracker/RNSnowplowTrackerModule.java +0 -750
- package/android/src/main/java/com/snowplowanalytics/react/tracker/RNSnowplowTrackerPackage.java +0 -29
- package/android/src/main/java/com/snowplowanalytics/react/util/ConfigUtil.java +0 -351
- package/android/src/main/java/com/snowplowanalytics/react/util/EventUtil.java +0 -339
- package/android/src/main/java/com/snowplowanalytics/react/util/TrackerVersion.java +0 -7
- package/dist/index.js +0 -2026
- package/dist/index.js.map +0 -1
- package/ios/RNSnowplowTracker.h +0 -34
- package/ios/RNSnowplowTracker.m +0 -911
- package/ios/Util/NSDictionary+RNSP_TypeMethods.h +0 -33
- package/ios/Util/NSDictionary+RNSP_TypeMethods.m +0 -40
- package/ios/Util/RNConfigUtils.h +0 -44
- package/ios/Util/RNConfigUtils.m +0 -209
- package/ios/Util/RNTrackerVersion.h +0 -27
- package/ios/Util/RNTrackerVersion.m +0 -27
- package/ios/Util/RNUtilities.h +0 -32
- package/ios/Util/RNUtilities.m +0 -68
package/.npmignore
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Demo app
|
|
2
|
+
#
|
|
3
|
+
example/
|
|
4
|
+
|
|
5
|
+
# Local testing workflow
|
|
6
|
+
#
|
|
7
|
+
.scripts/
|
|
8
|
+
tmp/
|
|
9
|
+
|
|
10
|
+
# OSX
|
|
11
|
+
#
|
|
12
|
+
.DS_Store
|
|
13
|
+
|
|
14
|
+
# node.js
|
|
15
|
+
#
|
|
16
|
+
node_modules/
|
|
17
|
+
npm-debug.log
|
|
18
|
+
yarn-error.log
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
# Xcode
|
|
22
|
+
#
|
|
23
|
+
build/
|
|
24
|
+
*.pbxuser
|
|
25
|
+
!default.pbxuser
|
|
26
|
+
*.mode1v3
|
|
27
|
+
!default.mode1v3
|
|
28
|
+
*.mode2v3
|
|
29
|
+
!default.mode2v3
|
|
30
|
+
*.perspectivev3
|
|
31
|
+
!default.perspectivev3
|
|
32
|
+
xcuserdata
|
|
33
|
+
*.xccheckout
|
|
34
|
+
*.moved-aside
|
|
35
|
+
DerivedData
|
|
36
|
+
*.hmap
|
|
37
|
+
*.ipa
|
|
38
|
+
*.xcuserstate
|
|
39
|
+
*.xcworkspace/
|
|
40
|
+
|
|
41
|
+
# CocoaPods
|
|
42
|
+
/ios/Pods/
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
# Android/IntelliJ
|
|
46
|
+
#
|
|
47
|
+
build/
|
|
48
|
+
.idea
|
|
49
|
+
.gradle
|
|
50
|
+
local.properties
|
|
51
|
+
*.iml
|
|
52
|
+
android/.project
|
|
53
|
+
android/.settings/org.eclipse.buildship.core.prefs
|
|
54
|
+
example/android/.settings/org.eclipse.buildship.core.prefs
|
|
55
|
+
example/android/.project
|
|
56
|
+
|
|
57
|
+
# BUCK
|
|
58
|
+
buck-out/
|
|
59
|
+
\.buckd/
|
|
60
|
+
*.keystore
|
package/.nvmrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
v18
|
package/.watchmanconfig
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
package/.yarnrc
ADDED
package/CHANGELOG
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
Version 2.0.0 (2023-09-29)
|
|
2
|
+
--------------------------
|
|
3
|
+
Upgrade project structure and update native trackers to version 5 (#199)
|
|
4
|
+
Disable automatic screen view tracking in the iOS and Android tracker by default (#198)
|
|
5
|
+
Fix buffer option in emitter configuration on Android to set correct value for large setting (#197)
|
|
6
|
+
|
|
7
|
+
Version 1.4.0 (2022-02-04)
|
|
8
|
+
--------------------------
|
|
9
|
+
Add JavaScript tracker core to be used in Expo managed workflow when native trackers are not available (#188)
|
|
10
|
+
Bump Snowplow native tracker dependency to 4.1 (#186)
|
|
11
|
+
Update year in copyright headers to 2023 (#187)
|
|
12
|
+
|
|
13
|
+
Version 1.3.0 (2022-10-03)
|
|
14
|
+
--------------------------
|
|
15
|
+
Upgrade Snowplow mobile trackers to v4 (#167)
|
|
16
|
+
Add anonymous tracking features (#168)
|
|
17
|
+
Add interface to subscribe for events tracked in Web views (#169)
|
|
18
|
+
Add option to add custom headers (#165)
|
|
19
|
+
Enable setting custom path for POST requests (#178)
|
|
20
|
+
Upgrade internal and demo app dependencies (#172)
|
|
21
|
+
Remove circular imports of demo app dependencies when running in demo apps (#174)
|
|
22
|
+
|
|
23
|
+
Version 1.2.1 (2022-04-12)
|
|
24
|
+
--------------------------
|
|
25
|
+
Fix import of non-published NSDictionary helpers from SnowplowTracker on iOS (#161)
|
|
26
|
+
|
|
27
|
+
Version 1.2.0 (2022-03-25)
|
|
28
|
+
--------------------------
|
|
29
|
+
Add support for React Native for tvOS (#154)
|
|
30
|
+
Bump min RN version supported to v0.65+ (#153)
|
|
31
|
+
Add generic type for SelfDescribing event data (#156)
|
|
32
|
+
|
|
33
|
+
Version 1.1.0 (2022-02-07)
|
|
34
|
+
--------------------------
|
|
35
|
+
Update mobile tracker dependencies to v3 (#141)
|
|
36
|
+
Add deep link and message notification events (#142)
|
|
37
|
+
Update demo app to show accessing tracker instance from platform native code (#136)
|
|
38
|
+
Fix compilation error for iOS build on ARM macs (#140)
|
|
39
|
+
Fix check for byteLimitGet when reading emitter configuration (#138)
|
|
40
|
+
Fix check for Android version in GitHub Actions (#134)
|
|
41
|
+
Update year in all copyright notices (#148)
|
|
42
|
+
Update dependencies (#150)
|
|
43
|
+
|
|
44
|
+
Version 1.0.0 (2021-08-09)
|
|
45
|
+
--------------------------
|
|
46
|
+
Fix action-gh-release to specific commit (#133)
|
|
47
|
+
Update devDependencies (#132)
|
|
48
|
+
Publish sourcemaps (#131)
|
|
49
|
+
Lint DemoApp separately (#130)
|
|
50
|
+
Get Session Context Data (#53)
|
|
51
|
+
Update version in podspec (#110)
|
|
52
|
+
Set amended v_tracker indicating react-native (#18)
|
|
53
|
+
Add global contexts (#104)
|
|
54
|
+
Upgrade iOS Tracker and Android Tracker to v2 (#113)
|
|
55
|
+
Add test suite (#60)
|
|
56
|
+
|
|
57
|
+
Version 0.2.0 (2021-06-21)
|
|
58
|
+
--------------------------
|
|
59
|
+
Bump dependencies in DemoApp (#114)
|
|
60
|
+
Port to TypeScript (#115)
|
|
61
|
+
Handle asyncronous issues internally (#78)
|
|
62
|
+
Use ESLint (#126)
|
|
63
|
+
Add homepage and repository in package.json (#125)
|
|
64
|
+
Remove unused files (#124)
|
|
65
|
+
|
|
66
|
+
Version 0.1.7 (2021-05-24)
|
|
67
|
+
--------------------------
|
|
68
|
+
Remove waitForEventStore method and upgrade Android tracker (#92)
|
|
69
|
+
Automate deploy process (#61)
|
|
70
|
+
Fix null transitionType resulting in screen view event failing validation for ios (#122)
|
|
71
|
+
Fix Xcode 12.5 build breaks (#119)
|
|
72
|
+
Fix typo in CHANGELOG (#116)
|
|
73
|
+
Remove JCenter and add MavenCentral (#121)
|
|
74
|
+
Update build.gradle to match rootProject extra properties (#120)
|
|
75
|
+
Fix assembleAndroidTest builds (#118)
|
|
76
|
+
|
|
77
|
+
Version 0.1.6 (2021-04-06)
|
|
78
|
+
--------------------------
|
|
79
|
+
Bump iOS Tracker to 1.7.0 (#111)
|
|
80
|
+
|
|
81
|
+
Version 0.1.5 (2021-03-22)
|
|
82
|
+
--------------------------
|
|
83
|
+
Update DemoApp versions (#106)
|
|
84
|
+
Loosen peer dependency requirements (#105)
|
|
85
|
+
|
|
86
|
+
Note: v0.1.4 was skipped due to an error in publishing process.
|
|
87
|
+
---------------------------------------------------------------
|
|
88
|
+
|
|
89
|
+
Version 0.1.3 (2021-02-12)
|
|
90
|
+
--------------------------
|
|
91
|
+
Fix Xcode 12 compatibility (#102)
|
|
92
|
+
|
|
93
|
+
Version 0.1.2 (2021-01-15)
|
|
94
|
+
--------------------------
|
|
95
|
+
Upgrade obj-c tracker to 1.6.2 (#98)
|
|
96
|
+
|
|
97
|
+
Version 0.1.1 (2020-09-03)
|
|
98
|
+
--------------------------
|
|
99
|
+
Fix Android tracker version to 1.5.x (#91)
|
|
100
|
+
|
|
101
|
+
Version 0.1.0 (2020-07-10)
|
|
102
|
+
--------------------------
|
|
103
|
+
Add issue templates (#89)
|
|
104
|
+
Add CONTRIBUTING.md (#80)
|
|
105
|
+
Use recommended config as defaults (#86)
|
|
106
|
+
Fix iOS null comparison warnings (#85)
|
|
107
|
+
Return after promise rejection on Android (#84)
|
|
108
|
+
Update arguments and var names for consistency (#83)
|
|
109
|
+
Update DemoApp (#82)
|
|
110
|
+
Use fast fail on iOS (#87)
|
|
111
|
+
Update README (#77)
|
|
112
|
+
Dynamically use latest minor version of native tracker (#19)
|
|
113
|
+
Cleanup code formatting (#75)
|
|
114
|
+
Add Snyk Github Action (#71)
|
|
115
|
+
Add license (#62)
|
|
116
|
+
Handle setSubjectData values appropriately (#70)
|
|
117
|
+
Return promise on intialize() (#66)
|
|
118
|
+
Remove deprecated options (#69)
|
|
119
|
+
Expand testing scripts (#72)
|
|
120
|
+
Refactor method instrumentation (#58)
|
|
121
|
+
Fix compile warnings caused by unsafe comparison (#73)
|
|
122
|
+
Fix double self calls (#74)
|
|
123
|
+
Remove screen_id workaround (#57)
|
|
124
|
+
|
|
125
|
+
Version 0.1.0-alpha.17 (2020-05-04)
|
|
126
|
+
-----------------------------------
|
|
127
|
+
Use yarn everywhere for testing (#55)
|
|
128
|
+
Update ios tracker version to 1.3.0 (#54)
|
|
129
|
+
|
|
130
|
+
Version 0.1.0-alpha.16 (2020-04-16)
|
|
131
|
+
-----------------------------------
|
|
132
|
+
Update .npmignore and .gitignore (#51)
|
|
133
|
+
Update README (#50)
|
|
134
|
+
Update Demo App (#48)
|
|
135
|
+
Add trackPageView (#33)
|
|
136
|
+
Add script for clean build (#47)
|
|
137
|
+
Add setSubjectData method (#46)
|
|
138
|
+
Update android tracker version (#45)
|
|
139
|
+
Add Standard Settings (#34)
|
|
140
|
+
|
|
141
|
+
Version 0.1.0-alpha.15 (2020-02-06)
|
|
142
|
+
-----------------------------------
|
|
143
|
+
Cleanup Repo (#29)
|
|
144
|
+
Update DemoApp (#21)
|
|
145
|
+
Update ios Tracker dependency to remove mandatory dynamic build (#22)
|
|
146
|
+
|
|
147
|
+
Version 0.1.0-alpha.14 (2019-10-22)
|
|
148
|
+
----------------------------------
|
|
149
|
+
Update iOS to incorporate patch release (#23)
|
|
150
|
+
|
|
151
|
+
Version 0.1.0-alpha.13 (2019-10-14)
|
|
152
|
+
-----------------------------------
|
|
153
|
+
Make optional StructEvent parameters nullable for iOS (#12)
|
|
154
|
+
Add ScreenViews (#14)
|
|
155
|
+
Fix bug in android getContexts (#16)
|
|
156
|
+
Add mobile context (#13)
|
|
157
|
+
Update README.md (#5)
|
|
158
|
+
Fix path in Android package export (#8)
|
|
159
|
+
Fix high severity vulnerabilities in DemoApp (#7)
|
|
160
|
+
Bump DemoApp react-native version (#6)
|
|
161
|
+
Fix import in Demo Application (#3)
|
|
162
|
+
Fix Android Numeric type bug (#4)
|
|
163
|
+
|
|
164
|
+
Version 0.1.0-alpha.9 (2019-08-08)
|
|
165
|
+
----------------------------------
|
|
166
|
+
Initial Release
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
The Snowplow React Native Tracker is maintained by the Engineering team at Snowplow Analytics. We welcome suggestions for improvements and bug fixes to all Snowplow Trackers.
|
|
4
|
+
|
|
5
|
+
We are extremely grateful for all contributions we receive, whether that is reporting an issue or a change to the code which can be made in the form of a pull request.
|
|
6
|
+
|
|
7
|
+
For support requests, please use our community support Discourse forum: https://discourse.snowplowanalytics.com/.
|
|
8
|
+
|
|
9
|
+
## Setting up an Environment
|
|
10
|
+
|
|
11
|
+
Instructions on how to build and run tests are available in the [README.md](README.md). The README will also list any requirements that you will need to install first before being able to build and run the tests.
|
|
12
|
+
|
|
13
|
+
You should ensure you are comfortable building and testing the existing release before adding new functionality or fixing issues.
|
|
14
|
+
|
|
15
|
+
## Issues
|
|
16
|
+
|
|
17
|
+
### Creating an issue
|
|
18
|
+
|
|
19
|
+
The project contains an issue template which should help guiding you through the process. However, please keep in mind that support requests should go to our Discourse forum: https://discourse.snowplowanalytics.com/ and not GitHub issues.
|
|
20
|
+
|
|
21
|
+
It's also a good idea to log an issue before starting to work on a pull request to discuss it with the maintainers. A pull request is just one solution to a problem and it is often a good idea to talk about the problem with the maintainers first.
|
|
22
|
+
|
|
23
|
+
### Working on an issue
|
|
24
|
+
|
|
25
|
+
If you see an issue you would like to work on, please let us know in the issue! That will help us in terms of scheduling and
|
|
26
|
+
not doubling the amount of work.
|
|
27
|
+
|
|
28
|
+
If you don't know where to start contributing, you can look at
|
|
29
|
+
[the issues labeled `good first issue`](https://github.com/snowplow-incubator/snowplow-react-native-tracker/labels/good%20first%20issue).
|
|
30
|
+
|
|
31
|
+
## Pull requests
|
|
32
|
+
|
|
33
|
+
These are a few guidelines to keep in mind when opening pull requests.
|
|
34
|
+
|
|
35
|
+
### Guidelines
|
|
36
|
+
|
|
37
|
+
Please supply a good PR description. These are very helpful and help the maintainers to understand _why_ the change has been made, not just _what_ changes have been made.
|
|
38
|
+
|
|
39
|
+
Please try and keep your PR to a single feature of fix. This might mean breaking up a feature into multiple PRs but this makes it easier for the maintainers to review and also reduces the risk in each change.
|
|
40
|
+
|
|
41
|
+
Please review your own PR as you would do it you were a reviewer first. This is a great way to spot any mistakes you made when writing the change. Additionally, ensure your code compiles and all tests pass.
|
|
42
|
+
|
|
43
|
+
### Commit hygiene
|
|
44
|
+
|
|
45
|
+
We keep a strict 1-to-1 correspondance between commits and issues, as such our commit messages are formatted in the following
|
|
46
|
+
fashion:
|
|
47
|
+
|
|
48
|
+
`Issue Description (closes #1234)`
|
|
49
|
+
|
|
50
|
+
for example:
|
|
51
|
+
|
|
52
|
+
`Fix Issue with Tracker (closes #1234)`
|
|
53
|
+
|
|
54
|
+
### Writing tests
|
|
55
|
+
|
|
56
|
+
Whenever necessary, it's good practice to add the corresponding tests to whichever feature you are working on.
|
|
57
|
+
Any non-trivial PR must have tests and will not be accepted without them.
|
|
58
|
+
|
|
59
|
+
### Feedback cycle
|
|
60
|
+
|
|
61
|
+
Reviews should happen fairly quickly during weekdays.
|
|
62
|
+
If you feel your pull request has been forgotten, please ping one or more maintainers in the pull request.
|
|
63
|
+
|
|
64
|
+
### Getting your pull request merged
|
|
65
|
+
|
|
66
|
+
If your pull request is fairly chunky, there might be a non-trivial delay between the moment the pull request is approved and the moment it gets merged. This is because your pull request will have been scheduled for a specific milestone which might or might not be actively worked on by a maintainer at the moment.
|
|
67
|
+
|
|
68
|
+
### Contributor license agreement
|
|
69
|
+
|
|
70
|
+
We require outside contributors to sign a Contributor license agreement (or CLA) before we can merge their pull requests.
|
|
71
|
+
You can find more information on the topic in [the dedicated wiki page](https://github.com/snowplow/snowplow/wiki/CLA).
|
|
72
|
+
The @snowplowcla bot will guide you through the process.
|
|
73
|
+
|
|
74
|
+
## Getting in touch
|
|
75
|
+
|
|
76
|
+
### Community support requests
|
|
77
|
+
|
|
78
|
+
Please do not log an issue if you are asking for support, all of our community support requests go through our Discourse forum: https://discourse.snowplowanalytics.com/.
|
|
79
|
+
|
|
80
|
+
Posting your problem there ensures more people will see it and you should get support faster than creating a new issue on GitHub. Please do create a new issue on GitHub if you think you've found a bug though!
|
package/README.md
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
# @snowplow/react-native-tracker
|
|
3
2
|
|
|
4
3
|
[![actively-maintained]][tracker-classification]
|
|
@@ -9,28 +8,31 @@
|
|
|
9
8
|
[![RN version][react-native-v-image]][react-native-v]
|
|
10
9
|
[![downloads][downloads-dm-image]][downloads-dm]
|
|
11
10
|
|
|
12
|
-
|
|
13
11
|
Snowplow is a scalable open-source platform for rich, high quality, low-latency data collection. It is designed to collect high quality, complete behavioral data for enterprise business.
|
|
14
12
|
|
|
15
13
|
**To find out more, please check out the [Snowplow website][website] and our [documentation][docs].**
|
|
16
14
|
|
|
17
|
-
|
|
18
15
|
## Snowplow React-Native Tracker Overview
|
|
19
16
|
|
|
20
17
|
The Snowplow React Native Tracker allows you to add analytics to your React Native apps when using a [Snowplow][snowplow] pipeline.
|
|
21
18
|
|
|
22
19
|
With this library you can collect granular event-level data as your users interact with your React Native applications. It is build on top of Snowplow's [Mobile Native][native-trackers] [iOS][objc-tracker] and [Android][android-tracker] Trackers, in order to support the full range of out-of-the-box Snowplow events and tracking capabilities.
|
|
23
20
|
|
|
24
|
-
|
|
25
21
|
## Quick start
|
|
26
22
|
|
|
27
23
|
From the root of your [React Native][react-native] project:
|
|
28
24
|
|
|
29
|
-
```
|
|
25
|
+
```sh
|
|
30
26
|
npm install --save @snowplow/react-native-tracker
|
|
31
27
|
npx pod-install
|
|
32
28
|
```
|
|
33
29
|
|
|
30
|
+
In your `ios/Podfile` file (unless using Expo Go), please add the `FMDB` dependency with `modular_headers` set to `true`. This is necessary to make the `FMDB` package generate module maps so that it can be used by the tracker:
|
|
31
|
+
|
|
32
|
+
```rb
|
|
33
|
+
pod 'FMDB', :modular_headers => true
|
|
34
|
+
```
|
|
35
|
+
|
|
34
36
|
Then, instrument the tracker in your app and start tracking events. For example:
|
|
35
37
|
|
|
36
38
|
```javascript
|
|
@@ -48,7 +50,6 @@ The Snowplow React Native Tracker also provides first-class support for TypeScri
|
|
|
48
50
|
|
|
49
51
|
See also our [DemoApp][demoapp] for an example implementation.
|
|
50
52
|
|
|
51
|
-
|
|
52
53
|
## Find out more
|
|
53
54
|
|
|
54
55
|
| Technical Docs | Setup Guide |
|
|
@@ -56,135 +57,50 @@ See also our [DemoApp][demoapp] for an example implementation.
|
|
|
56
57
|
| [![i1][techdocs-image]][techdocs] | [![i2][setup-image]][setup] |
|
|
57
58
|
| [Technical Docs][techdocs] | [Setup Guide][setup] |
|
|
58
59
|
|
|
59
|
-
|
|
60
|
-
|
|
61
60
|
## Maintainer quick start
|
|
62
61
|
|
|
63
|
-
### Launching the DemoApp
|
|
64
|
-
|
|
65
62
|
Assuming a [react-native environment][react-native-environment] is set up, from the root of the repository:
|
|
66
63
|
|
|
67
64
|
```bash
|
|
68
|
-
|
|
69
|
-
npm run bootstrap
|
|
70
|
-
cd DemoApp
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
Replace "placeholder" with the URI for your Snowplow Mini or other Snowplow collector in `DemoApp/App.js`.
|
|
74
|
-
|
|
75
|
-
**For Android:**
|
|
76
|
-
|
|
77
|
-
```bash
|
|
78
|
-
yarn android
|
|
79
|
-
```
|
|
80
|
-
_Note_: Linux users who want to run the DemoApp for Android, would also need to run `yarn start` in a separate terminal.
|
|
81
|
-
|
|
82
|
-
**For iOS:**
|
|
83
|
-
|
|
84
|
-
```bash
|
|
85
|
-
yarn pods && yarn ios
|
|
65
|
+
yarn
|
|
86
66
|
```
|
|
87
67
|
|
|
88
|
-
|
|
68
|
+
### Unit tests
|
|
89
69
|
|
|
90
|
-
|
|
91
|
-
# android
|
|
92
|
-
bash .scripts/quickTest.sh android
|
|
93
|
-
# ios
|
|
94
|
-
bash .scripts/quickTest.sh ios
|
|
95
|
-
# both
|
|
96
|
-
bash .scripts/quickTest.sh both
|
|
97
|
-
```
|
|
70
|
+
To run the unit tests, simply execute:
|
|
98
71
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
```bash
|
|
102
|
-
# android
|
|
103
|
-
bash .scripts/cleanBuildAndRun.sh android
|
|
104
|
-
# ios
|
|
105
|
-
bash .scripts/cleanBuildAndRun.sh ios
|
|
106
|
-
# both
|
|
107
|
-
bash .scripts/cleanBuildAndRun.sh both
|
|
72
|
+
```sh
|
|
73
|
+
yarn test
|
|
108
74
|
```
|
|
109
75
|
|
|
110
|
-
### Launching the
|
|
111
|
-
|
|
112
|
-
Assuming a [react-native environment][react-native-environment] is set up, from the root of the repository:
|
|
113
|
-
|
|
114
|
-
```bash
|
|
115
|
-
npm install
|
|
116
|
-
npm run bootstrap
|
|
117
|
-
cd DemoAppTV
|
|
118
|
-
yarn
|
|
119
|
-
```
|
|
76
|
+
### Launching the example app
|
|
120
77
|
|
|
121
|
-
Replace "placeholder" with the URI for your Snowplow Mini or other Snowplow collector in `
|
|
78
|
+
Replace "placeholder" with the URI for your Snowplow Mini or other Snowplow collector in `DemoApp/App.js`.
|
|
122
79
|
|
|
123
|
-
**For Android
|
|
80
|
+
**For Android:**
|
|
124
81
|
|
|
125
82
|
```bash
|
|
126
|
-
yarn android
|
|
83
|
+
yarn example android
|
|
127
84
|
```
|
|
128
|
-
|
|
129
85
|
_Note_: Linux users who want to run the DemoApp for Android, would also need to run `yarn start` in a separate terminal.
|
|
130
86
|
|
|
131
|
-
**For
|
|
87
|
+
**For iOS:**
|
|
132
88
|
|
|
133
89
|
```bash
|
|
134
|
-
yarn
|
|
90
|
+
yarn example ios
|
|
135
91
|
```
|
|
136
92
|
|
|
137
|
-
Note: If you are using simulator with a name different than "Apple TV", you will need to update the `--simulator` parameter in the "tvos" script call in `DemoAppTV/package.json`.
|
|
138
|
-
|
|
139
93
|
### End-to-end tests
|
|
140
94
|
|
|
141
95
|
Snowplow React-Native Tracker is being end-to-end tested using [Snowplow Micro][snowplow-micro] and [Detox][detox]. To run these tests locally:
|
|
142
96
|
|
|
143
|
-
#### Prerequisites
|
|
144
|
-
|
|
145
|
-
1. **Docker**: Used to launch Snowplow Micro and expose its collector endpoint on `http://0.0.0.0:9090`.
|
|
146
|
-
2. **Perl**: Used to substitute the endpoint placeholders in `DemoApp/App.js` with Micro's endpoint for respective emulator/simulator.
|
|
147
|
-
3. **Detox** platform-specific development environment setup:
|
|
148
|
-
- [For Android][detox-android-env]. Namely:
|
|
149
|
-
- Java 8
|
|
150
|
-
- Android SDK
|
|
151
|
-
- Android Open-Source Project emulator
|
|
152
|
-
- [For iOS][detox-ios-env]. Namely:
|
|
153
|
-
- applesimutils
|
|
154
|
-
|
|
155
97
|
#### Testing
|
|
156
98
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
cd DemoApp
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
- **e2e-android**
|
|
166
|
-
```
|
|
167
|
-
yarn e2e:android:micro
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
- **e2e-ios**
|
|
171
|
-
```
|
|
172
|
-
yarn e2e:ios:micro
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
The above commands will take care to kill Micro's running container before exiting. If you'd prefer to keep Micro running in order to inspect the tracked events through Micro's REST API, you can alternatively control Micro through:
|
|
176
|
-
|
|
177
|
-
```
|
|
178
|
-
yarn micro:run
|
|
179
|
-
yarn micro:stop
|
|
180
|
-
```
|
|
181
|
-
and run the e2e-tests on their own:
|
|
182
|
-
```
|
|
183
|
-
yarn e2e:android
|
|
184
|
-
# or
|
|
185
|
-
yarn e2e:ios
|
|
186
|
-
```
|
|
187
|
-
|
|
99
|
+
1. Start your [Snowplow Micro][snowplow-micro] instance locally.
|
|
100
|
+
2. Replace the `placeholder` value for the `collectorEndpoint` variable in `example/src/App.js` (use the network IP address of your computer or ngrok).
|
|
101
|
+
3. Start the end-to-end tests:
|
|
102
|
+
* On Android, run `yarn e2e:android`
|
|
103
|
+
* On iOS, run `yarn e2e:ios`
|
|
188
104
|
|
|
189
105
|
## Contributing
|
|
190
106
|
|
|
@@ -195,8 +111,6 @@ Feedback and contributions are welcome - if you have identified a bug, please lo
|
|
|
195
111
|
| [![i3][contributing-image]][contributing] |
|
|
196
112
|
| [Contributing][contributing] |
|
|
197
113
|
|
|
198
|
-
|
|
199
|
-
|
|
200
114
|
## Copyright and license
|
|
201
115
|
|
|
202
116
|
The Snowplow React Native Tracker is copyright 2020-2023 Snowplow Analytics Ltd, 2019 DataCamp.
|
|
@@ -210,7 +124,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
210
124
|
See the License for the specific language governing permissions and
|
|
211
125
|
limitations under the License.
|
|
212
126
|
|
|
213
|
-
|
|
214
127
|
[tracker-classification]: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/tracker-maintenance-classification/
|
|
215
128
|
[actively-maintained]: https://img.shields.io/static/v1?style=flat&label=Snowplow&message=Actively%20Maintained&color=6638b8&labelColor=9ba0aa&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAeFBMVEVMaXGXANeYANeXANZbAJmXANeUANSQAM+XANeMAMpaAJhZAJeZANiXANaXANaOAM2WANVnAKWXANZ9ALtmAKVaAJmXANZaAJlXAJZdAJxaAJlZAJdbAJlbAJmQAM+UANKZANhhAJ+EAL+BAL9oAKZnAKVjAKF1ALNBd8J1AAAAKHRSTlMAa1hWXyteBTQJIEwRgUh2JjJon21wcBgNfmc+JlOBQjwezWF2l5dXzkW3/wAAAHpJREFUeNokhQOCA1EAxTL85hi7dXv/E5YPCYBq5DeN4pcqV1XbtW/xTVMIMAZE0cBHEaZhBmIQwCFofeprPUHqjmD/+7peztd62dWQRkvrQayXkn01f/gWp2CrxfjY7rcZ5V7DEMDQgmEozFpZqLUYDsNwOqbnMLwPAJEwCopZxKttAAAAAElFTkSuQmCC
|
|
216
129
|
[gh-actions]: https://github.com/snowplow-incubator/snowplow-react-native-tracker/actions
|
package/android/build.gradle
CHANGED
|
@@ -1,54 +1,110 @@
|
|
|
1
|
-
def safeExtGet(prop, fallback) {
|
|
2
|
-
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
|
3
|
-
}
|
|
4
|
-
|
|
5
1
|
buildscript {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
google()
|
|
9
|
-
}
|
|
2
|
+
// Buildscript is evaluated before everything else so we can't use getExtOrDefault
|
|
3
|
+
def kotlin_version = rootProject.ext.has("kotlinVersion") ? rootProject.ext.get("kotlinVersion") : project.properties["ReactNativeTracker_kotlinVersion"]
|
|
10
4
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
5
|
+
repositories {
|
|
6
|
+
google()
|
|
7
|
+
mavenCentral()
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
dependencies {
|
|
11
|
+
classpath "com.android.tools.build:gradle:7.2.1"
|
|
12
|
+
// noinspection DifferentKotlinGradleVersion
|
|
13
|
+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
def isNewArchitectureEnabled() {
|
|
18
|
+
return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true"
|
|
14
19
|
}
|
|
15
20
|
|
|
16
21
|
apply plugin: "com.android.library"
|
|
22
|
+
apply plugin: "kotlin-android"
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') }
|
|
26
|
+
|
|
27
|
+
if (isNewArchitectureEnabled()) {
|
|
28
|
+
apply plugin: "com.facebook.react"
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
def getExtOrDefault(name) {
|
|
32
|
+
return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties["ReactNativeTracker_" + name]
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
def getExtOrIntegerDefault(name) {
|
|
36
|
+
return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties["ReactNativeTracker_" + name]).toInteger()
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
def supportsNamespace() {
|
|
40
|
+
def parsed = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')
|
|
41
|
+
def major = parsed[0].toInteger()
|
|
42
|
+
def minor = parsed[1].toInteger()
|
|
43
|
+
|
|
44
|
+
// Namespace support was added in 7.3.0
|
|
45
|
+
if (major == 7 && minor >= 3) {
|
|
46
|
+
return true
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return major >= 8
|
|
50
|
+
}
|
|
17
51
|
|
|
18
52
|
android {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
versionName "1.0"
|
|
27
|
-
}
|
|
28
|
-
lintOptions {
|
|
29
|
-
abortOnError false
|
|
53
|
+
if (supportsNamespace()) {
|
|
54
|
+
namespace "com.snowplow.reactnativetracker"
|
|
55
|
+
|
|
56
|
+
sourceSets {
|
|
57
|
+
main {
|
|
58
|
+
manifest.srcFile "src/main/AndroidManifestNew.xml"
|
|
59
|
+
}
|
|
30
60
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
compileSdkVersion getExtOrIntegerDefault("compileSdkVersion")
|
|
64
|
+
|
|
65
|
+
defaultConfig {
|
|
66
|
+
minSdkVersion getExtOrIntegerDefault("minSdkVersion")
|
|
67
|
+
targetSdkVersion getExtOrIntegerDefault("targetSdkVersion")
|
|
68
|
+
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
|
|
69
|
+
}
|
|
70
|
+
buildTypes {
|
|
71
|
+
release {
|
|
72
|
+
minifyEnabled false
|
|
34
73
|
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
lintOptions {
|
|
77
|
+
disable "GradleCompatible"
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
compileOptions {
|
|
81
|
+
sourceCompatibility JavaVersion.VERSION_1_8
|
|
82
|
+
targetCompatibility JavaVersion.VERSION_1_8
|
|
83
|
+
}
|
|
84
|
+
|
|
35
85
|
}
|
|
36
86
|
|
|
37
87
|
repositories {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
url "$rootDir/../node_modules/react-native/android"
|
|
41
|
-
}
|
|
42
|
-
mavenCentral()
|
|
43
|
-
google()
|
|
88
|
+
mavenCentral()
|
|
89
|
+
google()
|
|
44
90
|
}
|
|
45
91
|
|
|
92
|
+
def kotlin_version = getExtOrDefault("kotlinVersion")
|
|
93
|
+
|
|
46
94
|
dependencies {
|
|
47
|
-
|
|
48
|
-
|
|
95
|
+
// For < 0.71, this will be from the local maven repo
|
|
96
|
+
// For > 0.71, this will be replaced by `com.facebook.react:react-android:$version` by react gradle plugin
|
|
97
|
+
//noinspection GradleDynamicVersion
|
|
98
|
+
implementation "com.facebook.react:react-native:+"
|
|
99
|
+
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
100
|
+
implementation "com.snowplowanalytics:snowplow-android-tracker:5.4.4"
|
|
101
|
+
implementation "com.squareup.okhttp3:okhttp:4.10.0"
|
|
102
|
+
}
|
|
49
103
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
104
|
+
if (isNewArchitectureEnabled()) {
|
|
105
|
+
react {
|
|
106
|
+
jsRootDir = file("../src/")
|
|
107
|
+
libraryName = "ReactNativeTracker"
|
|
108
|
+
codegenJavaPackageName = "com.snowplow.reactnativetracker"
|
|
109
|
+
}
|
|
54
110
|
}
|
|
Binary file
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
#Sun May 19 20:26:19 EDT 2019
|
|
2
1
|
distributionBase=GRADLE_USER_HOME
|
|
3
2
|
distributionPath=wrapper/dists
|
|
3
|
+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
|
|
4
4
|
zipStoreBase=GRADLE_USER_HOME
|
|
5
5
|
zipStorePath=wrapper/dists
|
|
6
|
-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
|