@snowplow/react-native-tracker 2.1.1 → 4.0.2-dev.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.
Files changed (232) hide show
  1. package/LICENSE +29 -203
  2. package/README.md +59 -143
  3. package/dist/index.cjs.d.ts +499 -0
  4. package/dist/index.cjs.js +2656 -0
  5. package/dist/index.cjs.js.map +1 -0
  6. package/dist/index.cjs.min.d.ts +499 -0
  7. package/dist/index.cjs.min.js +63 -0
  8. package/dist/index.cjs.min.js.map +1 -0
  9. package/dist/index.module.d.ts +499 -0
  10. package/dist/index.module.js +250 -0
  11. package/dist/index.module.js.map +1 -0
  12. package/package.json +48 -158
  13. package/.editorconfig +0 -15
  14. package/.eslintignore +0 -6
  15. package/.gitattributes +0 -3
  16. package/.github/ISSUE_TEMPLATE/bug_report.md +0 -29
  17. package/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
  18. package/.github/actions/setup/action.yml +0 -28
  19. package/.github/workflows/build.yml +0 -155
  20. package/.github/workflows/deploy.yml +0 -97
  21. package/.github/workflows/e2e-android.yml +0 -121
  22. package/.github/workflows/e2e-ios.yml +0 -95
  23. package/.github/workflows/snyk.yml +0 -21
  24. package/.gitignore +0 -70
  25. package/.npmignore +0 -60
  26. package/.nvmrc +0 -1
  27. package/.watchmanconfig +0 -1
  28. package/.yarnrc +0 -3
  29. package/CHANGELOG +0 -180
  30. package/CONTRIBUTING.md +0 -80
  31. package/android/build.gradle +0 -110
  32. package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  33. package/android/gradle/wrapper/gradle-wrapper.properties +0 -5
  34. package/android/gradle.properties +0 -5
  35. package/android/gradlew +0 -234
  36. package/android/gradlew.bat +0 -89
  37. package/android/src/main/AndroidManifest.xml +0 -3
  38. package/android/src/main/AndroidManifestNew.xml +0 -2
  39. package/android/src/main/java/com/snowplow/reactnativetracker/ReactNativeTrackerModule.kt +0 -744
  40. package/android/src/main/java/com/snowplow/reactnativetracker/ReactNativeTrackerPackage.kt +0 -17
  41. package/android/src/main/java/com/snowplow/reactnativetracker/util/ConfigUtil.kt +0 -274
  42. package/android/src/main/java/com/snowplow/reactnativetracker/util/EventUtil.kt +0 -233
  43. package/android/src/main/java/com/snowplow/reactnativetracker/util/TrackerVersion.kt +0 -5
  44. package/babel.config.js +0 -3
  45. package/example/.watchmanconfig +0 -1
  46. package/example/Gemfile +0 -6
  47. package/example/android/app/build.gradle +0 -129
  48. package/example/android/app/debug.keystore +0 -0
  49. package/example/android/app/proguard-rules.pro +0 -10
  50. package/example/android/app/src/androidTest/java/com/reactnativetrackerexample/DetoxTest.java +0 -36
  51. package/example/android/app/src/androidTest/java/com/reactnativetrackerexample/DetoxTestAppJUnitRunner.java +0 -21
  52. package/example/android/app/src/debug/AndroidManifest.xml +0 -13
  53. package/example/android/app/src/debug/java/com/reactnativetrackerexample/ReactNativeFlipper.java +0 -75
  54. package/example/android/app/src/main/AndroidManifest.xml +0 -26
  55. package/example/android/app/src/main/java/com/reactnativetrackerexample/MainActivity.java +0 -32
  56. package/example/android/app/src/main/java/com/reactnativetrackerexample/MainApplication.java +0 -62
  57. package/example/android/app/src/main/res/drawable/rn_edit_text_material.xml +0 -36
  58. package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  59. package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  60. package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  61. package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  62. package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  63. package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  64. package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  65. package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  66. package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  67. package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  68. package/example/android/app/src/main/res/values/strings.xml +0 -3
  69. package/example/android/app/src/main/res/values/styles.xml +0 -9
  70. package/example/android/app/src/release/java/com/reactnativetrackerexample/ReactNativeFlipper.java +0 -20
  71. package/example/android/build.gradle +0 -31
  72. package/example/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  73. package/example/android/gradle/wrapper/gradle-wrapper.properties +0 -6
  74. package/example/android/gradle.properties +0 -44
  75. package/example/android/gradlew +0 -244
  76. package/example/android/gradlew.bat +0 -92
  77. package/example/android/settings.gradle +0 -4
  78. package/example/app.json +0 -4
  79. package/example/babel.config.js +0 -17
  80. package/example/detox.config.js +0 -92
  81. package/example/e2e/config.json +0 -10
  82. package/example/e2e/emitEvents.e2e.detox.js +0 -95
  83. package/example/e2e/environment.js +0 -23
  84. package/example/e2e/helpers/microCommands.js +0 -140
  85. package/example/e2e/helpers/microHelpers.js +0 -333
  86. package/example/e2e/helpers/microHelpers.test.js +0 -295
  87. package/example/e2e/helpers/schemas.js +0 -49
  88. package/example/e2e/jest.config.js +0 -16
  89. package/example/e2e/setup.js +0 -4
  90. package/example/e2e/testEvents.micro.test.js +0 -287
  91. package/example/index.js +0 -5
  92. package/example/ios/.xcode.env +0 -11
  93. package/example/ios/Podfile +0 -62
  94. package/example/ios/Podfile.lock +0 -730
  95. package/example/ios/ReactNativeTrackerExample/AppDelegate.h +0 -6
  96. package/example/ios/ReactNativeTrackerExample/AppDelegate.mm +0 -26
  97. package/example/ios/ReactNativeTrackerExample/Images.xcassets/AppIcon.appiconset/Contents.json +0 -53
  98. package/example/ios/ReactNativeTrackerExample/Images.xcassets/Contents.json +0 -6
  99. package/example/ios/ReactNativeTrackerExample/Info.plist +0 -55
  100. package/example/ios/ReactNativeTrackerExample/LaunchScreen.storyboard +0 -47
  101. package/example/ios/ReactNativeTrackerExample/PrivacyInfo.xcprivacy +0 -37
  102. package/example/ios/ReactNativeTrackerExample/main.m +0 -10
  103. package/example/ios/ReactNativeTrackerExample-Bridging-Header.h +0 -3
  104. package/example/ios/ReactNativeTrackerExample.xcodeproj/project.pbxproj +0 -739
  105. package/example/ios/ReactNativeTrackerExample.xcodeproj/xcshareddata/xcschemes/ReactNativeTrackerExample.xcscheme +0 -88
  106. package/example/ios/ReactNativeTrackerExample.xcworkspace/contents.xcworkspacedata +0 -10
  107. package/example/ios/ReactNativeTrackerExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  108. package/example/ios/ReactNativeTrackerExampleTests/Info.plist +0 -24
  109. package/example/ios/ReactNativeTrackerExampleTests/ReactNativeTrackerExampleTests.m +0 -66
  110. package/example/metro.config.js +0 -45
  111. package/example/package.json +0 -54
  112. package/example/react-native.config.js +0 -10
  113. package/example/src/App.js +0 -566
  114. package/example/tsconfig.json +0 -5
  115. package/example/yarn.lock +0 -7703
  116. package/ios/ReactNativeTracker-Bridging-Header.h +0 -2
  117. package/ios/ReactNativeTracker.mm +0 -175
  118. package/ios/ReactNativeTracker.swift +0 -822
  119. package/ios/ReactNativeTracker.xcodeproj/project.pbxproj +0 -301
  120. package/ios/Util/ConfigUtils.swift +0 -209
  121. package/ios/Util/TrackerVersion.swift +0 -3
  122. package/ios/Util/Utilities.swift +0 -37
  123. package/lefthook.yml +0 -11
  124. package/lib/commonjs/api.js +0 -490
  125. package/lib/commonjs/api.js.map +0 -1
  126. package/lib/commonjs/configurations.js +0 -196
  127. package/lib/commonjs/configurations.js.map +0 -1
  128. package/lib/commonjs/constants.js +0 -77
  129. package/lib/commonjs/constants.js.map +0 -1
  130. package/lib/commonjs/events.js +0 -277
  131. package/lib/commonjs/events.js.map +0 -1
  132. package/lib/commonjs/index.js +0 -132
  133. package/lib/commonjs/index.js.map +0 -1
  134. package/lib/commonjs/jsCore.js +0 -427
  135. package/lib/commonjs/jsCore.js.map +0 -1
  136. package/lib/commonjs/native.js +0 -16
  137. package/lib/commonjs/native.js.map +0 -1
  138. package/lib/commonjs/subject.js +0 -235
  139. package/lib/commonjs/subject.js.map +0 -1
  140. package/lib/commonjs/tracker.js +0 -248
  141. package/lib/commonjs/tracker.js.map +0 -1
  142. package/lib/commonjs/types.js +0 -2
  143. package/lib/commonjs/types.js.map +0 -1
  144. package/lib/commonjs/utils.js +0 -72
  145. package/lib/commonjs/utils.js.map +0 -1
  146. package/lib/commonjs/webViewInterface.js +0 -66
  147. package/lib/commonjs/webViewInterface.js.map +0 -1
  148. package/lib/module/api.js +0 -452
  149. package/lib/module/api.js.map +0 -1
  150. package/lib/module/configurations.js +0 -184
  151. package/lib/module/configurations.js.map +0 -1
  152. package/lib/module/constants.js +0 -72
  153. package/lib/module/constants.js.map +0 -1
  154. package/lib/module/events.js +0 -259
  155. package/lib/module/events.js.map +0 -1
  156. package/lib/module/index.js +0 -120
  157. package/lib/module/index.js.map +0 -1
  158. package/lib/module/jsCore.js +0 -424
  159. package/lib/module/jsCore.js.map +0 -1
  160. package/lib/module/native.js +0 -12
  161. package/lib/module/native.js.map +0 -1
  162. package/lib/module/subject.js +0 -222
  163. package/lib/module/subject.js.map +0 -1
  164. package/lib/module/tracker.js +0 -234
  165. package/lib/module/tracker.js.map +0 -1
  166. package/lib/module/types.js +0 -2
  167. package/lib/module/types.js.map +0 -1
  168. package/lib/module/utils.js +0 -66
  169. package/lib/module/utils.js.map +0 -1
  170. package/lib/module/webViewInterface.js +0 -62
  171. package/lib/module/webViewInterface.js.map +0 -1
  172. package/lib/typescript/__tests__/api.test.d.ts +0 -2
  173. package/lib/typescript/__tests__/api.test.d.ts.map +0 -1
  174. package/lib/typescript/__tests__/configurations.test.d.ts +0 -2
  175. package/lib/typescript/__tests__/configurations.test.d.ts.map +0 -1
  176. package/lib/typescript/__tests__/events.test.d.ts +0 -2
  177. package/lib/typescript/__tests__/events.test.d.ts.map +0 -1
  178. package/lib/typescript/__tests__/index.test.d.ts +0 -2
  179. package/lib/typescript/__tests__/index.test.d.ts.map +0 -1
  180. package/lib/typescript/__tests__/jsCore.test.d.ts +0 -2
  181. package/lib/typescript/__tests__/jsCore.test.d.ts.map +0 -1
  182. package/lib/typescript/__tests__/utils.test.d.ts +0 -2
  183. package/lib/typescript/__tests__/utils.test.d.ts.map +0 -1
  184. package/lib/typescript/api.d.ts +0 -240
  185. package/lib/typescript/api.d.ts.map +0 -1
  186. package/lib/typescript/configurations.d.ts +0 -73
  187. package/lib/typescript/configurations.d.ts.map +0 -1
  188. package/lib/typescript/constants.d.ts +0 -64
  189. package/lib/typescript/constants.d.ts.map +0 -1
  190. package/lib/typescript/events.d.ts +0 -115
  191. package/lib/typescript/events.d.ts.map +0 -1
  192. package/lib/typescript/index.d.ts +0 -27
  193. package/lib/typescript/index.d.ts.map +0 -1
  194. package/lib/typescript/jsCore.d.ts +0 -152
  195. package/lib/typescript/jsCore.d.ts.map +0 -1
  196. package/lib/typescript/native.d.ts +0 -4
  197. package/lib/typescript/native.d.ts.map +0 -1
  198. package/lib/typescript/subject.d.ts +0 -91
  199. package/lib/typescript/subject.d.ts.map +0 -1
  200. package/lib/typescript/tracker.d.ts +0 -111
  201. package/lib/typescript/tracker.d.ts.map +0 -1
  202. package/lib/typescript/types.d.ts +0 -981
  203. package/lib/typescript/types.d.ts.map +0 -1
  204. package/lib/typescript/utils.d.ts +0 -35
  205. package/lib/typescript/utils.d.ts.map +0 -1
  206. package/lib/typescript/webViewInterface.d.ts +0 -15
  207. package/lib/typescript/webViewInterface.d.ts.map +0 -1
  208. package/scripts/bootstrap.js +0 -29
  209. package/snowplow-react-native-tracker.podspec +0 -42
  210. package/src/__mocks__/react-native.js +0 -7
  211. package/src/__tests__/api.test.ts +0 -21
  212. package/src/__tests__/configurations.test.ts +0 -608
  213. package/src/__tests__/events.test.ts +0 -736
  214. package/src/__tests__/index.test.ts +0 -14
  215. package/src/__tests__/jsCore.test.ts +0 -199
  216. package/src/__tests__/utils.test.ts +0 -10
  217. package/src/api.ts +0 -556
  218. package/src/configurations.ts +0 -325
  219. package/src/constants.ts +0 -97
  220. package/src/events.ts +0 -355
  221. package/src/index.ts +0 -184
  222. package/src/jsCore.ts +0 -603
  223. package/src/native.ts +0 -21
  224. package/src/subject.ts +0 -302
  225. package/src/tracker.ts +0 -377
  226. package/src/types.ts +0 -1162
  227. package/src/utils.ts +0 -65
  228. package/src/webViewInterface.ts +0 -92
  229. package/tsconfig.build.json +0 -5
  230. package/tsconfig.json +0 -28
  231. package/turbo.json +0 -34
  232. package/yarn.lock +0 -9398
