airbridge-react-native-sdk-restricted 2.8.7 → 2.8.8

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 (138) hide show
  1. package/.github/actions/add-github-check/action.yml +78 -0
  2. package/.github/actions/add-github-comment/action.yml +48 -0
  3. package/.github/actions/add-slack-message/action.yml +32 -0
  4. package/.github/actions/edit-github-check/action.yml +59 -0
  5. package/.github/actions/edit-github-comment/action.yml +41 -0
  6. package/.github/pull_request_template.md +5 -0
  7. package/.github/readme.md +53 -0
  8. package/.github/workflows/build.yml +367 -0
  9. package/.github/workflows/gitflow.yml +20 -0
  10. package/.github/workflows/release-restricted.yml +35 -0
  11. package/.github/workflows/release.yml +32 -0
  12. package/android/.settings/org.eclipse.buildship.core.prefs +2 -0
  13. package/android/src/main/java/co/ab180/airbridge/reactnative/AirbridgeRN.java +19 -4
  14. package/android/src/main/java/co/ab180/airbridge/reactnative/ConfigReader.java +63 -40
  15. package/changelog.md +5 -0
  16. package/ios/AirbridgeRN/ARNConfigReader.h +1 -1
  17. package/ios/AirbridgeRN/ARNConfigReader.m +13 -15
  18. package/ios/AirbridgeRN/AirbridgeRN.m +23 -2
  19. package/ios/copy-config.rb +1 -1
  20. package/package.json +1 -1
  21. package/qa/.bundle/config +2 -0
  22. package/qa/.eslintrc.js +4 -0
  23. package/qa/.prettierrc.js +7 -0
  24. package/qa/.watchmanconfig +1 -0
  25. package/qa/Gemfile +9 -0
  26. package/qa/Gemfile.lock +105 -0
  27. package/qa/__tests__/App.test.tsx +17 -0
  28. package/qa/airbridge.json +7 -0
  29. package/qa/android/app/build.gradle +130 -0
  30. package/qa/android/app/debug.keystore +0 -0
  31. package/qa/android/app/google-services.json +29 -0
  32. package/qa/android/app/proguard-rules.pro +10 -0
  33. package/qa/android/app/src/debug/AndroidManifest.xml +9 -0
  34. package/qa/android/app/src/main/AndroidManifest.xml +65 -0
  35. package/qa/android/app/src/main/java/co/ab180/airbridge/qa/application/ConfigurationLoader.kt +49 -0
  36. package/qa/android/app/src/main/java/co/ab180/airbridge/qa/application/MainActivity.kt +35 -0
  37. package/qa/android/app/src/main/java/co/ab180/airbridge/qa/application/MainApplication.kt +46 -0
  38. package/qa/android/app/src/main/java/co/ab180/airbridge/qa/application/module/DeviceInfoInteractor.kt +60 -0
  39. package/qa/android/app/src/main/java/co/ab180/airbridge/qa/application/module/DeviceInfoUtils.kt +115 -0
  40. package/qa/android/app/src/main/java/co/ab180/airbridge/qa/application/module/IdentifiersInteractor.kt +83 -0
  41. package/qa/android/app/src/main/java/co/ab180/airbridge/qa/application/module/InstallReferrerInteractor.kt +91 -0
  42. package/qa/android/app/src/main/java/co/ab180/airbridge/qa/application/module/ModuleInjector.kt +22 -0
  43. package/qa/android/app/src/main/java/co/ab180/airbridge/qa/application/module/PermissionInteractor.kt +55 -0
  44. package/qa/android/app/src/main/java/co/ab180/airbridge/qa/application/module/UserInfoInteractor.kt +74 -0
  45. package/qa/android/app/src/main/res/drawable/rn_edit_text_material.xml +37 -0
  46. package/qa/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  47. package/qa/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  48. package/qa/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  49. package/qa/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  50. package/qa/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  51. package/qa/android/app/src/main/res/values/strings.xml +3 -0
  52. package/qa/android/app/src/main/res/values/styles.xml +9 -0
  53. package/qa/android/build.gradle +28 -0
  54. package/qa/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  55. package/qa/android/gradle/wrapper/gradle-wrapper.properties +7 -0
  56. package/qa/android/gradle.properties +41 -0
  57. package/qa/android/gradlew +249 -0
  58. package/qa/android/gradlew.bat +92 -0
  59. package/qa/android/settings.gradle +4 -0
  60. package/qa/app.json +4 -0
  61. package/qa/babel.config.js +3 -0
  62. package/qa/index.js +5 -0
  63. package/qa/ios/.xcode.env +11 -0
  64. package/qa/ios/AirbridgeQA/AirbridgeQA.entitlements +17 -0
  65. package/qa/ios/AirbridgeQA/AppDelegate.h +6 -0
  66. package/qa/ios/AirbridgeQA/AppDelegate.mm +123 -0
  67. package/qa/ios/AirbridgeQA/DeviceInfoInteractor.m +14 -0
  68. package/qa/ios/AirbridgeQA/DeviceInfoInteractor.swift +151 -0
  69. package/qa/ios/AirbridgeQA/IdentifiersInteractor.m +14 -0
  70. package/qa/ios/AirbridgeQA/IdentifiersInteractor.swift +40 -0
  71. package/qa/ios/AirbridgeQA/Images.xcassets/AppIcon.appiconset/Contents.json +53 -0
  72. package/qa/ios/AirbridgeQA/Images.xcassets/Contents.json +6 -0
  73. package/qa/ios/AirbridgeQA/Info.plist +66 -0
  74. package/qa/ios/AirbridgeQA/LaunchScreen.storyboard +47 -0
  75. package/qa/ios/AirbridgeQA/PermissionInteractor.m +14 -0
  76. package/qa/ios/AirbridgeQA/PermissionInteractor.swift +19 -0
  77. package/qa/ios/AirbridgeQA/PrivacyInfo.xcprivacy +39 -0
  78. package/qa/ios/AirbridgeQA/UserInfoInteractor.m +57 -0
  79. package/qa/ios/AirbridgeQA/UserInfoInteractor.swift +49 -0
  80. package/qa/ios/AirbridgeQA/main.m +10 -0
  81. package/qa/ios/AirbridgeQA.xcodeproj/project.pbxproj +771 -0
  82. package/qa/ios/AirbridgeQA.xcodeproj/xcshareddata/xcschemes/AirbridgeQA.xcscheme +88 -0
  83. package/qa/ios/AirbridgeQA.xcworkspace/contents.xcworkspacedata +10 -0
  84. package/qa/ios/AirbridgeQA.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  85. package/qa/ios/AirbridgeQATests/AirbridgeQATests.m +66 -0
  86. package/qa/ios/AirbridgeQATests/Info.plist +24 -0
  87. package/qa/ios/GoogleService-Info.plist +30 -0
  88. package/qa/ios/Library/airbridge-ios-sdk-qa-library.podspec +26 -0
  89. package/qa/ios/Podfile +44 -0
  90. package/qa/ios/Podfile.lock +1634 -0
  91. package/qa/jest.config.js +3 -0
  92. package/qa/metro.config.js +67 -0
  93. package/qa/package-lock.json +14289 -0
  94. package/qa/package.json +47 -0
  95. package/qa/resource/arrow_back.png +0 -0
  96. package/qa/resource/home.png +0 -0
  97. package/qa/resource/info.png +0 -0
  98. package/qa/resource/link.png +0 -0
  99. package/qa/resource/refresh.png +0 -0
  100. package/qa/resource/token.png +0 -0
  101. package/qa/source/App.js +58 -0
  102. package/qa/source/common/Colors.js +20 -0
  103. package/qa/source/common/FCMService.js +94 -0
  104. package/qa/source/common/Native.ts +39 -0
  105. package/qa/source/common/Storage.js +13 -0
  106. package/qa/source/common/Styles.js +39 -0
  107. package/qa/source/component/AttributeEntryInputDialog.js +117 -0
  108. package/qa/source/component/AttributeTypeInputDialog.js +100 -0
  109. package/qa/source/component/ConfirmDialog.js +72 -0
  110. package/qa/source/component/CustomButton.js +50 -0
  111. package/qa/source/component/CustomEventParamsDialog.js +150 -0
  112. package/qa/source/component/CustomTextInput.js +40 -0
  113. package/qa/source/component/EntryInputDialog.js +89 -0
  114. package/qa/source/component/HorizontalPreference.js +46 -0
  115. package/qa/source/component/ImageButton.js +35 -0
  116. package/qa/source/component/InjectInputDialog.js +80 -0
  117. package/qa/source/component/MessageDialog.js +81 -0
  118. package/qa/source/component/UrlInputDialog.js +80 -0
  119. package/qa/source/component/ValueInputDialog.js +80 -0
  120. package/qa/source/component/VerticalPreference.js +42 -0
  121. package/qa/source/navigations/Stack.js +110 -0
  122. package/qa/source/pages/Browse.js +118 -0
  123. package/qa/source/pages/DeviceInfo.js +135 -0
  124. package/qa/source/pages/Event.js +171 -0
  125. package/qa/source/pages/Home.js +136 -0
  126. package/qa/source/pages/Identifiers.js +108 -0
  127. package/qa/source/pages/InstallReferrer.js +64 -0
  128. package/qa/source/pages/Placement.js +38 -0
  129. package/qa/source/pages/RequestPermissions.tsx +41 -0
  130. package/qa/source/pages/UserInfo.js +168 -0
  131. package/qa/source/pages/appInfo.js +22 -0
  132. package/qa/tsconfig.json +3 -0
  133. package/scripts/addiOSFramework.js +48 -0
  134. package/scripts/build-qa.sh +64 -0
  135. package/scripts/change_restricted.sh +21 -0
  136. package/scripts/update_native_version.sh +104 -0
  137. package/src/State.js +10 -2
  138. package/src/WebInterface.js +1 -1
