react-native-mosquito-transport 0.0.48 → 0.0.49
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/CONTRIBUTING.md +37 -19
- package/MosquitoTransport.podspec +20 -0
- package/android/build.gradle +32 -42
- package/android/src/main/AndroidManifest.xml +1 -3
- package/android/src/main/java/com/mosquitotransport/MosquitoTransportModule.kt +101 -0
- package/android/src/main/java/com/mosquitotransport/MosquitoTransportPackage.kt +31 -0
- package/android/src/main/java/com/mosquitotransport/utils/FileUploader.kt +106 -0
- package/android/src/main/java/com/mosquitotransport/utils/UploadCallback.kt +7 -0
- package/ios/MosquitoTransport-Bridging-Header.h +1 -0
- package/ios/MosquitoTransport.h +6 -0
- package/ios/MosquitoTransport.mm +81 -0
- package/ios/{Mosquitodb.swift → MosquitoTransport.swift} +39 -42
- package/package.json +10 -2
- package/src/NativeMosquitoTransport.js +24 -0
- package/src/helpers/fs_manager.js +1 -1
- package/src/helpers/utils.js +2 -4
- package/src/helpers/variables.js +2 -1
- package/src/index.d.ts +1 -1
- package/src/index.js +15 -10
- package/src/products/auth/accessor.js +118 -94
- package/src/products/auth/index.js +7 -6
- package/src/products/database/index.js +1 -0
- package/src/products/storage/index.js +9 -23
- package/.jshintignore +0 -4
- package/.jshintrc +0 -16
- package/TODO +0 -35
- package/android/gradle.properties +0 -5
- package/android/src/main/java/com/mosquitodb/MosquitodbModule.java +0 -82
- package/android/src/main/java/com/mosquitodb/MosquitodbPackage.java +0 -28
- package/android/src/main/java/com/mosquitodb/utils/FileUploader.java +0 -101
- package/android/src/main/java/com/mosquitodb/utils/UploadCallback.java +0 -7
- package/example/.bundle/config +0 -2
- package/example/.node-version +0 -1
- package/example/.watchmanconfig +0 -1
- package/example/Gemfile +0 -6
- package/example/android/app/build.gradle +0 -170
- package/example/android/app/debug.keystore +0 -0
- package/example/android/app/proguard-rules.pro +0 -10
- package/example/android/app/src/debug/AndroidManifest.xml +0 -13
- package/example/android/app/src/debug/java/com/mosquitodbexample/ReactNativeFlipper.java +0 -75
- package/example/android/app/src/main/AndroidManifest.xml +0 -25
- package/example/android/app/src/main/java/com/mosquitodbexample/MainActivity.java +0 -35
- package/example/android/app/src/main/java/com/mosquitodbexample/MainApplication.java +0 -62
- package/example/android/app/src/main/res/drawable/rn_edit_text_material.xml +0 -36
- package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/values/strings.xml +0 -3
- package/example/android/app/src/main/res/values/styles.xml +0 -9
- package/example/android/app/src/release/java/com/mosquitodbexample/ReactNativeFlipper.java +0 -20
- package/example/android/build.gradle +0 -21
- package/example/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/example/android/gradle/wrapper/gradle-wrapper.properties +0 -5
- package/example/android/gradle.properties +0 -44
- package/example/android/gradlew +0 -234
- package/example/android/gradlew.bat +0 -89
- package/example/android/settings.gradle +0 -4
- package/example/app.json +0 -4
- package/example/babel.config.js +0 -17
- package/example/index.js +0 -5
- package/example/ios/.xcode.env +0 -11
- package/example/ios/File.swift +0 -6
- package/example/ios/MosquitodbExample/AppDelegate.h +0 -6
- package/example/ios/MosquitodbExample/AppDelegate.mm +0 -36
- package/example/ios/MosquitodbExample/Images.xcassets/AppIcon.appiconset/Contents.json +0 -53
- package/example/ios/MosquitodbExample/Images.xcassets/Contents.json +0 -6
- package/example/ios/MosquitodbExample/Info.plist +0 -55
- package/example/ios/MosquitodbExample/LaunchScreen.storyboard +0 -47
- package/example/ios/MosquitodbExample/main.m +0 -10
- package/example/ios/MosquitodbExample-Bridging-Header.h +0 -3
- package/example/ios/MosquitodbExample.xcodeproj/project.pbxproj +0 -703
- package/example/ios/MosquitodbExample.xcodeproj/xcshareddata/xcschemes/MosquitodbExample.xcscheme +0 -88
- package/example/ios/MosquitodbExample.xcworkspace/contents.xcworkspacedata +0 -10
- package/example/ios/MosquitodbExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/example/ios/MosquitodbExample.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +0 -8
- package/example/ios/MosquitodbExample.xcworkspace/xcuserdata/anthony.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/example/ios/MosquitodbExample.xcworkspace/xcuserdata/anthony.xcuserdatad/WorkspaceSettings.xcsettings +0 -14
- package/example/ios/MosquitodbExampleTests/Info.plist +0 -24
- package/example/ios/MosquitodbExampleTests/MosquitodbExampleTests.m +0 -66
- package/example/ios/Podfile +0 -60
- package/example/metro.config.js +0 -40
- package/example/package.json +0 -22
- package/example/react-native.config.js +0 -10
- package/example/src/App.tsx +0 -31
- package/ios/Mosquitodb-Bridging-Header.h +0 -2
- package/ios/Mosquitodb.m +0 -22
- package/ios/Mosquitodb.xcodeproj/project.pbxproj +0 -283
- package/ios/Mosquitodb.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -4
- package/react-native-mosquitodb.podspec +0 -35
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* <p>This source code is licensed under the MIT license found in the LICENSE file in the root
|
|
5
|
-
* directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
package com.mosquitodbexample;
|
|
8
|
-
|
|
9
|
-
import android.content.Context;
|
|
10
|
-
import com.facebook.flipper.android.AndroidFlipperClient;
|
|
11
|
-
import com.facebook.flipper.android.utils.FlipperUtils;
|
|
12
|
-
import com.facebook.flipper.core.FlipperClient;
|
|
13
|
-
import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin;
|
|
14
|
-
import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin;
|
|
15
|
-
import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin;
|
|
16
|
-
import com.facebook.flipper.plugins.inspector.DescriptorMapping;
|
|
17
|
-
import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin;
|
|
18
|
-
import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor;
|
|
19
|
-
import com.facebook.flipper.plugins.network.NetworkFlipperPlugin;
|
|
20
|
-
import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin;
|
|
21
|
-
import com.facebook.react.ReactInstanceEventListener;
|
|
22
|
-
import com.facebook.react.ReactInstanceManager;
|
|
23
|
-
import com.facebook.react.bridge.ReactContext;
|
|
24
|
-
import com.facebook.react.modules.network.NetworkingModule;
|
|
25
|
-
import okhttp3.OkHttpClient;
|
|
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
|
-
*/
|
|
31
|
-
public class ReactNativeFlipper {
|
|
32
|
-
public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
|
|
33
|
-
if (FlipperUtils.shouldEnableFlipper(context)) {
|
|
34
|
-
final FlipperClient client = AndroidFlipperClient.getInstance(context);
|
|
35
|
-
|
|
36
|
-
client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults()));
|
|
37
|
-
client.addPlugin(new DatabasesFlipperPlugin(context));
|
|
38
|
-
client.addPlugin(new SharedPreferencesFlipperPlugin(context));
|
|
39
|
-
client.addPlugin(CrashReporterPlugin.getInstance());
|
|
40
|
-
|
|
41
|
-
NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin();
|
|
42
|
-
NetworkingModule.setCustomClientBuilder(
|
|
43
|
-
new NetworkingModule.CustomClientBuilder() {
|
|
44
|
-
@Override
|
|
45
|
-
public void apply(OkHttpClient.Builder builder) {
|
|
46
|
-
builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin));
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
client.addPlugin(networkFlipperPlugin);
|
|
50
|
-
client.start();
|
|
51
|
-
|
|
52
|
-
// Fresco Plugin needs to ensure that ImagePipelineFactory is initialized
|
|
53
|
-
// Hence we run if after all native modules have been initialized
|
|
54
|
-
ReactContext reactContext = reactInstanceManager.getCurrentReactContext();
|
|
55
|
-
if (reactContext == null) {
|
|
56
|
-
reactInstanceManager.addReactInstanceEventListener(
|
|
57
|
-
new ReactInstanceEventListener() {
|
|
58
|
-
@Override
|
|
59
|
-
public void onReactContextInitialized(ReactContext reactContext) {
|
|
60
|
-
reactInstanceManager.removeReactInstanceEventListener(this);
|
|
61
|
-
reactContext.runOnNativeModulesQueueThread(
|
|
62
|
-
new Runnable() {
|
|
63
|
-
@Override
|
|
64
|
-
public void run() {
|
|
65
|
-
client.addPlugin(new FrescoFlipperPlugin());
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
} else {
|
|
71
|
-
client.addPlugin(new FrescoFlipperPlugin());
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
|
2
|
-
|
|
3
|
-
<uses-permission android:name="android.permission.INTERNET" />
|
|
4
|
-
|
|
5
|
-
<application
|
|
6
|
-
android:name=".MainApplication"
|
|
7
|
-
android:label="@string/app_name"
|
|
8
|
-
android:icon="@mipmap/ic_launcher"
|
|
9
|
-
android:roundIcon="@mipmap/ic_launcher_round"
|
|
10
|
-
android:allowBackup="false"
|
|
11
|
-
android:theme="@style/AppTheme">
|
|
12
|
-
<activity
|
|
13
|
-
android:name=".MainActivity"
|
|
14
|
-
android:label="@string/app_name"
|
|
15
|
-
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
|
|
16
|
-
android:launchMode="singleTask"
|
|
17
|
-
android:windowSoftInputMode="adjustResize"
|
|
18
|
-
android:exported="true">
|
|
19
|
-
<intent-filter>
|
|
20
|
-
<action android:name="android.intent.action.MAIN" />
|
|
21
|
-
<category android:name="android.intent.category.LAUNCHER" />
|
|
22
|
-
</intent-filter>
|
|
23
|
-
</activity>
|
|
24
|
-
</application>
|
|
25
|
-
</manifest>
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
package com.mosquitodbexample;
|
|
2
|
-
|
|
3
|
-
import com.facebook.react.ReactActivity;
|
|
4
|
-
import com.facebook.react.ReactActivityDelegate;
|
|
5
|
-
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
|
|
6
|
-
import com.facebook.react.defaults.DefaultReactActivityDelegate;
|
|
7
|
-
|
|
8
|
-
public class MainActivity extends ReactActivity {
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Returns the name of the main component registered from JavaScript. This is used to schedule
|
|
12
|
-
* rendering of the component.
|
|
13
|
-
*/
|
|
14
|
-
@Override
|
|
15
|
-
protected String getMainComponentName() {
|
|
16
|
-
return "MosquitodbExample";
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Returns the instance of the {@link ReactActivityDelegate}. Here we use a util class {@link
|
|
21
|
-
* DefaultReactActivityDelegate} which allows you to easily enable Fabric and Concurrent React
|
|
22
|
-
* (aka React 18) with two boolean flags.
|
|
23
|
-
*/
|
|
24
|
-
@Override
|
|
25
|
-
protected ReactActivityDelegate createReactActivityDelegate() {
|
|
26
|
-
return new DefaultReactActivityDelegate(
|
|
27
|
-
this,
|
|
28
|
-
getMainComponentName(),
|
|
29
|
-
// If you opted-in for the New Architecture, we enable the Fabric Renderer.
|
|
30
|
-
DefaultNewArchitectureEntryPoint.getFabricEnabled(), // fabricEnabled
|
|
31
|
-
// If you opted-in for the New Architecture, we enable Concurrent React (i.e. React 18).
|
|
32
|
-
DefaultNewArchitectureEntryPoint.getConcurrentReactEnabled() // concurrentRootEnabled
|
|
33
|
-
);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
package com.mosquitodbexample;
|
|
2
|
-
|
|
3
|
-
import android.app.Application;
|
|
4
|
-
import com.facebook.react.PackageList;
|
|
5
|
-
import com.facebook.react.ReactApplication;
|
|
6
|
-
import com.facebook.react.ReactNativeHost;
|
|
7
|
-
import com.facebook.react.ReactPackage;
|
|
8
|
-
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
|
|
9
|
-
import com.facebook.react.defaults.DefaultReactNativeHost;
|
|
10
|
-
import com.facebook.soloader.SoLoader;
|
|
11
|
-
import java.util.List;
|
|
12
|
-
|
|
13
|
-
public class MainApplication extends Application implements ReactApplication {
|
|
14
|
-
|
|
15
|
-
private final ReactNativeHost mReactNativeHost =
|
|
16
|
-
new DefaultReactNativeHost(this) {
|
|
17
|
-
@Override
|
|
18
|
-
public boolean getUseDeveloperSupport() {
|
|
19
|
-
return BuildConfig.DEBUG;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
@Override
|
|
23
|
-
protected List<ReactPackage> getPackages() {
|
|
24
|
-
@SuppressWarnings("UnnecessaryLocalVariable")
|
|
25
|
-
List<ReactPackage> packages = new PackageList(this).getPackages();
|
|
26
|
-
// Packages that cannot be autolinked yet can be added manually here, for example:
|
|
27
|
-
// packages.add(new MyReactNativePackage());
|
|
28
|
-
return packages;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
@Override
|
|
32
|
-
protected String getJSMainModuleName() {
|
|
33
|
-
return "index";
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
@Override
|
|
37
|
-
protected boolean isNewArchEnabled() {
|
|
38
|
-
return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
@Override
|
|
42
|
-
protected Boolean isHermesEnabled() {
|
|
43
|
-
return BuildConfig.IS_HERMES_ENABLED;
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
@Override
|
|
48
|
-
public ReactNativeHost getReactNativeHost() {
|
|
49
|
-
return mReactNativeHost;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
@Override
|
|
53
|
-
public void onCreate() {
|
|
54
|
-
super.onCreate();
|
|
55
|
-
SoLoader.init(this, /* native exopackage */ false);
|
|
56
|
-
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
|
|
57
|
-
// If you opted-in for the New Architecture, we load the native entry point for this app.
|
|
58
|
-
DefaultNewArchitectureEntryPoint.load();
|
|
59
|
-
}
|
|
60
|
-
ReactNativeFlipper.initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
|
|
61
|
-
}
|
|
62
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
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
|
-
<selector>
|
|
23
|
-
<!--
|
|
24
|
-
This file is a copy of abc_edit_text_material (https://bit.ly/3k8fX7I).
|
|
25
|
-
The item below with state_pressed="false" and state_focused="false" causes a NullPointerException.
|
|
26
|
-
NullPointerException:tempt to invoke virtual method 'android.graphics.drawable.Drawable android.graphics.drawable.Drawable$ConstantState.newDrawable(android.content.res.Resources)'
|
|
27
|
-
|
|
28
|
-
<item android:state_pressed="false" android:state_focused="false" android:drawable="@drawable/abc_textfield_default_mtrl_alpha"/>
|
|
29
|
-
|
|
30
|
-
For more info, see https://bit.ly/3CdLStv (react-native/pull/29452) and https://bit.ly/3nxOMoR.
|
|
31
|
-
-->
|
|
32
|
-
<item android:state_enabled="false" android:drawable="@drawable/abc_textfield_default_mtrl_alpha"/>
|
|
33
|
-
<item android:drawable="@drawable/abc_textfield_activated_mtrl_alpha"/>
|
|
34
|
-
</selector>
|
|
35
|
-
|
|
36
|
-
</inset>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,9 +0,0 @@
|
|
|
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>
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* <p>This source code is licensed under the MIT license found in the LICENSE file in the root
|
|
5
|
-
* directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
package com.mosquitodbexample;
|
|
8
|
-
|
|
9
|
-
import android.content.Context;
|
|
10
|
-
import com.facebook.react.ReactInstanceManager;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Class responsible of loading Flipper inside your React Native application. This is the release
|
|
14
|
-
* flavor of it so it's empty as we don't want to load Flipper.
|
|
15
|
-
*/
|
|
16
|
-
public class ReactNativeFlipper {
|
|
17
|
-
public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
|
|
18
|
-
// Do nothing as we don't want to initialize Flipper on Release.
|
|
19
|
-
}
|
|
20
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
|
2
|
-
|
|
3
|
-
buildscript {
|
|
4
|
-
ext {
|
|
5
|
-
buildToolsVersion = "33.0.0"
|
|
6
|
-
minSdkVersion = 21
|
|
7
|
-
compileSdkVersion = 33
|
|
8
|
-
targetSdkVersion = 33
|
|
9
|
-
|
|
10
|
-
// We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP.
|
|
11
|
-
ndkVersion = "23.1.7779620"
|
|
12
|
-
}
|
|
13
|
-
repositories {
|
|
14
|
-
google()
|
|
15
|
-
mavenCentral()
|
|
16
|
-
}
|
|
17
|
-
dependencies {
|
|
18
|
-
classpath("com.android.tools.build:gradle:7.3.1")
|
|
19
|
-
classpath("com.facebook.react:react-native-gradle-plugin")
|
|
20
|
-
}
|
|
21
|
-
}
|
|
Binary file
|
|
@@ -1,44 +0,0 @@
|
|
|
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
|
-
# Version of flipper SDK to use with React Native
|
|
28
|
-
FLIPPER_VERSION=0.125.0
|
|
29
|
-
|
|
30
|
-
# Use this property to specify which architecture you want to build.
|
|
31
|
-
# You can also override it from the CLI using
|
|
32
|
-
# ./gradlew <task> -PreactNativeArchitectures=x86_64
|
|
33
|
-
reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
|
|
34
|
-
|
|
35
|
-
# Use this property to enable support to the new architecture.
|
|
36
|
-
# This will allow you to use TurboModules and the Fabric render in
|
|
37
|
-
# your application. You should enable this flag either if you want
|
|
38
|
-
# to write custom TurboModules/Fabric components OR use libraries that
|
|
39
|
-
# are providing them.
|
|
40
|
-
newArchEnabled=false
|
|
41
|
-
|
|
42
|
-
# Use this property to enable or disable the Hermes JS engine.
|
|
43
|
-
# If set to false, you will be using JSC instead.
|
|
44
|
-
hermesEnabled=true
|
package/example/android/gradlew
DELETED
|
@@ -1,234 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
|
|
3
|
-
#
|
|
4
|
-
# Copyright © 2015-2021 the original authors.
|
|
5
|
-
#
|
|
6
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
-
# you may not use this file except in compliance with the License.
|
|
8
|
-
# You may obtain a copy of the License at
|
|
9
|
-
#
|
|
10
|
-
# https://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
-
#
|
|
12
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
13
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
-
# See the License for the specific language governing permissions and
|
|
16
|
-
# limitations under the License.
|
|
17
|
-
#
|
|
18
|
-
|
|
19
|
-
##############################################################################
|
|
20
|
-
#
|
|
21
|
-
# Gradle start up script for POSIX generated by Gradle.
|
|
22
|
-
#
|
|
23
|
-
# Important for running:
|
|
24
|
-
#
|
|
25
|
-
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
|
26
|
-
# noncompliant, but you have some other compliant shell such as ksh or
|
|
27
|
-
# bash, then to run this script, type that shell name before the whole
|
|
28
|
-
# command line, like:
|
|
29
|
-
#
|
|
30
|
-
# ksh Gradle
|
|
31
|
-
#
|
|
32
|
-
# Busybox and similar reduced shells will NOT work, because this script
|
|
33
|
-
# requires all of these POSIX shell features:
|
|
34
|
-
# * functions;
|
|
35
|
-
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
|
36
|
-
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
|
37
|
-
# * compound commands having a testable exit status, especially «case»;
|
|
38
|
-
# * various built-in commands including «command», «set», and «ulimit».
|
|
39
|
-
#
|
|
40
|
-
# Important for patching:
|
|
41
|
-
#
|
|
42
|
-
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
|
43
|
-
# by Bash, Ksh, etc; in particular arrays are avoided.
|
|
44
|
-
#
|
|
45
|
-
# The "traditional" practice of packing multiple parameters into a
|
|
46
|
-
# space-separated string is a well documented source of bugs and security
|
|
47
|
-
# problems, so this is (mostly) avoided, by progressively accumulating
|
|
48
|
-
# options in "$@", and eventually passing that to Java.
|
|
49
|
-
#
|
|
50
|
-
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
|
51
|
-
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
|
52
|
-
# see the in-line comments for details.
|
|
53
|
-
#
|
|
54
|
-
# There are tweaks for specific operating systems such as AIX, CygWin,
|
|
55
|
-
# Darwin, MinGW, and NonStop.
|
|
56
|
-
#
|
|
57
|
-
# (3) This script is generated from the Groovy template
|
|
58
|
-
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
|
59
|
-
# within the Gradle project.
|
|
60
|
-
#
|
|
61
|
-
# You can find Gradle at https://github.com/gradle/gradle/.
|
|
62
|
-
#
|
|
63
|
-
##############################################################################
|
|
64
|
-
|
|
65
|
-
# Attempt to set APP_HOME
|
|
66
|
-
|
|
67
|
-
# Resolve links: $0 may be a link
|
|
68
|
-
app_path=$0
|
|
69
|
-
|
|
70
|
-
# Need this for daisy-chained symlinks.
|
|
71
|
-
while
|
|
72
|
-
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
|
73
|
-
[ -h "$app_path" ]
|
|
74
|
-
do
|
|
75
|
-
ls=$( ls -ld "$app_path" )
|
|
76
|
-
link=${ls#*' -> '}
|
|
77
|
-
case $link in #(
|
|
78
|
-
/*) app_path=$link ;; #(
|
|
79
|
-
*) app_path=$APP_HOME$link ;;
|
|
80
|
-
esac
|
|
81
|
-
done
|
|
82
|
-
|
|
83
|
-
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
|
84
|
-
|
|
85
|
-
APP_NAME="Gradle"
|
|
86
|
-
APP_BASE_NAME=${0##*/}
|
|
87
|
-
|
|
88
|
-
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
|
89
|
-
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
|
90
|
-
|
|
91
|
-
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
|
92
|
-
MAX_FD=maximum
|
|
93
|
-
|
|
94
|
-
warn () {
|
|
95
|
-
echo "$*"
|
|
96
|
-
} >&2
|
|
97
|
-
|
|
98
|
-
die () {
|
|
99
|
-
echo
|
|
100
|
-
echo "$*"
|
|
101
|
-
echo
|
|
102
|
-
exit 1
|
|
103
|
-
} >&2
|
|
104
|
-
|
|
105
|
-
# OS specific support (must be 'true' or 'false').
|
|
106
|
-
cygwin=false
|
|
107
|
-
msys=false
|
|
108
|
-
darwin=false
|
|
109
|
-
nonstop=false
|
|
110
|
-
case "$( uname )" in #(
|
|
111
|
-
CYGWIN* ) cygwin=true ;; #(
|
|
112
|
-
Darwin* ) darwin=true ;; #(
|
|
113
|
-
MSYS* | MINGW* ) msys=true ;; #(
|
|
114
|
-
NONSTOP* ) nonstop=true ;;
|
|
115
|
-
esac
|
|
116
|
-
|
|
117
|
-
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
# Determine the Java command to use to start the JVM.
|
|
121
|
-
if [ -n "$JAVA_HOME" ] ; then
|
|
122
|
-
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
|
123
|
-
# IBM's JDK on AIX uses strange locations for the executables
|
|
124
|
-
JAVACMD=$JAVA_HOME/jre/sh/java
|
|
125
|
-
else
|
|
126
|
-
JAVACMD=$JAVA_HOME/bin/java
|
|
127
|
-
fi
|
|
128
|
-
if [ ! -x "$JAVACMD" ] ; then
|
|
129
|
-
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
|
130
|
-
|
|
131
|
-
Please set the JAVA_HOME variable in your environment to match the
|
|
132
|
-
location of your Java installation."
|
|
133
|
-
fi
|
|
134
|
-
else
|
|
135
|
-
JAVACMD=java
|
|
136
|
-
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
|
137
|
-
|
|
138
|
-
Please set the JAVA_HOME variable in your environment to match the
|
|
139
|
-
location of your Java installation."
|
|
140
|
-
fi
|
|
141
|
-
|
|
142
|
-
# Increase the maximum file descriptors if we can.
|
|
143
|
-
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
|
144
|
-
case $MAX_FD in #(
|
|
145
|
-
max*)
|
|
146
|
-
MAX_FD=$( ulimit -H -n ) ||
|
|
147
|
-
warn "Could not query maximum file descriptor limit"
|
|
148
|
-
esac
|
|
149
|
-
case $MAX_FD in #(
|
|
150
|
-
'' | soft) :;; #(
|
|
151
|
-
*)
|
|
152
|
-
ulimit -n "$MAX_FD" ||
|
|
153
|
-
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
|
154
|
-
esac
|
|
155
|
-
fi
|
|
156
|
-
|
|
157
|
-
# Collect all arguments for the java command, stacking in reverse order:
|
|
158
|
-
# * args from the command line
|
|
159
|
-
# * the main class name
|
|
160
|
-
# * -classpath
|
|
161
|
-
# * -D...appname settings
|
|
162
|
-
# * --module-path (only if needed)
|
|
163
|
-
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
|
164
|
-
|
|
165
|
-
# For Cygwin or MSYS, switch paths to Windows format before running java
|
|
166
|
-
if "$cygwin" || "$msys" ; then
|
|
167
|
-
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
|
168
|
-
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
|
169
|
-
|
|
170
|
-
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
|
171
|
-
|
|
172
|
-
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
|
173
|
-
for arg do
|
|
174
|
-
if
|
|
175
|
-
case $arg in #(
|
|
176
|
-
-*) false ;; # don't mess with options #(
|
|
177
|
-
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
|
178
|
-
[ -e "$t" ] ;; #(
|
|
179
|
-
*) false ;;
|
|
180
|
-
esac
|
|
181
|
-
then
|
|
182
|
-
arg=$( cygpath --path --ignore --mixed "$arg" )
|
|
183
|
-
fi
|
|
184
|
-
# Roll the args list around exactly as many times as the number of
|
|
185
|
-
# args, so each arg winds up back in the position where it started, but
|
|
186
|
-
# possibly modified.
|
|
187
|
-
#
|
|
188
|
-
# NB: a `for` loop captures its iteration list before it begins, so
|
|
189
|
-
# changing the positional parameters here affects neither the number of
|
|
190
|
-
# iterations, nor the values presented in `arg`.
|
|
191
|
-
shift # remove old arg
|
|
192
|
-
set -- "$@" "$arg" # push replacement arg
|
|
193
|
-
done
|
|
194
|
-
fi
|
|
195
|
-
|
|
196
|
-
# Collect all arguments for the java command;
|
|
197
|
-
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
|
198
|
-
# shell script including quotes and variable substitutions, so put them in
|
|
199
|
-
# double quotes to make sure that they get re-expanded; and
|
|
200
|
-
# * put everything else in single quotes, so that it's not re-expanded.
|
|
201
|
-
|
|
202
|
-
set -- \
|
|
203
|
-
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
|
204
|
-
-classpath "$CLASSPATH" \
|
|
205
|
-
org.gradle.wrapper.GradleWrapperMain \
|
|
206
|
-
"$@"
|
|
207
|
-
|
|
208
|
-
# Use "xargs" to parse quoted args.
|
|
209
|
-
#
|
|
210
|
-
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
|
211
|
-
#
|
|
212
|
-
# In Bash we could simply go:
|
|
213
|
-
#
|
|
214
|
-
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
|
215
|
-
# set -- "${ARGS[@]}" "$@"
|
|
216
|
-
#
|
|
217
|
-
# but POSIX shell has neither arrays nor command substitution, so instead we
|
|
218
|
-
# post-process each arg (as a line of input to sed) to backslash-escape any
|
|
219
|
-
# character that might be a shell metacharacter, then use eval to reverse
|
|
220
|
-
# that process (while maintaining the separation between arguments), and wrap
|
|
221
|
-
# the whole thing up as a single "set" statement.
|
|
222
|
-
#
|
|
223
|
-
# This will of course break if any of these variables contains a newline or
|
|
224
|
-
# an unmatched quote.
|
|
225
|
-
#
|
|
226
|
-
|
|
227
|
-
eval "set -- $(
|
|
228
|
-
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
|
229
|
-
xargs -n1 |
|
|
230
|
-
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
|
231
|
-
tr '\n' ' '
|
|
232
|
-
)" '"$@"'
|
|
233
|
-
|
|
234
|
-
exec "$JAVACMD" "$@"
|