teads-react-native 6.0.2

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 (175) hide show
  1. package/LICENSE +20 -0
  2. package/README.md +93 -0
  3. package/android/bin/build/generated/source/buildConfig/debug/com/outbrainreactnative/BuildConfig.class +0 -0
  4. package/android/bin/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/AndroidManifest.xml +7 -0
  5. package/android/bin/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/output-metadata.json +18 -0
  6. package/android/bin/build/intermediates/aar_metadata/debug/aar-metadata.properties +6 -0
  7. package/android/bin/build/intermediates/annotation_processor_list/debug/annotationProcessors.json +1 -0
  8. package/android/bin/build/intermediates/compile_library_classes_jar/debug/classes.jar +0 -0
  9. package/android/bin/build/intermediates/compile_r_class_jar/debug/R.jar +0 -0
  10. package/android/bin/build/intermediates/compile_symbol_list/debug/R.txt +0 -0
  11. package/android/bin/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +1 -0
  12. package/android/bin/build/intermediates/incremental/debug/packageDebugResources/merger.xml +2 -0
  13. package/android/bin/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +2 -0
  14. package/android/bin/build/intermediates/incremental/mergeDebugShaders/merger.xml +2 -0
  15. package/android/bin/build/intermediates/incremental/packageDebugAssets/merger.xml +2 -0
  16. package/android/bin/build/intermediates/local_only_symbol_list/debug/R-def.txt +2 -0
  17. package/android/bin/build/intermediates/manifest_merge_blame_file/debug/manifest-merger-blame-debug-report.txt +7 -0
  18. package/android/bin/build/intermediates/merged_manifest/debug/AndroidManifest.xml +7 -0
  19. package/android/bin/build/intermediates/navigation_json/debug/navigation.json +1 -0
  20. package/android/bin/build/intermediates/runtime_library_classes_jar/debug/classes.jar +0 -0
  21. package/android/bin/build/intermediates/symbol_list_with_package_name/debug/package-aware-r.txt +1 -0
  22. package/android/bin/build/outputs/logs/manifest-merger-debug-report.txt +16 -0
  23. package/android/bin/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
  24. package/android/bin/build.gradle +101 -0
  25. package/android/bin/gradle/wrapper/gradle-wrapper.jar +0 -0
  26. package/android/bin/gradle/wrapper/gradle-wrapper.properties +7 -0
  27. package/android/bin/gradle.properties +5 -0
  28. package/android/bin/gradlew +249 -0
  29. package/android/bin/gradlew.bat +92 -0
  30. package/android/bin/src/main/AndroidManifest.xml +3 -0
  31. package/android/bin/src/main/AndroidManifestNew.xml +2 -0
  32. package/android/bin/src/main/java/com/outbrainreactnative/OutbrainNativePackage.class +0 -0
  33. package/android/bin/src/main/java/com/outbrainreactnative/SFWebViewWidgetManager.class +0 -0
  34. package/android/bin/src/main/java/com/outbrainreactnative/SFWebViewWidgetWrapper.class +0 -0
  35. package/android/bin/src/main/java/com/outbrainreactnative/Utils.class +0 -0
  36. package/android/build.gradle +129 -0
  37. package/android/generated/java/com/facebook/react/viewmanagers/TeadsAdPlacementFeedManagerDelegate.java +62 -0
  38. package/android/generated/java/com/facebook/react/viewmanagers/TeadsAdPlacementFeedManagerInterface.java +28 -0
  39. package/android/generated/java/com/facebook/react/viewmanagers/TeadsAdPlacementMediaManagerDelegate.java +44 -0
  40. package/android/generated/java/com/facebook/react/viewmanagers/TeadsAdPlacementMediaManagerInterface.java +22 -0
  41. package/android/generated/jni/CMakeLists.txt +36 -0
  42. package/android/generated/jni/RNTeadsReactNativeViewSpec-generated.cpp +22 -0
  43. package/android/generated/jni/RNTeadsReactNativeViewSpec.h +24 -0
  44. package/android/generated/jni/react/renderer/components/RNTeadsReactNativeViewSpec/ComponentDescriptors.cpp +23 -0
  45. package/android/generated/jni/react/renderer/components/RNTeadsReactNativeViewSpec/ComponentDescriptors.h +25 -0
  46. package/android/generated/jni/react/renderer/components/RNTeadsReactNativeViewSpec/EventEmitters.cpp +17 -0
  47. package/android/generated/jni/react/renderer/components/RNTeadsReactNativeViewSpec/EventEmitters.h +30 -0
  48. package/android/generated/jni/react/renderer/components/RNTeadsReactNativeViewSpec/Props.cpp +46 -0
  49. package/android/generated/jni/react/renderer/components/RNTeadsReactNativeViewSpec/Props.h +51 -0
  50. package/android/generated/jni/react/renderer/components/RNTeadsReactNativeViewSpec/RNTeadsReactNativeViewSpecJSI-generated.cpp +17 -0
  51. package/android/generated/jni/react/renderer/components/RNTeadsReactNativeViewSpec/RNTeadsReactNativeViewSpecJSI.h +19 -0
  52. package/android/generated/jni/react/renderer/components/RNTeadsReactNativeViewSpec/ShadowNodes.cpp +18 -0
  53. package/android/generated/jni/react/renderer/components/RNTeadsReactNativeViewSpec/ShadowNodes.h +43 -0
  54. package/android/generated/jni/react/renderer/components/RNTeadsReactNativeViewSpec/States.cpp +16 -0
  55. package/android/generated/jni/react/renderer/components/RNTeadsReactNativeViewSpec/States.h +41 -0
  56. package/android/gradle.properties +5 -0
  57. package/android/src/main/AndroidManifest.xml +3 -0
  58. package/android/src/main/AndroidManifestNew.xml +2 -0
  59. package/android/src/main/java/tv/teads/reactnative/SFWidgetContainer.java +19 -0
  60. package/android/src/main/java/tv/teads/reactnative/TeadsAdPlacementFeedManager.java +109 -0
  61. package/android/src/main/java/tv/teads/reactnative/TeadsFeedPackage.java +53 -0
  62. package/android/src/main/java/tv/teads/reactnative/TeadsMediaPlacementManager.java +76 -0
  63. package/android/src/main/java/tv/teads/reactnative/TeadsPlacementContainer.java +327 -0
  64. package/android/src/main/java/tv/teads/reactnative/Utils.java +65 -0
  65. package/ios/RCTTeadsAdPlacementFeed.h +22 -0
  66. package/ios/RCTTeadsAdPlacementFeed.mm +114 -0
  67. package/ios/RCTTeadsAdPlacementMedia.h +23 -0
  68. package/ios/RCTTeadsAdPlacementMedia.mm +91 -0
  69. package/ios/TeadsAdContainer.swift +212 -0
  70. package/ios/TeadsEventModule.h +16 -0
  71. package/ios/TeadsEventModule.mm +52 -0
  72. package/ios/TeadsReactNative.h +8 -0
  73. package/ios/generated/RNTeadsReactNativeViewSpec/ComponentDescriptors.cpp +23 -0
  74. package/ios/generated/RNTeadsReactNativeViewSpec/ComponentDescriptors.h +25 -0
  75. package/ios/generated/RNTeadsReactNativeViewSpec/EventEmitters.cpp +17 -0
  76. package/ios/generated/RNTeadsReactNativeViewSpec/EventEmitters.h +30 -0
  77. package/ios/generated/RNTeadsReactNativeViewSpec/Props.cpp +46 -0
  78. package/ios/generated/RNTeadsReactNativeViewSpec/Props.h +51 -0
  79. package/ios/generated/RNTeadsReactNativeViewSpec/RCTComponentViewHelpers.h +24 -0
  80. package/ios/generated/RNTeadsReactNativeViewSpec/RNTeadsReactNativeViewSpec-generated.mm +16 -0
  81. package/ios/generated/RNTeadsReactNativeViewSpec/RNTeadsReactNativeViewSpec.h +38 -0
  82. package/ios/generated/RNTeadsReactNativeViewSpec/ShadowNodes.cpp +18 -0
  83. package/ios/generated/RNTeadsReactNativeViewSpec/ShadowNodes.h +43 -0
  84. package/ios/generated/RNTeadsReactNativeViewSpec/States.cpp +16 -0
  85. package/ios/generated/RNTeadsReactNativeViewSpec/States.h +41 -0
  86. package/ios/generated/RNTeadsReactNativeViewSpecJSI-generated.cpp +17 -0
  87. package/ios/generated/RNTeadsReactNativeViewSpecJSI.h +19 -0
  88. package/lib/commonjs/DefaultTeadsWidgetHandler.js +21 -0
  89. package/lib/commonjs/DefaultTeadsWidgetHandler.js.map +1 -0
  90. package/lib/commonjs/TeadsAdPlacementFeed.js +131 -0
  91. package/lib/commonjs/TeadsAdPlacementFeed.js.map +1 -0
  92. package/lib/commonjs/TeadsAdPlacementMedia.js +115 -0
  93. package/lib/commonjs/TeadsAdPlacementMedia.js.map +1 -0
  94. package/lib/commonjs/TeadsInAppBrowser.js +48 -0
  95. package/lib/commonjs/TeadsInAppBrowser.js.map +1 -0
  96. package/lib/commonjs/TeadsMediaNativeComponent.ts +15 -0
  97. package/lib/commonjs/WebViewNativeComponent.ts +21 -0
  98. package/lib/commonjs/constants.js +9 -0
  99. package/lib/commonjs/constants.js.map +1 -0
  100. package/lib/commonjs/index.js +20 -0
  101. package/lib/commonjs/index.js.map +1 -0
  102. package/lib/commonjs/package.json +1 -0
  103. package/lib/commonjs/types.d.js +2 -0
  104. package/lib/commonjs/types.d.js.map +1 -0
  105. package/lib/commonjs/version.js +8 -0
  106. package/lib/commonjs/version.js.map +1 -0
  107. package/lib/module/DefaultTeadsWidgetHandler.js +17 -0
  108. package/lib/module/DefaultTeadsWidgetHandler.js.map +1 -0
  109. package/lib/module/TeadsAdPlacementFeed.js +126 -0
  110. package/lib/module/TeadsAdPlacementFeed.js.map +1 -0
  111. package/lib/module/TeadsAdPlacementMedia.js +110 -0
  112. package/lib/module/TeadsAdPlacementMedia.js.map +1 -0
  113. package/lib/module/TeadsInAppBrowser.js +44 -0
  114. package/lib/module/TeadsInAppBrowser.js.map +1 -0
  115. package/lib/module/TeadsMediaNativeComponent.ts +15 -0
  116. package/lib/module/WebViewNativeComponent.ts +21 -0
  117. package/lib/module/constants.js +5 -0
  118. package/lib/module/constants.js.map +1 -0
  119. package/lib/module/index.js +5 -0
  120. package/lib/module/index.js.map +1 -0
  121. package/lib/module/package.json +1 -0
  122. package/lib/module/types.d.js +2 -0
  123. package/lib/module/types.d.js.map +1 -0
  124. package/lib/module/version.js +4 -0
  125. package/lib/module/version.js.map +1 -0
  126. package/lib/typescript/commonjs/package.json +1 -0
  127. package/lib/typescript/commonjs/src/DefaultTeadsWidgetHandler.d.ts +4 -0
  128. package/lib/typescript/commonjs/src/DefaultTeadsWidgetHandler.d.ts.map +1 -0
  129. package/lib/typescript/commonjs/src/TeadsAdPlacementFeed.d.ts +3 -0
  130. package/lib/typescript/commonjs/src/TeadsAdPlacementFeed.d.ts.map +1 -0
  131. package/lib/typescript/commonjs/src/TeadsAdPlacementMedia.d.ts +3 -0
  132. package/lib/typescript/commonjs/src/TeadsAdPlacementMedia.d.ts.map +1 -0
  133. package/lib/typescript/commonjs/src/TeadsInAppBrowser.d.ts +4 -0
  134. package/lib/typescript/commonjs/src/TeadsInAppBrowser.d.ts.map +1 -0
  135. package/lib/typescript/commonjs/src/TeadsMediaNativeComponent.d.ts +12 -0
  136. package/lib/typescript/commonjs/src/TeadsMediaNativeComponent.d.ts.map +1 -0
  137. package/lib/typescript/commonjs/src/WebViewNativeComponent.d.ts +18 -0
  138. package/lib/typescript/commonjs/src/WebViewNativeComponent.d.ts.map +1 -0
  139. package/lib/typescript/commonjs/src/constants.d.ts +3 -0
  140. package/lib/typescript/commonjs/src/constants.d.ts.map +1 -0
  141. package/lib/typescript/commonjs/src/index.d.ts +4 -0
  142. package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
  143. package/lib/typescript/commonjs/src/version.d.ts +2 -0
  144. package/lib/typescript/commonjs/src/version.d.ts.map +1 -0
  145. package/lib/typescript/module/package.json +1 -0
  146. package/lib/typescript/module/src/DefaultTeadsWidgetHandler.d.ts +4 -0
  147. package/lib/typescript/module/src/DefaultTeadsWidgetHandler.d.ts.map +1 -0
  148. package/lib/typescript/module/src/TeadsAdPlacementFeed.d.ts +3 -0
  149. package/lib/typescript/module/src/TeadsAdPlacementFeed.d.ts.map +1 -0
  150. package/lib/typescript/module/src/TeadsAdPlacementMedia.d.ts +3 -0
  151. package/lib/typescript/module/src/TeadsAdPlacementMedia.d.ts.map +1 -0
  152. package/lib/typescript/module/src/TeadsInAppBrowser.d.ts +4 -0
  153. package/lib/typescript/module/src/TeadsInAppBrowser.d.ts.map +1 -0
  154. package/lib/typescript/module/src/TeadsMediaNativeComponent.d.ts +12 -0
  155. package/lib/typescript/module/src/TeadsMediaNativeComponent.d.ts.map +1 -0
  156. package/lib/typescript/module/src/WebViewNativeComponent.d.ts +18 -0
  157. package/lib/typescript/module/src/WebViewNativeComponent.d.ts.map +1 -0
  158. package/lib/typescript/module/src/constants.d.ts +3 -0
  159. package/lib/typescript/module/src/constants.d.ts.map +1 -0
  160. package/lib/typescript/module/src/index.d.ts +4 -0
  161. package/lib/typescript/module/src/index.d.ts.map +1 -0
  162. package/lib/typescript/module/src/version.d.ts +2 -0
  163. package/lib/typescript/module/src/version.d.ts.map +1 -0
  164. package/package.json +227 -0
  165. package/src/DefaultTeadsWidgetHandler.ts +17 -0
  166. package/src/TeadsAdPlacementFeed.tsx +142 -0
  167. package/src/TeadsAdPlacementMedia.tsx +127 -0
  168. package/src/TeadsInAppBrowser.ts +42 -0
  169. package/src/TeadsMediaNativeComponent.ts +15 -0
  170. package/src/WebViewNativeComponent.ts +21 -0
  171. package/src/constants.ts +11 -0
  172. package/src/index.tsx +9 -0
  173. package/src/types.d.ts +32 -0
  174. package/src/version.ts +1 -0
  175. package/teads-react-native.podspec +42 -0