@@ -0,0 +1,91 @@
1
+ package co.ab180.airbridge.qa.application.module
2
+
3
+ import co.ab180.airbridge.Airbridge
4
+ import co.ab180.airbridge.AirbridgeCallback
5
+ import co.ab180.airbridge.ReferrerDetails
6
+ import com.facebook.react.bridge.Promise
7
+ import com.facebook.react.bridge.ReactApplicationContext
8
+ import com.facebook.react.bridge.ReactContextBaseJavaModule
9
+ import com.facebook.react.bridge.ReactMethod
10
+ import kotlinx.coroutines.GlobalScope
11
+ import kotlinx.coroutines.channels.ProducerScope
12
+ import kotlinx.coroutines.channels.awaitClose
13
+ import kotlinx.coroutines.flow.Flow
14
+ import kotlinx.coroutines.flow.callbackFlow
15
+ import kotlinx.coroutines.flow.combine
16
+ import kotlinx.coroutines.launch
17
+ import org.json.JSONObject
18
+
19
+ class InstallReferrerInteractor(
20
+ reactContext: ReactApplicationContext?
21
+ ) : ReactContextBaseJavaModule(reactContext) {
22
+
23
+ override fun getName(): String = "InstallReferrerInteractor"
24
+
25
+ @ReactMethod
26
+ fun installReferrer(promise: Promise) {
27
+ request {
28
+ promise.resolve(
29
+ JSONObject().apply {
30
+ put("responseCode", 200)
31
+ put("data", it)
32
+ }.toString()
33
+ )
34
+ }
35
+ }
36
+
37
+ private fun request(callback : (JSONObject) -> Unit){
38
+ GlobalScope.launch {
39
+ combine(
40
+ requestGoogle(),
41
+ requestOneStore(),
42
+ requestHuawei(),
43
+ requestGalaxyStore()
44
+ ) { google, oneStore, huawei, galaxyStore ->
45
+ JSONObject().apply {
46
+ google?.also { put("google", google) }
47
+ oneStore?.also { put("oneStore", oneStore) }
48
+ huawei?.also { put("huawei", huawei) }
49
+ galaxyStore?.also { put("galaxyStore", galaxyStore) }
50
+ }
51
+ }.collect {
52
+ callback.invoke(it)
53
+ }
54
+ }
55
+ }
56
+
57
+ private fun createCallback(scope: ProducerScope<String?>) : AirbridgeCallback<ReferrerDetails?> {
58
+ return object : AirbridgeCallback<ReferrerDetails?> {
59
+ override fun onSuccess(result: ReferrerDetails?) {
60
+ scope.trySend(result?.installReferrer)
61
+ }
62
+
63
+ override fun onComplete() {
64
+ }
65
+
66
+ override fun onFailure(throwable: Throwable) {
67
+ scope.trySend(null)
68
+ }
69
+ }
70
+ }
71
+
72
+ private fun requestGoogle() : Flow<String?> = callbackFlow {
73
+ Airbridge.getDeviceInfo().getOneStoreInstallReferrerDetails(createCallback(this))
74
+ awaitClose()
75
+ }
76
+
77
+ private fun requestOneStore() : Flow<String?> = callbackFlow {
78
+ Airbridge.getDeviceInfo().getOneStoreInstallReferrerDetails(createCallback(this))
79
+ awaitClose()
80
+ }
81
+
82
+ private fun requestHuawei() : Flow<String?> = callbackFlow {
83
+ Airbridge.getDeviceInfo().getHuaweiInstallReferrerDetails(createCallback(this))
84
+ awaitClose()
85
+ }
86
+
87
+ private fun requestGalaxyStore() : Flow<String?> = callbackFlow {
88
+ Airbridge.getDeviceInfo().getGalaxyStoreInstallReferrerDetails(createCallback(this))
89
+ awaitClose()
90
+ }
91
+ }
@@ -0,0 +1,22 @@
1
+ package co.ab180.airbridge.qa.application.module
2
+
3
+ import com.facebook.react.ReactPackage
4
+ import com.facebook.react.bridge.NativeModule
5
+ import com.facebook.react.bridge.ReactApplicationContext
6
+ import com.facebook.react.uimanager.ViewManager
7
+
8
+ class ModuleInjector : ReactPackage {
9
+ override fun createNativeModules(reactApplicationContext: ReactApplicationContext): List<NativeModule> {
10
+ return arrayListOf(
11
+ PermissionInteractor(reactApplicationContext),
12
+ IdentifiersInteractor(reactApplicationContext),
13
+ DeviceInfoInteractor(reactApplicationContext),
14
+ InstallReferrerInteractor(reactApplicationContext),
15
+ UserInfoInteractor(reactApplicationContext)
16
+ )
17
+ }
18
+
19
+ override fun createViewManagers(reactApplicationContext: ReactApplicationContext): List<ViewManager<*, *>> {
20
+ return emptyList()
21
+ }
22
+ }
@@ -0,0 +1,55 @@
1
+ package co.ab180.airbridge.qa.application.module
2
+
3
+ import android.Manifest
4
+ import android.content.pm.PackageManager
5
+ import android.widget.Toast
6
+ import androidx.core.app.ActivityCompat
7
+ import com.facebook.react.bridge.ReactApplicationContext
8
+ import com.facebook.react.bridge.ReactContextBaseJavaModule
9
+ import com.facebook.react.bridge.ReactMethod
10
+
11
+
12
+ class PermissionInteractor(
13
+ reactContext: ReactApplicationContext?
14
+ ) : ReactContextBaseJavaModule(reactContext) {
15
+ override fun getName(): String {
16
+ return "PermissionInteractor"
17
+ }
18
+
19
+ @ReactMethod
20
+ fun accessFineLocation() {
21
+ _requestPermissions(Manifest.permission.ACCESS_FINE_LOCATION)
22
+ }
23
+
24
+ @ReactMethod
25
+ fun accessCoarseLocation() {
26
+ _requestPermissions(Manifest.permission.ACCESS_COARSE_LOCATION)
27
+ }
28
+
29
+ private fun _requestPermissions(permission: String) {
30
+ val currentActivity = currentActivity ?: return
31
+
32
+ if (ActivityCompat.checkSelfPermission(
33
+ currentActivity,
34
+ permission
35
+ ) == PackageManager.PERMISSION_GRANTED
36
+ ) {
37
+ val p = permission.split(".".toRegex())
38
+ .dropLastWhile { it.isEmpty() }
39
+ .toTypedArray()
40
+ val log = if (p.isEmpty()) "" else p[p.size - 1]
41
+
42
+ Toast.makeText(
43
+ currentActivity,
44
+ String.format("Already granted '%s' permission", log),
45
+ Toast.LENGTH_SHORT
46
+ ).show()
47
+ return
48
+ }
49
+ ActivityCompat.requestPermissions(
50
+ currentActivity,
51
+ arrayOf(permission),
52
+ 9999
53
+ )
54
+ }
55
+ }
@@ -0,0 +1,74 @@
1
+ package co.ab180.airbridge.qa.application.module
2
+
3
+ import co.ab180.airbridge.Airbridge
4
+ import com.facebook.react.bridge.ReactApplicationContext
5
+ import com.facebook.react.bridge.ReactContextBaseJavaModule
6
+ import com.facebook.react.bridge.ReactMethod
7
+ import com.facebook.react.bridge.ReadableMap
8
+ import com.facebook.react.bridge.ReadableType
9
+
10
+ class UserInfoInteractor(
11
+ reactContext: ReactApplicationContext?
12
+ ) : ReactContextBaseJavaModule(reactContext) {
13
+
14
+ override fun getName(): String = "UserInfoInteractor"
15
+
16
+ @ReactMethod
17
+ fun clearId() {
18
+ Airbridge.getCurrentUser().id = null
19
+ }
20
+
21
+ @ReactMethod
22
+ fun clearEmail() {
23
+ Airbridge.getCurrentUser().email = null
24
+ }
25
+
26
+ @ReactMethod
27
+ fun clearPhone() {
28
+ Airbridge.getCurrentUser().phone = null
29
+ }
30
+
31
+ @ReactMethod
32
+ fun addAlias(key: String, value: String) {
33
+ Airbridge.getCurrentUser().setAlias(key, value)
34
+ }
35
+
36
+ @ReactMethod
37
+ fun removeAlias(key: String) {
38
+ Airbridge.getCurrentUser().removeAlias(key)
39
+ }
40
+
41
+ @ReactMethod
42
+ fun clearAlias() {
43
+ Airbridge.getCurrentUser().clearAlias()
44
+ }
45
+
46
+ @ReactMethod
47
+ fun addAttribute(readableMap: ReadableMap) {
48
+ val key = readableMap.getString("key") ?: return
49
+ val value = readableMap.getDynamic("value") ?: return
50
+ val type = readableMap.getString("type") ?: return
51
+
52
+ when(value.type) {
53
+ ReadableType.Number -> {
54
+ when(type) {
55
+ "int", "long" -> Airbridge.getCurrentUser().setAttribute(key, value.asInt())
56
+ "float", "double" -> Airbridge.getCurrentUser().setAttribute(key, value.asDouble().toFloat())
57
+ }
58
+ }
59
+ ReadableType.String -> Airbridge.getCurrentUser().setAttribute(key, value.asString())
60
+ ReadableType.Boolean -> Airbridge.getCurrentUser().setAttribute(key, value.asBoolean())
61
+ else -> { }
62
+ }
63
+ }
64
+
65
+ @ReactMethod
66
+ fun removeAttributes(key: String) {
67
+ Airbridge.getCurrentUser().removeAttribute(key)
68
+ }
69
+
70
+ @ReactMethod
71
+ fun clearAttributes() {
72
+ Airbridge.getCurrentUser().clearAttributes()
73
+ }
74
+ }
@@ -0,0 +1,37 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Copyright (C) 2014 The Android Open Source Project
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ -->
16
+ <inset xmlns:android="http://schemas.android.com/apk/res/android"
17
+ android:insetLeft="@dimen/abc_edit_text_inset_horizontal_material"
18
+ android:insetRight="@dimen/abc_edit_text_inset_horizontal_material"
19
+ android:insetTop="@dimen/abc_edit_text_inset_top_material"
20
+ android:insetBottom="@dimen/abc_edit_text_inset_bottom_material"
21
+ >
22
+
23
+ <selector>
24
+ <!--
25
+ This file is a copy of abc_edit_text_material (https://bit.ly/3k8fX7I).
26
+ The item below with state_pressed="false" and state_focused="false" causes a NullPointerException.
27
+ NullPointerException:tempt to invoke virtual method 'android.graphics.drawable.Drawable android.graphics.drawable.Drawable$ConstantState.newDrawable(android.content.res.Resources)'
28
+
29
+ <item android:state_pressed="false" android:state_focused="false" android:drawable="@drawable/abc_textfield_default_mtrl_alpha"/>
30
+
31
+ For more info, see https://bit.ly/3CdLStv (react-native/pull/29452) and https://bit.ly/3nxOMoR.
32
+ -->
33
+ <item android:state_enabled="false" android:drawable="@drawable/abc_textfield_default_mtrl_alpha"/>
34
+ <item android:drawable="@drawable/abc_textfield_activated_mtrl_alpha"/>
35
+ </selector>
36
+
37
+ </inset>
@@ -0,0 +1,3 @@
1
+ <resources>
2
+ <string name="app_name">AirbridgeQA</string>
3
+ </resources>
@@ -0,0 +1,9 @@
1
+ <resources>
2
+
3
+ <!-- Base application theme. -->
4
+ <style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
5
+ <!-- Customize your theme here. -->
6
+ <item name="android:editTextBackground">@drawable/rn_edit_text_material</item>
7
+ </style>
8
+
9
+ </resources>
@@ -0,0 +1,28 @@
1
+ buildscript {
2
+ ext {
3
+ buildToolsVersion = "34.0.0"
4
+ minSdkVersion = 23
5
+ compileSdkVersion = 34
6
+ targetSdkVersion = 34
7
+ ndkVersion = "26.1.10909125"
8
+ kotlinVersion = "1.9.22"
9
+ }
10
+ repositories {
11
+ google()
12
+ mavenCentral()
13
+ }
14
+ dependencies {
15
+ classpath("com.android.tools.build:gradle")
16
+ classpath("com.facebook.react:react-native-gradle-plugin")
17
+ classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
18
+ classpath("com.google.gms:google-services:4.4.2")
19
+ }
20
+ }
21
+
22
+ rootProject.allprojects {
23
+ repositories {
24
+ maven { url "https://sdk-internal.airbridge.io/maven" }
25
+ }
26
+ }
27
+
28
+ apply plugin: "com.facebook.react.rootproject"
@@ -0,0 +1,7 @@
1
+ distributionBase=GRADLE_USER_HOME
2
+ distributionPath=wrapper/dists
3
+ distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip
4
+ networkTimeout=10000
5
+ validateDistributionUrl=true
6
+ zipStoreBase=GRADLE_USER_HOME
7
+ zipStorePath=wrapper/dists
@@ -0,0 +1,41 @@
1
+ # Project-wide Gradle settings.
2
+
3
+ # IDE (e.g. Android Studio) users:
4
+ # Gradle settings configured through the IDE *will override*
5
+ # any settings specified in this file.
6
+
7
+ # For more details on how to configure your build environment visit
8
+ # http://www.gradle.org/docs/current/userguide/build_environment.html
9
+
10
+ # Specifies the JVM arguments used for the daemon process.
11
+ # The setting is particularly useful for tweaking memory settings.
12
+ # Default value: -Xmx512m -XX:MaxMetaspaceSize=256m
13
+ org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m
14
+
15
+ # When configured, Gradle will run in incubating parallel mode.
16
+ # This option should only be used with decoupled projects. More details, visit
17
+ # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18
+ # org.gradle.parallel=true
19
+
20
+ # AndroidX package structure to make it clearer which packages are bundled with the
21
+ # Android operating system, and which are packaged with your app's APK
22
+ # https://developer.android.com/topic/libraries/support-library/androidx-rn
23
+ android.useAndroidX=true
24
+ # Automatically convert third-party libraries to use AndroidX
25
+ android.enableJetifier=true
26
+
27
+ # Use this property to specify which architecture you want to build.
28
+ # You can also override it from the CLI using
29
+ # ./gradlew <task> -PreactNativeArchitectures=x86_64
30
+ reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
31
+
32
+ # Use this property to enable support to the new architecture.
33
+ # This will allow you to use TurboModules and the Fabric render in
34
+ # your application. You should enable this flag either if you want
35
+ # to write custom TurboModules/Fabric components OR use libraries that
36
+ # are providing them.
37
+ newArchEnabled=false
38
+
39
+ # Use this property to enable or disable the Hermes JS engine.
40
+ # If set to false, you will be using JSC instead.
41
+ hermesEnabled=true
@@ -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" "$@"