package/CHANGELOG DELETED
@@ -1,180 +0,0 @@
1
- Version 2.1.1 (2024-07-03)
2
- --------------------------
3
- Update tracker and example app dependencies
4
-
5
- Version 2.1.0 (2024-02-21)
6
- --------------------------
7
- Upgrade to mobile trackers version 6 and add screen engagement tracking (close #90)
8
- Fix SelfDescribing extension type (close #204)
9
- Update JavaScript tracker core version to 3.21.0
10
- Fix running deploy action only on new tags
11
- Update cocoapods version
12
- Lock yarn version to 1.22.19
13
- Update copyright headers
14
-
15
- Version 2.0.0 (2023-09-29)
16
- --------------------------
17
- Upgrade project structure and update native trackers to version 5 (#199)
18
- Disable automatic screen view tracking in the iOS and Android tracker by default (#198)
19
- Fix buffer option in emitter configuration on Android to set correct value for large setting (#197)
20
-
21
- Version 1.4.0 (2022-02-04)
22
- --------------------------
23
- Add JavaScript tracker core to be used in Expo managed workflow when native trackers are not available (#188)
24
- Bump Snowplow native tracker dependency to 4.1 (#186)
25
- Update year in copyright headers to 2023 (#187)
26
-
27
- Version 1.3.0 (2022-10-03)
28
- --------------------------
29
- Upgrade Snowplow mobile trackers to v4 (#167)
30
- Add anonymous tracking features (#168)
31
- Add interface to subscribe for events tracked in Web views (#169)
32
- Add option to add custom headers (#165)
33
- Enable setting custom path for POST requests (#178)
34
- Upgrade internal and demo app dependencies (#172)
35
- Remove circular imports of demo app dependencies when running in demo apps (#174)
36
-
37
- Version 1.2.1 (2022-04-12)
38
- --------------------------
39
- Fix import of non-published NSDictionary helpers from SnowplowTracker on iOS (#161)
40
-
41
- Version 1.2.0 (2022-03-25)
42
- --------------------------
43
- Add support for React Native for tvOS (#154)
44
- Bump min RN version supported to v0.65+ (#153)
45
- Add generic type for SelfDescribing event data (#156)
46
-
47
- Version 1.1.0 (2022-02-07)
48
- --------------------------
49
- Update mobile tracker dependencies to v3 (#141)
50
- Add deep link and message notification events (#142)
51
- Update demo app to show accessing tracker instance from platform native code (#136)
52
- Fix compilation error for iOS build on ARM macs (#140)
53
- Fix check for byteLimitGet when reading emitter configuration (#138)
54
- Fix check for Android version in GitHub Actions (#134)
55
- Update year in all copyright notices (#148)
56
- Update dependencies (#150)
57
-
58
- Version 1.0.0 (2021-08-09)
59
- --------------------------
60
- Fix action-gh-release to specific commit (#133)
61
- Update devDependencies (#132)
62
- Publish sourcemaps (#131)
63
- Lint DemoApp separately (#130)
64
- Get Session Context Data (#53)
65
- Update version in podspec (#110)
66
- Set amended v_tracker indicating react-native (#18)
67
- Add global contexts (#104)
68
- Upgrade iOS Tracker and Android Tracker to v2 (#113)
69
- Add test suite (#60)
70
-
71
- Version 0.2.0 (2021-06-21)
72
- --------------------------
73
- Bump dependencies in DemoApp (#114)
74
- Port to TypeScript (#115)
75
- Handle asyncronous issues internally (#78)
76
- Use ESLint (#126)
77
- Add homepage and repository in package.json (#125)
78
- Remove unused files (#124)
79
-
80
- Version 0.1.7 (2021-05-24)
81
- --------------------------
82
- Remove waitForEventStore method and upgrade Android tracker (#92)
83
- Automate deploy process (#61)
84
- Fix null transitionType resulting in screen view event failing validation for ios (#122)
85
- Fix Xcode 12.5 build breaks (#119)
86
- Fix typo in CHANGELOG (#116)
87
- Remove JCenter and add MavenCentral (#121)
88
- Update build.gradle to match rootProject extra properties (#120)
89
- Fix assembleAndroidTest builds (#118)
90
-
91
- Version 0.1.6 (2021-04-06)
92
- --------------------------
93
- Bump iOS Tracker to 1.7.0 (#111)
94
-
95
- Version 0.1.5 (2021-03-22)
96
- --------------------------
97
- Update DemoApp versions (#106)
98
- Loosen peer dependency requirements (#105)
99
-
100
- Note: v0.1.4 was skipped due to an error in publishing process.
101
- ---------------------------------------------------------------
102
-
103
- Version 0.1.3 (2021-02-12)
104
- --------------------------
105
- Fix Xcode 12 compatibility (#102)
106
-
107
- Version 0.1.2 (2021-01-15)
108
- --------------------------
109
- Upgrade obj-c tracker to 1.6.2 (#98)
110
-
111
- Version 0.1.1 (2020-09-03)
112
- --------------------------
113
- Fix Android tracker version to 1.5.x (#91)
114
-
115
- Version 0.1.0 (2020-07-10)
116
- --------------------------
117
- Add issue templates (#89)
118
- Add CONTRIBUTING.md (#80)
119
- Use recommended config as defaults (#86)
120
- Fix iOS null comparison warnings (#85)
121
- Return after promise rejection on Android (#84)
122
- Update arguments and var names for consistency (#83)
123
- Update DemoApp (#82)
124
- Use fast fail on iOS (#87)
125
- Update README (#77)
126
- Dynamically use latest minor version of native tracker (#19)
127
- Cleanup code formatting (#75)
128
- Add Snyk Github Action (#71)
129
- Add license (#62)
130
- Handle setSubjectData values appropriately (#70)
131
- Return promise on intialize() (#66)
132
- Remove deprecated options (#69)
133
- Expand testing scripts (#72)
134
- Refactor method instrumentation (#58)
135
- Fix compile warnings caused by unsafe comparison (#73)
136
- Fix double self calls (#74)
137
- Remove screen_id workaround (#57)
138
-
139
- Version 0.1.0-alpha.17 (2020-05-04)
140
- -----------------------------------
141
- Use yarn everywhere for testing (#55)
142
- Update ios tracker version to 1.3.0 (#54)
143
-
144
- Version 0.1.0-alpha.16 (2020-04-16)
145
- -----------------------------------
146
- Update .npmignore and .gitignore (#51)
147
- Update README (#50)
148
- Update Demo App (#48)
149
- Add trackPageView (#33)
150
- Add script for clean build (#47)
151
- Add setSubjectData method (#46)
152
- Update android tracker version (#45)
153
- Add Standard Settings (#34)
154
-
155
- Version 0.1.0-alpha.15 (2020-02-06)
156
- -----------------------------------
157
- Cleanup Repo (#29)
158
- Update DemoApp (#21)
159
- Update ios Tracker dependency to remove mandatory dynamic build (#22)
160
-
161
- Version 0.1.0-alpha.14 (2019-10-22)
162
- ----------------------------------
163
- Update iOS to incorporate patch release (#23)
164
-
165
- Version 0.1.0-alpha.13 (2019-10-14)
166
- -----------------------------------
167
- Make optional StructEvent parameters nullable for iOS (#12)
168
- Add ScreenViews (#14)
169
- Fix bug in android getContexts (#16)
170
- Add mobile context (#13)
171
- Update README.md (#5)
172
- Fix path in Android package export (#8)
173
- Fix high severity vulnerabilities in DemoApp (#7)
174
- Bump DemoApp react-native version (#6)
175
- Fix import in Demo Application (#3)
176
- Fix Android Numeric type bug (#4)
177
-
178
- Version 0.1.0-alpha.9 (2019-08-08)
179
- ----------------------------------
180
- Initial Release
package/CONTRIBUTING.md DELETED
@@ -1,80 +0,0 @@
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://docs.snowplow.io/docs/contributing/contributor-license-agreement/).
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!
@@ -1,110 +0,0 @@
1
- buildscript {
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"]
4
-
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"
19
- }
20
-
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
- }
51
-
52
- android {
53
- if (supportsNamespace()) {
54
- namespace "com.snowplow.reactnativetracker"
55
-
56
- sourceSets {
57
- main {
58
- manifest.srcFile "src/main/AndroidManifestNew.xml"
59
- }
60
- }
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
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
-
85
- }
86
-
87
- repositories {
88
- mavenCentral()
89
- google()
90
- }
91
-
92
- def kotlin_version = getExtOrDefault("kotlinVersion")
93
-
94
- dependencies {
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:6.0.+"
101
- implementation "com.squareup.okhttp3:okhttp:4.10.0"
102
- }
103
-
104
- if (isNewArchitectureEnabled()) {
105
- react {
106
- jsRootDir = file("../src/")
107
- libraryName = "ReactNativeTracker"
108
- codegenJavaPackageName = "com.snowplow.reactnativetracker"
109
- }
110
- }
@@ -1,5 +0,0 @@
1
- distributionBase=GRADLE_USER_HOME
2
- distributionPath=wrapper/dists
3
- distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
4
- zipStoreBase=GRADLE_USER_HOME
5
- zipStorePath=wrapper/dists
@@ -1,5 +0,0 @@
1
- ReactNativeTracker_kotlinVersion=1.7.0
2
- ReactNativeTracker_minSdkVersion=21
3
- ReactNativeTracker_targetSdkVersion=31
4
- ReactNativeTracker_compileSdkVersion=31
5
- ReactNativeTracker_ndkversion=21.4.7075529
package/android/gradlew DELETED
@@ -1,234 +0,0 @@
1
- #!/bin/sh
2
-
3
- #
4
- # Copyright © 2015-2021 the original authors.
5
- #
6
- # Licensed under the Apache License, Version 2.0 (the "License");
7
- # you may not use this file except in compliance with the License.
8
- # You may obtain a copy of the License at
9
- #
10
- # https://www.apache.org/licenses/LICENSE-2.0
11
- #
12
- # Unless required by applicable law or agreed to in writing, software
13
- # distributed under the License is distributed on an "AS IS" BASIS,
14
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- # See the License for the specific language governing permissions and
16
- # limitations under the License.
17
- #
18
-
19
- ##############################################################################
20
- #
21
- # Gradle start up script for POSIX generated by Gradle.
22
- #
23
- # Important for running:
24
- #
25
- # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
26
- # noncompliant, but you have some other compliant shell such as ksh or
27
- # bash, then to run this script, type that shell name before the whole
28
- # command line, like:
29
- #
30
- # ksh Gradle
31
- #
32
- # Busybox and similar reduced shells will NOT work, because this script
33
- # requires all of these POSIX shell features:
34
- # * functions;
35
- # * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
36
- # «${var#prefix}», «${var%suffix}», and «$( cmd )»;
37
- # * compound commands having a testable exit status, especially «case»;
38
- # * various built-in commands including «command», «set», and «ulimit».
39
- #
40
- # Important for patching:
41
- #
42
- # (2) This script targets any POSIX shell, so it avoids extensions provided
43
- # by Bash, Ksh, etc; in particular arrays are avoided.
44
- #
45
- # The "traditional" practice of packing multiple parameters into a
46
- # space-separated string is a well documented source of bugs and security
47
- # problems, so this is (mostly) avoided, by progressively accumulating
48
- # options in "$@", and eventually passing that to Java.
49
- #
50
- # Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
51
- # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
52
- # see the in-line comments for details.
53
- #
54
- # There are tweaks for specific operating systems such as AIX, CygWin,
55
- # Darwin, MinGW, and NonStop.
56
- #
57
- # (3) This script is generated from the Groovy template
58
- # https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
59
- # within the Gradle project.
60
- #
61
- # You can find Gradle at https://github.com/gradle/gradle/.
62
- #
63
- ##############################################################################
64
-
65
- # Attempt to set APP_HOME
66
-
67
- # Resolve links: $0 may be a link
68
- app_path=$0
69
-
70
- # Need this for daisy-chained symlinks.
71
- while
72
- APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
73
- [ -h "$app_path" ]
74
- do
75
- ls=$( ls -ld "$app_path" )
76
- link=${ls#*' -> '}
77
- case $link in #(
78
- /*) app_path=$link ;; #(
79
- *) app_path=$APP_HOME$link ;;
80
- esac
81
- done
82
-
83
- APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
84
-
85
- APP_NAME="Gradle"
86
- APP_BASE_NAME=${0##*/}
87
-
88
- # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
89
- DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
90
-
91
- # Use the maximum available, or set MAX_FD != -1 to use that value.
92
- MAX_FD=maximum
93
-
94
- warn () {
95
- echo "$*"
96
- } >&2
97
-
98
- die () {
99
- echo
100
- echo "$*"
101
- echo
102
- exit 1
103
- } >&2
104
-
105
- # OS specific support (must be 'true' or 'false').
106
- cygwin=false
107
- msys=false
108
- darwin=false
109
- nonstop=false
110
- case "$( uname )" in #(
111
- CYGWIN* ) cygwin=true ;; #(
112
- Darwin* ) darwin=true ;; #(
113
- MSYS* | MINGW* ) msys=true ;; #(
114
- NONSTOP* ) nonstop=true ;;
115
- esac
116
-
117
- CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
118
-
119
-
120
- # Determine the Java command to use to start the JVM.
121
- if [ -n "$JAVA_HOME" ] ; then
122
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
123
- # IBM's JDK on AIX uses strange locations for the executables
124
- JAVACMD=$JAVA_HOME/jre/sh/java
125
- else
126
- JAVACMD=$JAVA_HOME/bin/java
127
- fi
128
- if [ ! -x "$JAVACMD" ] ; then
129
- die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
130
-
131
- Please set the JAVA_HOME variable in your environment to match the
132
- location of your Java installation."
133
- fi
134
- else
135
- JAVACMD=java
136
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
137
-
138
- Please set the JAVA_HOME variable in your environment to match the
139
- location of your Java installation."
140
- fi
141
-
142
- # Increase the maximum file descriptors if we can.
143
- if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144
- case $MAX_FD in #(
145
- max*)
146
- MAX_FD=$( ulimit -H -n ) ||
147
- warn "Could not query maximum file descriptor limit"
148
- esac
149
- case $MAX_FD in #(
150
- '' | soft) :;; #(
151
- *)
152
- ulimit -n "$MAX_FD" ||
153
- warn "Could not set maximum file descriptor limit to $MAX_FD"
154
- esac
155
- fi
156
-
157
- # Collect all arguments for the java command, stacking in reverse order:
158
- # * args from the command line
159
- # * the main class name
160
- # * -classpath
161
- # * -D...appname settings
162
- # * --module-path (only if needed)
163
- # * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
164
-
165
- # For Cygwin or MSYS, switch paths to Windows format before running java
166
- if "$cygwin" || "$msys" ; then
167
- APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
168
- CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
169
-
170
- JAVACMD=$( cygpath --unix "$JAVACMD" )
171
-
172
- # Now convert the arguments - kludge to limit ourselves to /bin/sh
173
- for arg do
174
- if
175
- case $arg in #(
176
- -*) false ;; # don't mess with options #(
177
- /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
178
- [ -e "$t" ] ;; #(
179
- *) false ;;
180
- esac
181
- then
182
- arg=$( cygpath --path --ignore --mixed "$arg" )
183
- fi
184
- # Roll the args list around exactly as many times as the number of
185
- # args, so each arg winds up back in the position where it started, but
186
- # possibly modified.
187
- #
188
- # NB: a `for` loop captures its iteration list before it begins, so
189
- # changing the positional parameters here affects neither the number of
190
- # iterations, nor the values presented in `arg`.
191
- shift # remove old arg
192
- set -- "$@" "$arg" # push replacement arg
193
- done
194
- fi
195
-
196
- # Collect all arguments for the java command;
197
- # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
198
- # shell script including quotes and variable substitutions, so put them in
199
- # double quotes to make sure that they get re-expanded; and
200
- # * put everything else in single quotes, so that it's not re-expanded.
201
-
202
- set -- \
203
- "-Dorg.gradle.appname=$APP_BASE_NAME" \
204
- -classpath "$CLASSPATH" \
205
- org.gradle.wrapper.GradleWrapperMain \
206
- "$@"
207
-
208
- # Use "xargs" to parse quoted args.
209
- #
210
- # With -n1 it outputs one arg per line, with the quotes and backslashes removed.
211
- #
212
- # In Bash we could simply go:
213
- #
214
- # readarray ARGS < <( xargs -n1 <<<"$var" ) &&
215
- # set -- "${ARGS[@]}" "$@"
216
- #
217
- # but POSIX shell has neither arrays nor command substitution, so instead we
218
- # post-process each arg (as a line of input to sed) to backslash-escape any
219
- # character that might be a shell metacharacter, then use eval to reverse
220
- # that process (while maintaining the separation between arguments), and wrap
221
- # the whole thing up as a single "set" statement.
222
- #
223
- # This will of course break if any of these variables contains a newline or
224
- # an unmatched quote.
225
- #
226
-
227
- eval "set -- $(
228
- printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
229
- xargs -n1 |
230
- sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
231
- tr '\n' ' '
232
- )" '"$@"'
233
-
234
- exec "$JAVACMD" "$@"