react-native-acoustic-connect-beta 16.0.4 → 16.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Example/nativebase-v3-kitchensink/android/app/build.gradle +103 -82
- package/Example/nativebase-v3-kitchensink/android/app/src/debug/AndroidManifest.xml +1 -2
- package/Example/nativebase-v3-kitchensink/android/app/src/debug/java/com/geekyants/kitchensinkappnativebase/ReactNativeFlipper.java +10 -4
- package/Example/nativebase-v3-kitchensink/android/app/src/main/AndroidManifest.xml +3 -3
- package/Example/nativebase-v3-kitchensink/android/app/src/main/java/com/geekyants/kitchensinkappnativebase/MainActivity.java +14 -12
- package/Example/nativebase-v3-kitchensink/android/app/src/main/java/com/geekyants/kitchensinkappnativebase/MainApplication.java +41 -55
- package/Example/nativebase-v3-kitchensink/android/build.gradle +14 -24
- package/Example/nativebase-v3-kitchensink/android/gradle.properties +20 -3
- package/Example/nativebase-v3-kitchensink/android/settings.gradle +4 -1
- package/Example/nativebase-v3-kitchensink/babel.config.js +7 -1
- package/Example/nativebase-v3-kitchensink/ios/.xcode.env +11 -0
- package/Example/nativebase-v3-kitchensink/ios/KitchenSinkappnativebase/AppDelegate.h +2 -3
- package/Example/nativebase-v3-kitchensink/ios/KitchenSinkappnativebase/AppDelegate.m +10 -69
- package/Example/nativebase-v3-kitchensink/ios/KitchenSinkappnativebase/Images.xcassets/AppIcon.appiconset/Contents.json +7 -116
- package/Example/nativebase-v3-kitchensink/ios/KitchenSinkappnativebase/Info.plist +4 -0
- package/Example/nativebase-v3-kitchensink/ios/KitchenSinkappnativebase.xcodeproj/project.pbxproj +47 -37
- package/Example/nativebase-v3-kitchensink/ios/Podfile +105 -53
- package/Example/nativebase-v3-kitchensink/ios/Podfile.properties.json +2 -1
- package/Example/nativebase-v3-kitchensink/metro.config.js +12 -14
- package/Example/nativebase-v3-kitchensink/package.json +21 -18
- package/Example/nativebase-v3-kitchensink/src/components/RootComponent.tsx +3 -5
- package/Example/nativebase-v3-kitchensink/src/nb/NativeBase/src/core/NativeBaseProvider.tsx +2 -2
- package/GroovyUtils/psgrep.sh +1 -0
- package/Jenkinsfile +27 -25
- package/android/build.gradle +1 -1
- package/latestChanges +4 -3
- package/package.json +1 -1
- package/Example/nativebase-v3-kitchensink/android/app/BUCK +0 -55
- package/Example/nativebase-v3-kitchensink/android/app/build_defs.bzl +0 -19
- package/Example/nativebase-v3-kitchensink/ios/KitchenSinkappnativebase/noop-file.swift +0 -4
- package/Example/nativebase-v3-kitchensink/iosSDKDebug/KitchenSinkappnativebase.xcodeproj/project.pbxproj +0 -543
- package/Example/nativebase-v3-kitchensink/iosSDKDebug/KitchenSinkappnativebase.xcodeproj/xcshareddata/xcschemes/KitchenSinkappnativebase.xcscheme +0 -100
- package/Example/nativebase-v3-kitchensink/iosSDKDebug/KitchenSinkappnativebase.xcworkspace/contents.xcworkspacedata +0 -13
- package/Example/nativebase-v3-kitchensink/iosSDKDebug/KitchenSinkappnativebaseDebugSDK.xcworkspace/contents.xcworkspacedata +0 -10
- package/Example/nativebase-v3-kitchensink/iosSDKDebug/KitchenSinkappnativebaseDebugSDK.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/Example/nativebase-v3-kitchensink/iosSDKDebug/Podfile +0 -51
- package/Example/nativebase-v3-kitchensink/node/.expo/README.md +0 -17
- package/Example/nativebase-v3-kitchensink/node/.expo/settings.json +0 -8
- package/Example/nativebase-v3-kitchensink/yarn.lock +0 -13679
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
apply plugin: "com.android.application"
|
|
2
|
-
|
|
3
|
-
import com.android.build.OutputFile
|
|
2
|
+
apply plugin: "com.facebook.react"
|
|
4
3
|
|
|
5
4
|
/**
|
|
6
5
|
* The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
|
|
@@ -77,74 +76,104 @@ import com.android.build.OutputFile
|
|
|
77
76
|
* ]
|
|
78
77
|
*/
|
|
79
78
|
|
|
80
|
-
|
|
81
|
-
enableHermes: (findProperty('expo.jsEngine') ?: "jsc") == "hermes",
|
|
82
|
-
cliPath: new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim()).getParentFile().getAbsolutePath() + "/cli.js",
|
|
83
|
-
//hermesCommand: new File(["node", "--print", "require.resolve('hermes-engine/package.json')"].execute(null, rootDir).text.trim()).getParentFile().getAbsolutePath() + "/%OS-BIN%/hermesc",
|
|
84
|
-
composeSourceMapsPath: new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim()).getParentFile().getAbsolutePath() + "/scripts/compose-source-maps.js",
|
|
85
|
-
]
|
|
86
|
-
|
|
87
|
-
apply from: new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim(), "../react.gradle")
|
|
79
|
+
def projectRoot = rootDir.getAbsoluteFile().getParentFile().getAbsolutePath()
|
|
88
80
|
|
|
89
81
|
/**
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
* - An APK that only works on x86 devices
|
|
93
|
-
* The advantage is the size of the APK is reduced by about 4MB.
|
|
94
|
-
* Upload all the APKs to the Play Store and people will download
|
|
95
|
-
* the correct one based on the CPU architecture of their device.
|
|
82
|
+
* This is the configuration block to customize your React Native Android app.
|
|
83
|
+
* By default you don't need to apply any configuration, just uncomment the lines you need.
|
|
96
84
|
*/
|
|
97
|
-
|
|
85
|
+
react {
|
|
86
|
+
entryFile = file(["node", "-e", "require('expo/scripts/resolveAppEntry')", projectRoot, "android", "absolute"].execute(null, rootDir).text.trim())
|
|
87
|
+
reactNativeDir = new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim()).getParentFile().getAbsoluteFile()
|
|
88
|
+
hermesCommand = new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim()).getParentFile().getAbsolutePath() + "/sdks/hermesc/%OS-BIN%/hermesc"
|
|
89
|
+
codegenDir = new File(["node", "--print", "require.resolve('@react-native/codegen/package.json')"].execute(null, rootDir).text.trim()).getParentFile().getAbsoluteFile()
|
|
90
|
+
|
|
91
|
+
// Use Expo CLI to bundle the app, this ensures the Metro config
|
|
92
|
+
// works correctly with Expo projects.
|
|
93
|
+
cliFile = new File(["node", "--print", "require.resolve('@expo/cli')"].execute(null, rootDir).text.trim())
|
|
94
|
+
bundleCommand = "export:embed"
|
|
95
|
+
|
|
96
|
+
/* Folders */
|
|
97
|
+
// The root of your project, i.e. where "package.json" lives. Default is '..'
|
|
98
|
+
// root = file("../")
|
|
99
|
+
// The folder where the react-native NPM package is. Default is ../node_modules/react-native
|
|
100
|
+
// reactNativeDir = file("../node_modules/react-native")
|
|
101
|
+
// The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen
|
|
102
|
+
// codegenDir = file("../node_modules/@react-native/codegen")
|
|
103
|
+
|
|
104
|
+
/* Variants */
|
|
105
|
+
// The list of variants to that are debuggable. For those we're going to
|
|
106
|
+
// skip the bundling of the JS bundle and the assets. By default is just 'debug'.
|
|
107
|
+
// If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants.
|
|
108
|
+
// debuggableVariants = ["liteDebug", "prodDebug"]
|
|
109
|
+
|
|
110
|
+
/* Bundling */
|
|
111
|
+
// A list containing the node command and its flags. Default is just 'node'.
|
|
112
|
+
// nodeExecutableAndArgs = ["node"]
|
|
113
|
+
|
|
114
|
+
//
|
|
115
|
+
// The path to the CLI configuration file. Default is empty.
|
|
116
|
+
// bundleConfig = file(../rn-cli.config.js)
|
|
117
|
+
//
|
|
118
|
+
// The name of the generated asset file containing your JS bundle
|
|
119
|
+
// bundleAssetName = "MyApplication.android.bundle"
|
|
120
|
+
//
|
|
121
|
+
// The entry file for bundle generation. Default is 'index.android.js' or 'index.js'
|
|
122
|
+
// entryFile = file("../js/MyApplication.android.js")
|
|
123
|
+
//
|
|
124
|
+
// A list of extra flags to pass to the 'bundle' commands.
|
|
125
|
+
// See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle
|
|
126
|
+
// extraPackagerArgs = []
|
|
127
|
+
|
|
128
|
+
/* Hermes Commands */
|
|
129
|
+
// The hermes compiler command to run. By default it is 'hermesc'
|
|
130
|
+
// hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc"
|
|
131
|
+
//
|
|
132
|
+
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
|
|
133
|
+
// hermesFlags = ["-O", "-output-source-map"]
|
|
134
|
+
}
|
|
98
135
|
|
|
99
136
|
/**
|
|
100
|
-
* Run Proguard to
|
|
137
|
+
* Set this to true to Run Proguard on Release builds to minify the Java bytecode.
|
|
101
138
|
*/
|
|
102
|
-
def enableProguardInReleaseBuilds = false
|
|
139
|
+
def enableProguardInReleaseBuilds = (findProperty('android.enableProguardInReleaseBuilds') ?: false).toBoolean()
|
|
103
140
|
|
|
104
141
|
/**
|
|
105
|
-
* The preferred build flavor of JavaScriptCore
|
|
142
|
+
* The preferred build flavor of JavaScriptCore (JSC)
|
|
106
143
|
*
|
|
107
144
|
* For example, to use the international variant, you can use:
|
|
108
145
|
* `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
|
|
109
146
|
*
|
|
110
147
|
* The international variant includes ICU i18n library and necessary data
|
|
111
148
|
* allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
|
|
112
|
-
* give correct results when using with locales other than en-US.
|
|
149
|
+
* give correct results when using with locales other than en-US. Note that
|
|
113
150
|
* this variant is about 6MiB larger per architecture than default.
|
|
114
151
|
*/
|
|
115
152
|
def jscFlavor = 'org.webkit:android-jsc:+'
|
|
116
153
|
|
|
117
|
-
/**
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
def enableHermes = project.ext.react.get("enableHermes", false)
|
|
154
|
+
// /**
|
|
155
|
+
// * Whether to enable the Hermes VM.
|
|
156
|
+
// *
|
|
157
|
+
// * This should be set on project.ext.react and mirrored here. If it is not set
|
|
158
|
+
// * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
|
|
159
|
+
// * and the benefits of using Hermes will therefore be sharply reduced.
|
|
160
|
+
// */
|
|
161
|
+
// def enableHermes = project.ext.react.get("enableHermes", false)
|
|
125
162
|
|
|
126
163
|
android {
|
|
127
|
-
|
|
164
|
+
ndkVersion rootProject.ext.ndkVersion
|
|
128
165
|
|
|
129
|
-
|
|
130
|
-
sourceCompatibility JavaVersion.VERSION_1_8
|
|
131
|
-
targetCompatibility JavaVersion.VERSION_1_8
|
|
132
|
-
}
|
|
166
|
+
compileSdkVersion rootProject.ext.compileSdkVersion
|
|
133
167
|
|
|
168
|
+
namespace "com.geekyants.kitchensinkappnativebase"
|
|
134
169
|
defaultConfig {
|
|
135
170
|
applicationId 'com.geekyants.kitchensinkappnativebase'
|
|
136
171
|
minSdkVersion rootProject.ext.minSdkVersion
|
|
137
172
|
targetSdkVersion rootProject.ext.targetSdkVersion
|
|
138
173
|
versionCode 1
|
|
139
|
-
versionName "
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
abi {
|
|
143
|
-
reset()
|
|
144
|
-
enable enableSeparateBuildPerCPUArchitecture
|
|
145
|
-
universalApk false // If true, also generate a universal APK
|
|
146
|
-
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
|
|
147
|
-
}
|
|
174
|
+
versionName "2.0.0"
|
|
175
|
+
|
|
176
|
+
buildConfigField("boolean", "REACT_NATIVE_UNSTABLE_USE_RUNTIME_SCHEDULER_ALWAYS", (findProperty("reactNative.unstable_useRuntimeSchedulerAlways") ?: true).toString())
|
|
148
177
|
}
|
|
149
178
|
signingConfigs {
|
|
150
179
|
debug {
|
|
@@ -162,86 +191,78 @@ android {
|
|
|
162
191
|
// Caution! In production, you need to generate your own keystore file.
|
|
163
192
|
// see https://reactnative.dev/docs/signed-apk-android.
|
|
164
193
|
signingConfig signingConfigs.debug
|
|
194
|
+
shrinkResources (findProperty('android.enableShrinkResourcesInReleaseBuilds')?.toBoolean() ?: false)
|
|
165
195
|
minifyEnabled enableProguardInReleaseBuilds
|
|
166
196
|
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
|
|
167
197
|
}
|
|
168
198
|
}
|
|
199
|
+
}
|
|
169
200
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
}
|
|
201
|
+
// Apply static values from `gradle.properties` to the `android.packagingOptions`
|
|
202
|
+
// Accepts values in comma delimited lists, example:
|
|
203
|
+
// android.packagingOptions.pickFirsts=/LICENSE,**/picasa.ini
|
|
204
|
+
["pickFirsts", "excludes", "merges", "doNotStrip"].each { prop ->
|
|
205
|
+
// Split option: 'foo,bar' -> ['foo', 'bar']
|
|
206
|
+
def options = (findProperty("android.packagingOptions.$prop") ?: "").split(",");
|
|
207
|
+
// Trim all elements in place.
|
|
208
|
+
for (i in 0..<options.size()) options[i] = options[i].trim();
|
|
209
|
+
// `[] - ""` is essentially `[""].filter(Boolean)` removing all empty strings.
|
|
210
|
+
options -= ""
|
|
181
211
|
|
|
212
|
+
if (options.length > 0) {
|
|
213
|
+
println "android.packagingOptions.$prop += $options ($options.length)"
|
|
214
|
+
// Ex: android.packagingOptions.pickFirsts += '**/SCCS/**'
|
|
215
|
+
options.each {
|
|
216
|
+
android.packagingOptions[prop] += it
|
|
182
217
|
}
|
|
183
218
|
}
|
|
184
219
|
}
|
|
185
220
|
|
|
186
221
|
dependencies {
|
|
187
222
|
implementation fileTree(dir: "libs", include: ["*.jar"])
|
|
188
|
-
//
|
|
189
|
-
implementation
|
|
223
|
+
// The version of react-native is set by the React Native Gradle Plugin
|
|
224
|
+
implementation("com.facebook.react:react-android")
|
|
190
225
|
|
|
191
226
|
def isGifEnabled = (findProperty('expo.gif.enabled') ?: "") == "true"
|
|
192
227
|
def isWebpEnabled = (findProperty('expo.webp.enabled') ?: "") == "true"
|
|
193
228
|
def isWebpAnimatedEnabled = (findProperty('expo.webp.animated') ?: "") == "true"
|
|
229
|
+
def frescoVersion = rootProject.ext.frescoVersion
|
|
194
230
|
|
|
195
231
|
// If your app supports Android versions before Ice Cream Sandwich (API level 14)
|
|
196
|
-
// All fresco packages should use the same version
|
|
197
232
|
if (isGifEnabled || isWebpEnabled) {
|
|
198
|
-
implementation
|
|
199
|
-
implementation
|
|
233
|
+
implementation("com.facebook.fresco:fresco:${frescoVersion}")
|
|
234
|
+
implementation("com.facebook.fresco:imagepipeline-okhttp3:${frescoVersion}")
|
|
200
235
|
}
|
|
201
236
|
|
|
202
237
|
if (isGifEnabled) {
|
|
203
238
|
// For animated gif support
|
|
204
|
-
implementation
|
|
239
|
+
implementation("com.facebook.fresco:animated-gif:${frescoVersion}")
|
|
205
240
|
}
|
|
206
241
|
|
|
207
242
|
if (isWebpEnabled) {
|
|
208
243
|
// For webp support
|
|
209
|
-
implementation
|
|
244
|
+
implementation("com.facebook.fresco:webpsupport:${frescoVersion}")
|
|
210
245
|
if (isWebpAnimatedEnabled) {
|
|
211
246
|
// Animated webp support
|
|
212
|
-
implementation
|
|
247
|
+
implementation("com.facebook.fresco:animated-webp:${frescoVersion}")
|
|
213
248
|
}
|
|
214
249
|
}
|
|
215
250
|
|
|
216
|
-
|
|
217
|
-
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
|
|
218
|
-
exclude group:'com.facebook.fbjni'
|
|
219
|
-
}
|
|
251
|
+
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}")
|
|
220
252
|
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
|
|
221
|
-
exclude group:'com.facebook.flipper'
|
|
222
253
|
exclude group:'com.squareup.okhttp3', module:'okhttp'
|
|
223
254
|
}
|
|
224
|
-
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}")
|
|
225
|
-
exclude group:'com.facebook.flipper'
|
|
226
|
-
}
|
|
255
|
+
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}")
|
|
227
256
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
releaseImplementation files(new File(["node", "--print", "require.resolve('hermes-engine/package.json')"].execute(null, rootDir).text.trim(), "../android/hermes-release.aar"))
|
|
257
|
+
if (hermesEnabled.toBoolean()) {
|
|
258
|
+
implementation("com.facebook.react:hermes-android")
|
|
231
259
|
} else {
|
|
232
260
|
implementation jscFlavor
|
|
233
261
|
}
|
|
234
262
|
}
|
|
235
263
|
|
|
236
|
-
// Run this once to be able to run the application with BUCK
|
|
237
|
-
// puts all compile dependencies into folder libs for BUCK to use
|
|
238
|
-
task copyDownloadableDepsToLibs(type: Copy) {
|
|
239
|
-
from configurations.implementation
|
|
240
|
-
into 'libs'
|
|
241
|
-
}
|
|
242
|
-
|
|
243
264
|
apply from: new File(["node", "--print", "require.resolve('@react-native-community/cli-platform-android/package.json')"].execute(null, rootDir).text.trim(), "../native_modules.gradle")
|
|
244
265
|
applyNativeModulesAppBuildGradle(project)
|
|
245
266
|
|
|
246
|
-
apply from: project(':react-native-acoustic-ea-tealeaf-beta').projectDir.getPath() + "/config.gradle"
|
|
247
|
-
apply from: project(':react-native-acoustic-connect-beta').projectDir.getPath() + "/config.gradle"
|
|
267
|
+
//apply from: project(':react-native-acoustic-ea-tealeaf-beta').projectDir.getPath() + "/config.gradle"
|
|
268
|
+
//apply from: project(':react-native-acoustic-connect-beta').projectDir.getPath() + "/config.gradle"
|
|
@@ -2,6 +2,5 @@
|
|
|
2
2
|
xmlns:tools="http://schemas.android.com/tools">
|
|
3
3
|
|
|
4
4
|
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
|
|
5
|
-
|
|
6
|
-
<application android:usesCleartextTraffic="true" tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" />
|
|
5
|
+
<application android:usesCleartextTraffic="true" tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" tools:replace="android:usesCleartextTraffic" />
|
|
7
6
|
</manifest>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
3
|
*
|
|
4
4
|
* <p>This source code is licensed under the MIT license found in the LICENSE file in the root
|
|
5
5
|
* directory of this source tree.
|
|
@@ -17,22 +17,27 @@ import com.facebook.flipper.plugins.inspector.DescriptorMapping;
|
|
|
17
17
|
import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin;
|
|
18
18
|
import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor;
|
|
19
19
|
import com.facebook.flipper.plugins.network.NetworkFlipperPlugin;
|
|
20
|
-
import com.facebook.flipper.plugins.react.ReactFlipperPlugin;
|
|
21
20
|
import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin;
|
|
21
|
+
import com.facebook.react.ReactInstanceEventListener;
|
|
22
22
|
import com.facebook.react.ReactInstanceManager;
|
|
23
23
|
import com.facebook.react.bridge.ReactContext;
|
|
24
24
|
import com.facebook.react.modules.network.NetworkingModule;
|
|
25
25
|
import okhttp3.OkHttpClient;
|
|
26
26
|
|
|
27
|
+
/**
|
|
28
|
+
* Class responsible of loading Flipper inside your React Native application. This is the debug
|
|
29
|
+
* flavor of it. Here you can add your own plugins and customize the Flipper setup.
|
|
30
|
+
*/
|
|
27
31
|
public class ReactNativeFlipper {
|
|
28
32
|
public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
|
|
29
33
|
if (FlipperUtils.shouldEnableFlipper(context)) {
|
|
30
34
|
final FlipperClient client = AndroidFlipperClient.getInstance(context);
|
|
35
|
+
|
|
31
36
|
client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults()));
|
|
32
|
-
client.addPlugin(new ReactFlipperPlugin());
|
|
33
37
|
client.addPlugin(new DatabasesFlipperPlugin(context));
|
|
34
38
|
client.addPlugin(new SharedPreferencesFlipperPlugin(context));
|
|
35
39
|
client.addPlugin(CrashReporterPlugin.getInstance());
|
|
40
|
+
|
|
36
41
|
NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin();
|
|
37
42
|
NetworkingModule.setCustomClientBuilder(
|
|
38
43
|
new NetworkingModule.CustomClientBuilder() {
|
|
@@ -43,12 +48,13 @@ public class ReactNativeFlipper {
|
|
|
43
48
|
});
|
|
44
49
|
client.addPlugin(networkFlipperPlugin);
|
|
45
50
|
client.start();
|
|
51
|
+
|
|
46
52
|
// Fresco Plugin needs to ensure that ImagePipelineFactory is initialized
|
|
47
53
|
// Hence we run if after all native modules have been initialized
|
|
48
54
|
ReactContext reactContext = reactInstanceManager.getCurrentReactContext();
|
|
49
55
|
if (reactContext == null) {
|
|
50
56
|
reactInstanceManager.addReactInstanceEventListener(
|
|
51
|
-
new
|
|
57
|
+
new ReactInstanceEventListener() {
|
|
52
58
|
@Override
|
|
53
59
|
public void onReactContextInitialized(ReactContext reactContext) {
|
|
54
60
|
reactInstanceManager.removeReactInstanceEventListener(this);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
1
|
+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
|
2
2
|
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION"/>
|
|
3
3
|
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
|
|
4
4
|
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
|
23
23
|
<uses-permission android:name="android.permission.WRITE_SETTINGS"/>
|
|
24
24
|
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE"/>
|
|
25
|
-
<application android:name=".MainApplication" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" android:allowBackup="
|
|
25
|
+
<application android:name=".MainApplication" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" android:allowBackup="false" android:theme="@style/AppTheme">
|
|
26
26
|
<meta-data android:name="expo.modules.updates.ENABLED" android:value="true"/>
|
|
27
27
|
<meta-data android:name="expo.modules.updates.EXPO_RELEASE_CHANNEL" android:value="default"/>
|
|
28
|
-
<meta-data android:name="expo.modules.updates.EXPO_SDK_VERSION" android:value="
|
|
28
|
+
<meta-data android:name="expo.modules.updates.EXPO_SDK_VERSION" android:value="49.0.0"/>
|
|
29
29
|
<meta-data android:name="expo.modules.updates.EXPO_UPDATES_CHECK_ON_LAUNCH" android:value="ALWAYS"/>
|
|
30
30
|
<meta-data android:name="expo.modules.updates.EXPO_UPDATES_LAUNCH_WAIT_MS" android:value="0"/>
|
|
31
31
|
<meta-data android:name="expo.modules.updates.EXPO_UPDATE_URL" android:value="https://exp.host/@anonymous/kitchensink-app-native-base"/>
|
|
@@ -5,9 +5,9 @@ import android.view.MotionEvent;
|
|
|
5
5
|
|
|
6
6
|
import com.facebook.react.ReactActivity;
|
|
7
7
|
import com.facebook.react.ReactActivityDelegate;
|
|
8
|
-
import com.facebook.react.
|
|
9
|
-
import com.
|
|
10
|
-
import com.tl.uic.Tealeaf;
|
|
8
|
+
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
|
|
9
|
+
import com.facebook.react.defaults.DefaultReactActivityDelegate;
|
|
10
|
+
//import com.tl.uic.Tealeaf;
|
|
11
11
|
|
|
12
12
|
import expo.modules.ReactActivityDelegateWrapper;
|
|
13
13
|
|
|
@@ -27,21 +27,23 @@ public class MainActivity extends ReactActivity {
|
|
|
27
27
|
return "main";
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
+
/**
|
|
31
|
+
* Returns the instance of the {@link ReactActivityDelegate}. Here we use a util class {@link
|
|
32
|
+
* DefaultReactActivityDelegate} which allows you to easily enable Fabric and Concurrent React
|
|
33
|
+
* (aka React 18) with two boolean flags.
|
|
34
|
+
*/
|
|
30
35
|
@Override
|
|
31
36
|
protected ReactActivityDelegate createReactActivityDelegate() {
|
|
32
|
-
return new ReactActivityDelegateWrapper(this,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
);
|
|
37
|
+
return new ReactActivityDelegateWrapper(this, BuildConfig.IS_NEW_ARCHITECTURE_ENABLED, new DefaultReactActivityDelegate(
|
|
38
|
+
this,
|
|
39
|
+
getMainComponentName(),
|
|
40
|
+
// If you opted-in for the New Architecture, we enable the Fabric Renderer.
|
|
41
|
+
DefaultNewArchitectureEntryPoint.getFabricEnabled()));
|
|
40
42
|
}
|
|
41
43
|
|
|
42
44
|
@Override
|
|
43
45
|
public boolean dispatchTouchEvent(MotionEvent e) {
|
|
44
|
-
Tealeaf.dispatchTouchEvent(this, e);
|
|
46
|
+
// Tealeaf.dispatchTouchEvent(this, e);
|
|
45
47
|
return super.dispatchTouchEvent(e);
|
|
46
48
|
}
|
|
47
49
|
}
|
|
@@ -1,46 +1,55 @@
|
|
|
1
1
|
package com.geekyants.kitchensinkappnativebase;
|
|
2
2
|
|
|
3
3
|
import android.app.Application;
|
|
4
|
-
import android.content.Context;
|
|
5
4
|
import android.content.res.Configuration;
|
|
6
5
|
import androidx.annotation.NonNull;
|
|
7
6
|
|
|
8
7
|
import com.facebook.react.PackageList;
|
|
9
8
|
import com.facebook.react.ReactApplication;
|
|
10
|
-
import com.facebook.react.ReactInstanceManager;
|
|
11
9
|
import com.facebook.react.ReactNativeHost;
|
|
12
10
|
import com.facebook.react.ReactPackage;
|
|
11
|
+
import com.facebook.react.config.ReactFeatureFlags;
|
|
12
|
+
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
|
|
13
|
+
import com.facebook.react.defaults.DefaultReactNativeHost;
|
|
13
14
|
import com.facebook.react.shell.MainReactPackage;
|
|
14
15
|
import com.facebook.soloader.SoLoader;
|
|
15
16
|
|
|
16
17
|
import expo.modules.ApplicationLifecycleDispatcher;
|
|
17
18
|
import expo.modules.ReactNativeHostWrapper;
|
|
18
19
|
|
|
19
|
-
import java.lang.reflect.InvocationTargetException;
|
|
20
20
|
import java.util.List;
|
|
21
21
|
|
|
22
22
|
public class MainApplication extends Application implements ReactApplication {
|
|
23
|
-
private final ReactNativeHost mReactNativeHost =
|
|
24
|
-
this,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
23
|
+
private final ReactNativeHost mReactNativeHost =
|
|
24
|
+
new ReactNativeHostWrapper(this, new DefaultReactNativeHost(this) {
|
|
25
|
+
@Override
|
|
26
|
+
public boolean getUseDeveloperSupport() {
|
|
27
|
+
return BuildConfig.DEBUG;
|
|
28
|
+
}
|
|
30
29
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
30
|
+
@Override
|
|
31
|
+
protected List<ReactPackage> getPackages() {
|
|
32
|
+
@SuppressWarnings("UnnecessaryLocalVariable")
|
|
33
|
+
List<ReactPackage> packages = new PackageList(this).getPackages();
|
|
34
|
+
// Packages that cannot be autolinked yet can be added manually here, for example:
|
|
35
|
+
// packages.add(new MyReactNativePackage());
|
|
36
|
+
return packages;
|
|
37
|
+
}
|
|
39
38
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
@Override
|
|
40
|
+
protected String getJSMainModuleName() {
|
|
41
|
+
return ".expo/.virtual-metro-entry";
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@Override
|
|
45
|
+
protected boolean isNewArchEnabled() {
|
|
46
|
+
return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@Override
|
|
50
|
+
protected Boolean isHermesEnabled() {
|
|
51
|
+
return BuildConfig.IS_HERMES_ENABLED;
|
|
52
|
+
}
|
|
44
53
|
});
|
|
45
54
|
|
|
46
55
|
@Override
|
|
@@ -52,8 +61,16 @@ public class MainApplication extends Application implements ReactApplication {
|
|
|
52
61
|
public void onCreate() {
|
|
53
62
|
super.onCreate();
|
|
54
63
|
SoLoader.init(this, /* native exopackage */ false);
|
|
55
|
-
|
|
56
|
-
|
|
64
|
+
if (!BuildConfig.REACT_NATIVE_UNSTABLE_USE_RUNTIME_SCHEDULER_ALWAYS) {
|
|
65
|
+
ReactFeatureFlags.unstable_useRuntimeSchedulerAlways = false;
|
|
66
|
+
}
|
|
67
|
+
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
|
|
68
|
+
// If you opted-in for the New Architecture, we load the native entry point for this app.
|
|
69
|
+
DefaultNewArchitectureEntryPoint.load();
|
|
70
|
+
}
|
|
71
|
+
if (BuildConfig.DEBUG) {
|
|
72
|
+
ReactNativeFlipper.initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
|
|
73
|
+
}
|
|
57
74
|
ApplicationLifecycleDispatcher.onApplicationCreate(this);
|
|
58
75
|
}
|
|
59
76
|
|
|
@@ -62,35 +79,4 @@ public class MainApplication extends Application implements ReactApplication {
|
|
|
62
79
|
super.onConfigurationChanged(newConfig);
|
|
63
80
|
ApplicationLifecycleDispatcher.onConfigurationChanged(this, newConfig);
|
|
64
81
|
}
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Loads Flipper in React Native templates. Call this in the onCreate method with something like
|
|
68
|
-
* initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
|
|
69
|
-
*
|
|
70
|
-
* @param context
|
|
71
|
-
* @param reactInstanceManager
|
|
72
|
-
*/
|
|
73
|
-
private static void initializeFlipper(
|
|
74
|
-
Context context, ReactInstanceManager reactInstanceManager) {
|
|
75
|
-
if (BuildConfig.DEBUG) {
|
|
76
|
-
try {
|
|
77
|
-
/*
|
|
78
|
-
We use reflection here to pick up the class that initializes Flipper,
|
|
79
|
-
since Flipper library is not available in release mode
|
|
80
|
-
*/
|
|
81
|
-
Class<?> aClass = Class.forName("com.geekyants.kitchensinkappnativebase.ReactNativeFlipper");
|
|
82
|
-
aClass
|
|
83
|
-
.getMethod("initializeFlipper", Context.class, ReactInstanceManager.class)
|
|
84
|
-
.invoke(null, context, reactInstanceManager);
|
|
85
|
-
} catch (ClassNotFoundException e) {
|
|
86
|
-
e.printStackTrace();
|
|
87
|
-
} catch (NoSuchMethodException e) {
|
|
88
|
-
e.printStackTrace();
|
|
89
|
-
} catch (IllegalAccessException e) {
|
|
90
|
-
e.printStackTrace();
|
|
91
|
-
} catch (InvocationTargetException e) {
|
|
92
|
-
e.printStackTrace();
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
82
|
}
|
|
@@ -2,10 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
buildscript {
|
|
4
4
|
ext {
|
|
5
|
-
buildToolsVersion =
|
|
6
|
-
minSdkVersion = 21
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
buildToolsVersion = findProperty('android.buildToolsVersion') ?: '33.0.0'
|
|
6
|
+
minSdkVersion = Integer.parseInt(findProperty('android.minSdkVersion') ?: '21')
|
|
7
|
+
|
|
8
|
+
compileSdkVersion = Integer.parseInt(findProperty('android.compileSdkVersion') ?: '33')
|
|
9
|
+
targetSdkVersion = Integer.parseInt(findProperty('android.targetSdkVersion') ?: '33')
|
|
10
|
+
kotlinVersion = findProperty('android.kotlinVersion') ?: '1.8.10'
|
|
11
|
+
frescoVersion = findProperty('expo.frescoVersion') ?: '2.5.0'
|
|
12
|
+
// We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP.
|
|
13
|
+
ndkVersion = "23.1.7779620"
|
|
9
14
|
}
|
|
10
15
|
repositories {
|
|
11
16
|
google()
|
|
@@ -13,40 +18,25 @@ buildscript {
|
|
|
13
18
|
}
|
|
14
19
|
|
|
15
20
|
dependencies {
|
|
16
|
-
classpath("com.android.tools.build:gradle:7.2
|
|
17
|
-
|
|
18
|
-
classpath("de.undercouch:gradle-download-task:5.0.1")
|
|
19
|
-
|
|
21
|
+
classpath("com.android.tools.build:gradle:7.4.2")
|
|
22
|
+
classpath("com.facebook.react:react-native-gradle-plugin")
|
|
20
23
|
// NOTE: Do not place your application dependencies here; they belong
|
|
21
24
|
// in the individual module build.gradle files
|
|
22
25
|
}
|
|
23
26
|
}
|
|
24
27
|
|
|
25
|
-
def REACT_NATIVE_VERSION = new File(['node', '--print',"JSON.parse(require('fs').readFileSync(require.resolve('react-native/package.json'), 'utf-8')).version"].execute(null, rootDir).text.trim())
|
|
26
|
-
|
|
27
28
|
allprojects {
|
|
28
29
|
repositories {
|
|
29
30
|
maven {
|
|
30
31
|
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
|
|
31
32
|
url(new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim(), "../android"))
|
|
32
33
|
}
|
|
33
|
-
|
|
34
|
-
// Android JSC is installed from npm
|
|
35
|
-
url(new File(["node", "--print", "require.resolve('jsc-android/package.json')"].execute(null, rootDir).text.trim(), "../dist"))
|
|
36
|
-
}
|
|
37
|
-
|
|
34
|
+
|
|
38
35
|
google()
|
|
39
|
-
|
|
40
|
-
mavenCentral {
|
|
41
|
-
// We don't want to fetch react-native from Maven Central as there are
|
|
42
|
-
// older versions over there.
|
|
43
|
-
content {
|
|
44
|
-
excludeGroup "com.facebook.react"
|
|
45
|
-
}
|
|
46
|
-
}
|
|
36
|
+
mavenCentral()
|
|
47
37
|
maven { url 'https://www.jitpack.io' }
|
|
48
38
|
|
|
49
39
|
// This is required for the Tealeaf module to use staging repo
|
|
50
|
-
maven { url "https://s01.oss.sonatype.org/content/groups/staging" }
|
|
40
|
+
// maven { url "https://s01.oss.sonatype.org/content/groups/staging" }
|
|
51
41
|
}
|
|
52
42
|
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
# Specifies the JVM arguments used for the daemon process.
|
|
11
11
|
# The setting is particularly useful for tweaking memory settings.
|
|
12
12
|
# Default value: -Xmx10248m -XX:MaxPermSize=256m
|
|
13
|
-
org.gradle.jvmargs=-Xmx2048m -XX:
|
|
13
|
+
org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m
|
|
14
14
|
|
|
15
15
|
# When configured, Gradle will run in incubating parallel mode.
|
|
16
16
|
# This option should only be used with decoupled projects. More details, visit
|
|
@@ -26,7 +26,20 @@ android.useAndroidX=true
|
|
|
26
26
|
android.enableJetifier=true
|
|
27
27
|
|
|
28
28
|
# Version of flipper SDK to use with React Native
|
|
29
|
-
FLIPPER_VERSION=0.
|
|
29
|
+
FLIPPER_VERSION=0.182.0
|
|
30
|
+
|
|
31
|
+
# Use this property to specify which architecture you want to build.
|
|
32
|
+
# You can also override it from the CLI using
|
|
33
|
+
# ./gradlew <task> -PreactNativeArchitectures=x86_64
|
|
34
|
+
reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
|
|
35
|
+
|
|
36
|
+
# to write custom TurboModules/Fabric components OR use libraries that
|
|
37
|
+
# are providing them. # are providing them.
|
|
38
|
+
newArchEnabled=false
|
|
39
|
+
|
|
40
|
+
# Use this property to enable or disable the Hermes JS engine.
|
|
41
|
+
# If set to false, you will be using JSC instead.
|
|
42
|
+
hermesEnabled=true
|
|
30
43
|
|
|
31
44
|
# Enable GIF support in React Native images (~200 B increase)
|
|
32
45
|
expo.gif.enabled=true
|
|
@@ -35,4 +48,8 @@ expo.webp.enabled=true
|
|
|
35
48
|
# Enable animated webp support (~3.4 MB increase)
|
|
36
49
|
# Disabled by default because iOS doesn't support animated webp
|
|
37
50
|
expo.webp.animated=false
|
|
38
|
-
|
|
51
|
+
|
|
52
|
+
# expo.jsEngine=jsc
|
|
53
|
+
|
|
54
|
+
# Enable network inspector
|
|
55
|
+
EX_DEV_CLIENT_NETWORK_INSPECTOR=true
|
|
@@ -7,4 +7,7 @@ apply from: new File(["node", "--print", "require.resolve('@react-native-communi
|
|
|
7
7
|
applyNativeModulesSettingsGradle(settings)
|
|
8
8
|
|
|
9
9
|
include ':app'
|
|
10
|
-
includeBuild('
|
|
10
|
+
includeBuild(new File(["node", "--print", "require.resolve('@react-native/gradle-plugin/package.json')"].execute(null, rootDir).text.trim()).getParentFile())
|
|
11
|
+
|
|
12
|
+
//includeBuild('../node_modules/react-native-gradle-plugin')
|
|
13
|
+
// includeBuild('../node_modules/@react-native/gradle-plugin')
|