package/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Oren Pinkas
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ of this software and associated documentation files (the "Software"), to deal
6
+ in the Software without restriction, including without limitation the rights
7
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is
9
+ furnished to do so, subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all
12
+ copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,93 @@
1
+ # teads-react-native
2
+
3
+ Easily embed Teads Feed and Media widgets in your React Native app!
4
+
5
+ ## Installation
6
+
7
+ ### Step 1
8
+
9
+ ### Using npm
10
+
11
+ ```
12
+ npm install --save teads-react-native
13
+ ```
14
+
15
+ ### Using yarn
16
+
17
+ ```
18
+ yarn add teads-react-native
19
+ ```
20
+
21
+ ### Step 2
22
+
23
+ Also, add the following to project `build.gradle`
24
+ ```gradle
25
+ repositories {
26
+ maven { url "https://teads.jfrog.io/artifactory/SDKAndroid-maven-prod" }
27
+ maven {
28
+ // Mandatory for Huawei device compatibility
29
+ url "https://developer.huawei.com/repo/"
30
+ }
31
+ }
32
+ ```
33
+
34
+ ## Widget Settings
35
+
36
+ ```
37
+ setting 1000 feedMargin: `0 0 100px 0`
38
+ setting 1681 Bridge Height Calculation Type: `document-offset-height`
39
+ setting 982 Custom Clicks Handler - `true`
40
+ ```
41
+
42
+ ## Usage
43
+
44
+ The package includes:
45
+ 1. `TeadsAdPlacementFeed` - Teads Feed Widget as a React Native Component
46
+ 2. `TeadsAdPlacementMedia` - Teads Video Widget as a React Native Component
47
+
48
+
49
+ Import `TeadsAdPlacementFeed` and `TeadsAdPlacementMedia` from `teads-react-native` and embed the widget in your component tree:
50
+
51
+ ### TeadsAdPlacementFeed
52
+
53
+ ```
54
+ import { ScrollView } from 'react-native';
55
+ import { TeadsAdPlacementFeed } from 'teads-react-native';
56
+
57
+ const App = () => {
58
+ return (
59
+ <ScrollView>
60
+ <TeadsAdPlacementFeed
61
+ key={`teads-feed-${widgetId}-${articleUrl}`}
62
+ widgetId={widgetId}
63
+ widgetIndex={0}
64
+ articleUrl={articleUrl}
65
+ partnerKey="NANOWDGT01"
66
+ darkMode={darkMode}
67
+ extId="my_ext_id"
68
+ extSecondaryId="my_scndry_ext_id"
69
+ pubImpId="my_pub_imp_id"
70
+ />
71
+ </ScrollView>
72
+ );
73
+ };
74
+ ```
75
+
76
+ ### TeadsAdPlacementMedia
77
+
78
+ ```
79
+ import { ScrollView } from 'react-native';
80
+ import { TeadsAdPlacementMedia } from 'teads-react-native';
81
+
82
+ const App = () => {
83
+ return (
84
+ <ScrollView>
85
+ <TeadsAdPlacementMedia
86
+ key={`teads-media-${pid}-${url}`}
87
+ pid={pid}
88
+ url={url}
89
+ />
90
+ </ScrollView>
91
+ );
92
+ };
93
+ ```
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android"
3
+ package="com.outbrainreactnative" >
4
+
5
+ <uses-sdk android:minSdkVersion="23" />
6
+
7
+ </manifest>
@@ -0,0 +1,18 @@
1
+ {
2
+ "version": 3,
3
+ "artifactType": {
4
+ "type": "AAPT_FRIENDLY_MERGED_MANIFESTS",
5
+ "kind": "Directory"
6
+ },
7
+ "applicationId": "com.outbrainreactnative",
8
+ "variantName": "debug",
9
+ "elements": [
10
+ {
11
+ "type": "SINGLE",
12
+ "filters": [],
13
+ "attributes": [],
14
+ "outputFile": "AndroidManifest.xml"
15
+ }
16
+ ],
17
+ "elementType": "File"
18
+ }
@@ -0,0 +1,6 @@
1
+ aarFormatVersion=1.0
2
+ aarMetadataVersion=1.0
3
+ minCompileSdk=1
4
+ minCompileSdkExtension=0
5
+ minAndroidGradlePluginVersion=1.0.0
6
+ coreLibraryDesugaringEnabled=false
@@ -0,0 +1,2 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <merger version="3"><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="main$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/odedre/work/outbrain/miscellaneous/react-native-viewability-not-working-october-2024/outbrain-not-working-reproduce/node_modules/outbrain-react-native/android/src/main/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="main" generated-set="main$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/odedre/work/outbrain/miscellaneous/react-native-viewability-not-working-october-2024/outbrain-not-working-reproduce/node_modules/outbrain-react-native/android/src/main/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="debug$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/odedre/work/outbrain/miscellaneous/react-native-viewability-not-working-october-2024/outbrain-not-working-reproduce/node_modules/outbrain-react-native/android/src/debug/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="debug" generated-set="debug$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/odedre/work/outbrain/miscellaneous/react-native-viewability-not-working-october-2024/outbrain-not-working-reproduce/node_modules/outbrain-react-native/android/src/debug/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="generated$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/odedre/work/outbrain/miscellaneous/react-native-viewability-not-working-october-2024/outbrain-not-working-reproduce/node_modules/outbrain-react-native/android/build/generated/res/resValues/debug"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="generated" generated-set="generated$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/odedre/work/outbrain/miscellaneous/react-native-viewability-not-working-october-2024/outbrain-not-working-reproduce/node_modules/outbrain-react-native/android/build/generated/res/resValues/debug"/></dataSet><mergedItems/></merger>
@@ -0,0 +1,2 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/odedre/work/outbrain/outbrain-react-native/android/src/main/jniLibs"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/odedre/work/outbrain/outbrain-react-native/android/src/debug/jniLibs"/></dataSet></merger>
@@ -0,0 +1,2 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/odedre/work/outbrain/outbrain-react-native/android/src/main/shaders"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/odedre/work/outbrain/outbrain-react-native/android/src/debug/shaders"/></dataSet></merger>
@@ -0,0 +1,2 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/odedre/work/outbrain/outbrain-react-native/android/src/main/assets"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/odedre/work/outbrain/outbrain-react-native/android/src/debug/assets"/></dataSet><dataSet config="generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/odedre/work/outbrain/outbrain-react-native/android/build/intermediates/shader_assets/debug/out"/></dataSet></merger>
@@ -0,0 +1,2 @@
1
+ R_DEF: Internal format may change without notice
2
+ local
@@ -0,0 +1,7 @@
1
+ 1<?xml version="1.0" encoding="utf-8"?>
2
+ 2<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3
+ 3 package="com.outbrainreactnative" >
4
+ 4
5
+ 5 <uses-sdk android:minSdkVersion="23" />
6
+ 6
7
+ 7</manifest>
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android"
3
+ package="com.outbrainreactnative" >
4
+
5
+ <uses-sdk android:minSdkVersion="23" />
6
+
7
+ </manifest>
@@ -0,0 +1,16 @@
1
+ -- Merging decision tree log ---
2
+ manifest
3
+ ADDED from /Users/odedre/work/outbrain/miscellaneous/react-native-viewability-not-working-october-2024/outbrain-not-working-reproduce/node_modules/outbrain-react-native/android/src/main/AndroidManifestNew.xml:1:1-2:12
4
+ INJECTED from /Users/odedre/work/outbrain/miscellaneous/react-native-viewability-not-working-october-2024/outbrain-not-working-reproduce/node_modules/outbrain-react-native/android/src/main/AndroidManifestNew.xml:1:1-2:12
5
+ package
6
+ INJECTED from /Users/odedre/work/outbrain/miscellaneous/react-native-viewability-not-working-october-2024/outbrain-not-working-reproduce/node_modules/outbrain-react-native/android/src/main/AndroidManifestNew.xml
7
+ xmlns:android
8
+ ADDED from /Users/odedre/work/outbrain/miscellaneous/react-native-viewability-not-working-october-2024/outbrain-not-working-reproduce/node_modules/outbrain-react-native/android/src/main/AndroidManifestNew.xml:1:11-69
9
+ uses-sdk
10
+ INJECTED from /Users/odedre/work/outbrain/miscellaneous/react-native-viewability-not-working-october-2024/outbrain-not-working-reproduce/node_modules/outbrain-react-native/android/src/main/AndroidManifestNew.xml reason: use-sdk injection requested
11
+ INJECTED from /Users/odedre/work/outbrain/miscellaneous/react-native-viewability-not-working-october-2024/outbrain-not-working-reproduce/node_modules/outbrain-react-native/android/src/main/AndroidManifestNew.xml
12
+ INJECTED from /Users/odedre/work/outbrain/miscellaneous/react-native-viewability-not-working-october-2024/outbrain-not-working-reproduce/node_modules/outbrain-react-native/android/src/main/AndroidManifestNew.xml
13
+ android:targetSdkVersion
14
+ INJECTED from /Users/odedre/work/outbrain/miscellaneous/react-native-viewability-not-working-october-2024/outbrain-not-working-reproduce/node_modules/outbrain-react-native/android/src/main/AndroidManifestNew.xml
15
+ android:minSdkVersion
16
+ INJECTED from /Users/odedre/work/outbrain/miscellaneous/react-native-viewability-not-working-october-2024/outbrain-not-working-reproduce/node_modules/outbrain-react-native/android/src/main/AndroidManifestNew.xml
@@ -0,0 +1,101 @@
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["OutbrainReactNative_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 reactNativeArchitectures() {
18
+ def value = rootProject.getProperties().get("reactNativeArchitectures")
19
+ return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
20
+ }
21
+
22
+ def isNewArchitectureEnabled() {
23
+ return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true"
24
+ }
25
+
26
+ apply plugin: "com.android.library"
27
+ apply plugin: "kotlin-android"
28
+
29
+ if (isNewArchitectureEnabled()) {
30
+ apply plugin: "com.facebook.react"
31
+ }
32
+
33
+ def getExtOrDefault(name) {
34
+ return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties["OutbrainReactNative_" + name]
35
+ }
36
+
37
+ def getExtOrIntegerDefault(name) {
38
+ return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties["OutbrainReactNative_" + name]).toInteger()
39
+ }
40
+
41
+ def supportsNamespace() {
42
+ def parsed = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')
43
+ def major = parsed[0].toInteger()
44
+ def minor = parsed[1].toInteger()
45
+
46
+ // Namespace support was added in 7.3.0
47
+ return (major == 7 && minor >= 3) || major >= 8
48
+ }
49
+
50
+ android {
51
+ if (supportsNamespace()) {
52
+ namespace "com.outbrainreactnative"
53
+
54
+ sourceSets {
55
+ main {
56
+ manifest.srcFile "src/main/AndroidManifestNew.xml"
57
+ }
58
+ }
59
+ }
60
+
61
+ compileSdkVersion getExtOrIntegerDefault("compileSdkVersion")
62
+
63
+ defaultConfig {
64
+ minSdkVersion getExtOrIntegerDefault("minSdkVersion")
65
+ targetSdkVersion getExtOrIntegerDefault("targetSdkVersion")
66
+
67
+ }
68
+
69
+ buildTypes {
70
+ release {
71
+ minifyEnabled false
72
+ }
73
+ }
74
+
75
+ lintOptions {
76
+ disable "GradleCompatible"
77
+ }
78
+
79
+ compileOptions {
80
+ sourceCompatibility JavaVersion.VERSION_16
81
+ targetCompatibility JavaVersion.VERSION_16
82
+ }
83
+ }
84
+
85
+ repositories {
86
+ mavenCentral()
87
+ google()
88
+ }
89
+
90
+ def kotlin_version = getExtOrDefault("kotlinVersion")
91
+
92
+ dependencies {
93
+ // For < 0.71, this will be from the local maven repo
94
+ // For > 0.71, this will be replaced by `com.facebook.react:react-android:$version` by react gradle plugin
95
+ //noinspection GradleDynamicVersion
96
+ implementation 'com.outbrain.mobile:obsdk:5.0.7.beta'
97
+ implementation "com.google.code.gson:gson:2.11.0"
98
+ implementation "com.facebook.react:react-native:+"
99
+ implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
100
+ }
101
+
@@ -0,0 +1,7 @@
1
+ distributionBase=GRADLE_USER_HOME
2
+ distributionPath=wrapper/dists
3
+ distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
4
+ networkTimeout=10000
5
+ validateDistributionUrl=true
6
+ zipStoreBase=GRADLE_USER_HOME
7
+ zipStorePath=wrapper/dists
@@ -0,0 +1,5 @@
1
+ OutbrainReactNative_kotlinVersion=1.7.0
2
+ OutbrainReactNative_minSdkVersion=21
3
+ OutbrainReactNative_targetSdkVersion=31
4
+ OutbrainReactNative_compileSdkVersion=31
5
+ OutbrainReactNative_ndkversion=21.4.7075529
@@ -0,0 +1,249 @@
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/HEAD/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
+ # This is normally unused
84
+ # shellcheck disable=SC2034
85
+ APP_BASE_NAME=${0##*/}
86
+ # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
87
+ APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
88
+
89
+ # Use the maximum available, or set MAX_FD != -1 to use that value.
90
+ MAX_FD=maximum
91
+
92
+ warn () {
93
+ echo "$*"
94
+ } >&2
95
+
96
+ die () {
97
+ echo
98
+ echo "$*"
99
+ echo
100
+ exit 1
101
+ } >&2
102
+
103
+ # OS specific support (must be 'true' or 'false').
104
+ cygwin=false
105
+ msys=false
106
+ darwin=false
107
+ nonstop=false
108
+ case "$( uname )" in #(
109
+ CYGWIN* ) cygwin=true ;; #(
110
+ Darwin* ) darwin=true ;; #(
111
+ MSYS* | MINGW* ) msys=true ;; #(
112
+ NONSTOP* ) nonstop=true ;;
113
+ esac
114
+
115
+ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
116
+
117
+
118
+ # Determine the Java command to use to start the JVM.
119
+ if [ -n "$JAVA_HOME" ] ; then
120
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
121
+ # IBM's JDK on AIX uses strange locations for the executables
122
+ JAVACMD=$JAVA_HOME/jre/sh/java
123
+ else
124
+ JAVACMD=$JAVA_HOME/bin/java
125
+ fi
126
+ if [ ! -x "$JAVACMD" ] ; then
127
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
128
+
129
+ Please set the JAVA_HOME variable in your environment to match the
130
+ location of your Java installation."
131
+ fi
132
+ else
133
+ JAVACMD=java
134
+ if ! command -v java >/dev/null 2>&1
135
+ then
136
+ 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
+ fi
142
+
143
+ # Increase the maximum file descriptors if we can.
144
+ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
145
+ case $MAX_FD in #(
146
+ max*)
147
+ # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
148
+ # shellcheck disable=SC2039,SC3045
149
+ MAX_FD=$( ulimit -H -n ) ||
150
+ warn "Could not query maximum file descriptor limit"
151
+ esac
152
+ case $MAX_FD in #(
153
+ '' | soft) :;; #(
154
+ *)
155
+ # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
156
+ # shellcheck disable=SC2039,SC3045
157
+ ulimit -n "$MAX_FD" ||
158
+ warn "Could not set maximum file descriptor limit to $MAX_FD"
159
+ esac
160
+ fi
161
+
162
+ # Collect all arguments for the java command, stacking in reverse order:
163
+ # * args from the command line
164
+ # * the main class name
165
+ # * -classpath
166
+ # * -D...appname settings
167
+ # * --module-path (only if needed)
168
+ # * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
169
+
170
+ # For Cygwin or MSYS, switch paths to Windows format before running java
171
+ if "$cygwin" || "$msys" ; then
172
+ APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
173
+ CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
174
+
175
+ JAVACMD=$( cygpath --unix "$JAVACMD" )
176
+
177
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
178
+ for arg do
179
+ if
180
+ case $arg in #(
181
+ -*) false ;; # don't mess with options #(
182
+ /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
183
+ [ -e "$t" ] ;; #(
184
+ *) false ;;
185
+ esac
186
+ then
187
+ arg=$( cygpath --path --ignore --mixed "$arg" )
188
+ fi
189
+ # Roll the args list around exactly as many times as the number of
190
+ # args, so each arg winds up back in the position where it started, but
191
+ # possibly modified.
192
+ #
193
+ # NB: a `for` loop captures its iteration list before it begins, so
194
+ # changing the positional parameters here affects neither the number of
195
+ # iterations, nor the values presented in `arg`.
196
+ shift # remove old arg
197
+ set -- "$@" "$arg" # push replacement arg
198
+ done
199
+ fi
200
+
201
+
202
+ # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
203
+ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
204
+
205
+ # Collect all arguments for the java command:
206
+ # * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
207
+ # and any embedded shellness will be escaped.
208
+ # * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
209
+ # treated as '${Hostname}' itself on the command line.
210
+
211
+ set -- \
212
+ "-Dorg.gradle.appname=$APP_BASE_NAME" \
213
+ -classpath "$CLASSPATH" \
214
+ org.gradle.wrapper.GradleWrapperMain \
215
+ "$@"
216
+
217
+ # Stop when "xargs" is not available.
218
+ if ! command -v xargs >/dev/null 2>&1
219
+ then
220
+ die "xargs is not available"
221
+ fi
222
+
223
+ # Use "xargs" to parse quoted args.
224
+ #
225
+ # With -n1 it outputs one arg per line, with the quotes and backslashes removed.
226
+ #
227
+ # In Bash we could simply go:
228
+ #
229
+ # readarray ARGS < <( xargs -n1 <<<"$var" ) &&
230
+ # set -- "${ARGS[@]}" "$@"
231
+ #
232
+ # but POSIX shell has neither arrays nor command substitution, so instead we
233
+ # post-process each arg (as a line of input to sed) to backslash-escape any
234
+ # character that might be a shell metacharacter, then use eval to reverse
235
+ # that process (while maintaining the separation between arguments), and wrap
236
+ # the whole thing up as a single "set" statement.
237
+ #
238
+ # This will of course break if any of these variables contains a newline or
239
+ # an unmatched quote.
240
+ #
241
+
242
+ eval "set -- $(
243
+ printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
244
+ xargs -n1 |
245
+ sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
246
+ tr '\n' ' '
247
+ )" '"$@"'
248
+
249
+ exec "$JAVACMD" "$@"