From ada944deea04c33d6b4f1e914da252298fb54f4e Mon Sep 17 00:00:00 2001 From: kalashshah <202051096@iiitvadodara.ac.in> Date: Thu, 16 Nov 2023 16:48:54 +0530 Subject: [PATCH] chore: move example app to examples folder --- .../examples/sdk-react-native/.eslintrc.js | 4 + packages/examples/sdk-react-native/.gitignore | 66 ++ .../examples/sdk-react-native/.prettierrc.js | 7 + .../examples/sdk-react-native/.watchmanconfig | 1 + .../sdk-react-native}/Gemfile | 5 +- packages/examples/sdk-react-native/README.md | 79 +++ .../android/app/build.gradle | 55 +- .../android/app/debug.keystore | Bin .../android/app/proguard-rules.pro | 0 .../android/app/src/debug/AndroidManifest.xml | 0 .../com/rnsdktest}/ReactNativeFlipper.java | 2 +- .../android/app/src/main/AndroidManifest.xml | 0 .../java/com/rnsdktest}/MainActivity.java | 9 +- .../java/com/rnsdktest}/MainApplication.java | 2 +- .../res/drawable/rn_edit_text_material.xml | 2 +- .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin .../res/mipmap-hdpi/ic_launcher_round.png | Bin .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin .../res/mipmap-mdpi/ic_launcher_round.png | Bin .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin .../res/mipmap-xhdpi/ic_launcher_round.png | Bin .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin .../res/mipmap-xxhdpi/ic_launcher_round.png | Bin .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin .../res/mipmap-xxxhdpi/ic_launcher_round.png | Bin .../app/src/main/res/values/strings.xml | 3 + .../app/src/main/res/values/styles.xml | 0 .../com/rnsdktest}/ReactNativeFlipper.java | 2 +- .../sdk-react-native}/android/build.gradle | 2 +- .../android/gradle.properties | 2 +- .../android/gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 61574 bytes .../gradle/wrapper/gradle-wrapper.properties | 3 +- .../sdk-react-native}/android/gradlew | 18 +- .../sdk-react-native}/android/gradlew.bat | 181 ++--- .../sdk-react-native}/android/settings.gradle | 4 +- packages/examples/sdk-react-native/app.json | 4 + .../examples/sdk-react-native/babel.config.js | 3 + packages/examples/sdk-react-native/index.js | 5 + .../sdk-react-native}/ios/Podfile | 18 +- .../ios/rnsdktest.xcodeproj}/project.pbxproj | 166 +++-- .../xcschemes/rnsdktest.xcscheme} | 24 +- .../ios/rnsdktest}/AppDelegate.h | 0 .../ios/rnsdktest}/AppDelegate.mm | 12 +- .../AppIcon.appiconset/Contents.json | 0 .../rnsdktest}/Images.xcassets/Contents.json | 0 .../ios/rnsdktest}/Info.plist | 2 +- .../ios/rnsdktest}/LaunchScreen.storyboard | 2 +- .../sdk-react-native/ios/rnsdktest}/main.m | 0 .../ios/rnsdktestTests}/Info.plist | 0 .../ios/rnsdktestTests/rnsdktestTests.m} | 4 +- .../examples/sdk-react-native/jest.config.js | 3 + .../examples/sdk-react-native/metro.config.js | 11 + .../examples/sdk-react-native/package.json | 77 +++ .../patches/@kalashshah+restapi+0.1.2.patch | 52 ++ .../sdk-react-native}/shim.js | 0 .../sdk-react-native}/src/App.tsx | 2 +- .../examples/sdk-react-native/tsconfig.json | 3 + .../sdk-react-native}/types/env.d.ts | 0 packages/reactnative/example/.bundle/config | 2 - packages/reactnative/example/.env.sample | 10 - packages/reactnative/example/.node-version | 1 - packages/reactnative/example/.watchmanconfig | 1 - .../app/src/main/res/values/strings.xml | 3 - .../android/gradle/wrapper/gradle-wrapper.jar | Bin 59821 -> 0 bytes packages/reactnative/example/app.json | 4 - packages/reactnative/example/babel.config.js | 25 - packages/reactnative/example/index.js | 5 - packages/reactnative/example/ios/File.swift | 6 - packages/reactnative/example/ios/Podfile.lock | 641 ------------------ .../ReactNativeSdkExample-Bridging-Header.h | 3 - .../contents.xcworkspacedata | 10 - packages/reactnative/example/metro.config.js | 40 -- packages/reactnative/example/package.json | 33 - .../example/react-native.config.js | 10 - packages/reactnative/example/tsconfig.json | 3 - 75 files changed, 554 insertions(+), 1078 deletions(-) create mode 100644 packages/examples/sdk-react-native/.eslintrc.js create mode 100644 packages/examples/sdk-react-native/.gitignore create mode 100644 packages/examples/sdk-react-native/.prettierrc.js create mode 100644 packages/examples/sdk-react-native/.watchmanconfig rename packages/{reactnative/example => examples/sdk-react-native}/Gemfile (56%) create mode 100644 packages/examples/sdk-react-native/README.md rename packages/{reactnative/example => examples/sdk-react-native}/android/app/build.gradle (68%) rename packages/{reactnative/example => examples/sdk-react-native}/android/app/debug.keystore (100%) rename packages/{reactnative/example => examples/sdk-react-native}/android/app/proguard-rules.pro (100%) rename packages/{reactnative/example => examples/sdk-react-native}/android/app/src/debug/AndroidManifest.xml (100%) rename packages/{reactnative/example/android/app/src/debug/java/com/reactnativesdkexample => examples/sdk-react-native/android/app/src/debug/java/com/rnsdktest}/ReactNativeFlipper.java (98%) rename packages/{reactnative/example => examples/sdk-react-native}/android/app/src/main/AndroidManifest.xml (100%) rename packages/{reactnative/example/android/app/src/main/java/com/reactnativesdkexample => examples/sdk-react-native/android/app/src/main/java/com/rnsdktest}/MainActivity.java (73%) rename packages/{reactnative/example/android/app/src/main/java/com/reactnativesdkexample => examples/sdk-react-native/android/app/src/main/java/com/rnsdktest}/MainApplication.java (98%) rename packages/{reactnative/example => examples/sdk-react-native}/android/app/src/main/res/drawable/rn_edit_text_material.xml (99%) rename packages/{reactnative/example => examples/sdk-react-native}/android/app/src/main/res/mipmap-hdpi/ic_launcher.png (100%) rename packages/{reactnative/example => examples/sdk-react-native}/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png (100%) rename packages/{reactnative/example => examples/sdk-react-native}/android/app/src/main/res/mipmap-mdpi/ic_launcher.png (100%) rename packages/{reactnative/example => examples/sdk-react-native}/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png (100%) rename packages/{reactnative/example => examples/sdk-react-native}/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png (100%) rename packages/{reactnative/example => examples/sdk-react-native}/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png (100%) rename packages/{reactnative/example => examples/sdk-react-native}/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png (100%) rename packages/{reactnative/example => examples/sdk-react-native}/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png (100%) rename packages/{reactnative/example => examples/sdk-react-native}/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png (100%) rename packages/{reactnative/example => examples/sdk-react-native}/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png (100%) create mode 100644 packages/examples/sdk-react-native/android/app/src/main/res/values/strings.xml rename packages/{reactnative/example => examples/sdk-react-native}/android/app/src/main/res/values/styles.xml (100%) rename packages/{reactnative/example/android/app/src/release/java/com/reactnativesdkexample => examples/sdk-react-native/android/app/src/release/java/com/rnsdktest}/ReactNativeFlipper.java (94%) rename packages/{reactnative/example => examples/sdk-react-native}/android/build.gradle (90%) rename packages/{reactnative/example => examples/sdk-react-native}/android/gradle.properties (98%) create mode 100644 packages/examples/sdk-react-native/android/gradle/wrapper/gradle-wrapper.jar rename packages/{reactnative/example => examples/sdk-react-native}/android/gradle/wrapper/gradle-wrapper.properties (83%) rename packages/{reactnative/example => examples/sdk-react-native}/android/gradlew (93%) rename packages/{reactnative/example => examples/sdk-react-native}/android/gradlew.bat (86%) rename packages/{reactnative/example => examples/sdk-react-native}/android/settings.gradle (61%) create mode 100644 packages/examples/sdk-react-native/app.json create mode 100644 packages/examples/sdk-react-native/babel.config.js create mode 100644 packages/examples/sdk-react-native/index.js rename packages/{reactnative/example => examples/sdk-react-native}/ios/Podfile (76%) rename packages/{reactnative/example/ios/ReactNativeSdkExample.xcodeproj => examples/sdk-react-native/ios/rnsdktest.xcodeproj}/project.pbxproj (69%) rename packages/{reactnative/example/ios/ReactNativeSdkExample.xcodeproj/xcshareddata/xcschemes/ReactNativeSdkExample.xcscheme => examples/sdk-react-native/ios/rnsdktest.xcodeproj/xcshareddata/xcschemes/rnsdktest.xcscheme} (77%) rename packages/{reactnative/example/ios/ReactNativeSdkExample => examples/sdk-react-native/ios/rnsdktest}/AppDelegate.h (100%) rename packages/{reactnative/example/ios/ReactNativeSdkExample => examples/sdk-react-native/ios/rnsdktest}/AppDelegate.mm (62%) rename packages/{reactnative/example/ios/ReactNativeSdkExample => examples/sdk-react-native/ios/rnsdktest}/Images.xcassets/AppIcon.appiconset/Contents.json (100%) rename packages/{reactnative/example/ios/ReactNativeSdkExample => examples/sdk-react-native/ios/rnsdktest}/Images.xcassets/Contents.json (100%) rename packages/{reactnative/example/ios/ReactNativeSdkExample => examples/sdk-react-native/ios/rnsdktest}/Info.plist (97%) rename packages/{reactnative/example/ios/ReactNativeSdkExample => examples/sdk-react-native/ios/rnsdktest}/LaunchScreen.storyboard (94%) rename packages/{reactnative/example/ios/ReactNativeSdkExample => examples/sdk-react-native/ios/rnsdktest}/main.m (100%) rename packages/{reactnative/example/ios/ReactNativeSdkExampleTests => examples/sdk-react-native/ios/rnsdktestTests}/Info.plist (100%) rename packages/{reactnative/example/ios/ReactNativeSdkExampleTests/ReactNativeSdkExampleTests.m => examples/sdk-react-native/ios/rnsdktestTests/rnsdktestTests.m} (95%) create mode 100644 packages/examples/sdk-react-native/jest.config.js create mode 100644 packages/examples/sdk-react-native/metro.config.js create mode 100644 packages/examples/sdk-react-native/package.json create mode 100644 packages/examples/sdk-react-native/patches/@kalashshah+restapi+0.1.2.patch rename packages/{reactnative/example => examples/sdk-react-native}/shim.js (100%) rename packages/{reactnative/example => examples/sdk-react-native}/src/App.tsx (99%) create mode 100644 packages/examples/sdk-react-native/tsconfig.json rename packages/{reactnative/example => examples/sdk-react-native}/types/env.d.ts (100%) delete mode 100644 packages/reactnative/example/.bundle/config delete mode 100644 packages/reactnative/example/.env.sample delete mode 100644 packages/reactnative/example/.node-version delete mode 100644 packages/reactnative/example/.watchmanconfig delete mode 100644 packages/reactnative/example/android/app/src/main/res/values/strings.xml delete mode 100644 packages/reactnative/example/android/gradle/wrapper/gradle-wrapper.jar delete mode 100644 packages/reactnative/example/app.json delete mode 100644 packages/reactnative/example/babel.config.js delete mode 100644 packages/reactnative/example/index.js delete mode 100644 packages/reactnative/example/ios/File.swift delete mode 100644 packages/reactnative/example/ios/Podfile.lock delete mode 100644 packages/reactnative/example/ios/ReactNativeSdkExample-Bridging-Header.h delete mode 100644 packages/reactnative/example/ios/ReactNativeSdkExample.xcworkspace/contents.xcworkspacedata delete mode 100644 packages/reactnative/example/metro.config.js delete mode 100644 packages/reactnative/example/package.json delete mode 100644 packages/reactnative/example/react-native.config.js delete mode 100644 packages/reactnative/example/tsconfig.json diff --git a/packages/examples/sdk-react-native/.eslintrc.js b/packages/examples/sdk-react-native/.eslintrc.js new file mode 100644 index 000000000..187894b6a --- /dev/null +++ b/packages/examples/sdk-react-native/.eslintrc.js @@ -0,0 +1,4 @@ +module.exports = { + root: true, + extends: '@react-native', +}; diff --git a/packages/examples/sdk-react-native/.gitignore b/packages/examples/sdk-react-native/.gitignore new file mode 100644 index 000000000..0cab2ac6f --- /dev/null +++ b/packages/examples/sdk-react-native/.gitignore @@ -0,0 +1,66 @@ +# OSX +# +.DS_Store + +# Xcode +# +build/ +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata +*.xccheckout +*.moved-aside +DerivedData +*.hmap +*.ipa +*.xcuserstate +ios/.xcode.env.local + +# Android/IntelliJ +# +build/ +.idea +.gradle +local.properties +*.iml +*.hprof +.cxx/ +*.keystore +!debug.keystore + +# node.js +# +node_modules/ +npm-debug.log +yarn-error.log + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://docs.fastlane.tools/best-practices/source-control/ + +**/fastlane/report.xml +**/fastlane/Preview.html +**/fastlane/screenshots +**/fastlane/test_output + +# Bundle artifact +*.jsbundle + +# Ruby / CocoaPods +/ios/Pods/ +/vendor/bundle/ + +# Temporary files created by Metro to check the health of the file watcher +.metro-health-check* + +# testing +/coverage diff --git a/packages/examples/sdk-react-native/.prettierrc.js b/packages/examples/sdk-react-native/.prettierrc.js new file mode 100644 index 000000000..2b540746a --- /dev/null +++ b/packages/examples/sdk-react-native/.prettierrc.js @@ -0,0 +1,7 @@ +module.exports = { + arrowParens: 'avoid', + bracketSameLine: true, + bracketSpacing: false, + singleQuote: true, + trailingComma: 'all', +}; diff --git a/packages/examples/sdk-react-native/.watchmanconfig b/packages/examples/sdk-react-native/.watchmanconfig new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/packages/examples/sdk-react-native/.watchmanconfig @@ -0,0 +1 @@ +{} diff --git a/packages/reactnative/example/Gemfile b/packages/examples/sdk-react-native/Gemfile similarity index 56% rename from packages/reactnative/example/Gemfile rename to packages/examples/sdk-react-native/Gemfile index 1142b1b20..6a7d5c7a4 100644 --- a/packages/reactnative/example/Gemfile +++ b/packages/examples/sdk-react-native/Gemfile @@ -1,6 +1,7 @@ source 'https://rubygems.org' # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version -ruby '>= 2.6.10' +ruby ">= 2.6.10" -gem 'cocoapods', '>= 1.11.3' +gem 'cocoapods', '~> 1.13' +gem 'activesupport', '>= 6.1.7.3', '< 7.1.0' diff --git a/packages/examples/sdk-react-native/README.md b/packages/examples/sdk-react-native/README.md new file mode 100644 index 000000000..12470c30e --- /dev/null +++ b/packages/examples/sdk-react-native/README.md @@ -0,0 +1,79 @@ +This is a new [**React Native**](https://reactnative.dev) project, bootstrapped using [`@react-native-community/cli`](https://github.com/react-native-community/cli). + +# Getting Started + +>**Note**: Make sure you have completed the [React Native - Environment Setup](https://reactnative.dev/docs/environment-setup) instructions till "Creating a new application" step, before proceeding. + +## Step 1: Start the Metro Server + +First, you will need to start **Metro**, the JavaScript _bundler_ that ships _with_ React Native. + +To start Metro, run the following command from the _root_ of your React Native project: + +```bash +# using npm +npm start + +# OR using Yarn +yarn start +``` + +## Step 2: Start your Application + +Let Metro Bundler run in its _own_ terminal. Open a _new_ terminal from the _root_ of your React Native project. Run the following command to start your _Android_ or _iOS_ app: + +### For Android + +```bash +# using npm +npm run android + +# OR using Yarn +yarn android +``` + +### For iOS + +```bash +# using npm +npm run ios + +# OR using Yarn +yarn ios +``` + +If everything is set up _correctly_, you should see your new app running in your _Android Emulator_ or _iOS Simulator_ shortly provided you have set up your emulator/simulator correctly. + +This is one way to run your app — you can also run it directly from within Android Studio and Xcode respectively. + +## Step 3: Modifying your App + +Now that you have successfully run the app, let's modify it. + +1. Open `App.tsx` in your text editor of choice and edit some lines. +2. For **Android**: Press the R key twice or select **"Reload"** from the **Developer Menu** (Ctrl + M (on Window and Linux) or Cmd ⌘ + M (on macOS)) to see your changes! + + For **iOS**: Hit Cmd ⌘ + R in your iOS Simulator to reload the app and see your changes! + +## Congratulations! :tada: + +You've successfully run and modified your React Native App. :partying_face: + +### Now what? + +- If you want to add this new React Native code to an existing application, check out the [Integration guide](https://reactnative.dev/docs/integration-with-existing-apps). +- If you're curious to learn more about React Native, check out the [Introduction to React Native](https://reactnative.dev/docs/getting-started). + +# Troubleshooting + +If you can't get this to work, see the [Troubleshooting](https://reactnative.dev/docs/troubleshooting) page. + +# Learn More + +To learn more about React Native, take a look at the following resources: + +- [React Native Website](https://reactnative.dev) - learn more about React Native. +- [Getting Started](https://reactnative.dev/docs/environment-setup) - an **overview** of React Native and how setup your environment. +- [Learn the Basics](https://reactnative.dev/docs/getting-started) - a **guided tour** of the React Native **basics**. +- [Blog](https://reactnative.dev/blog) - read the latest official React Native **Blog** posts. +- [`@facebook/react-native`](https://github.com/facebook/react-native) - the Open Source; GitHub **repository** for React Native. diff --git a/packages/reactnative/example/android/app/build.gradle b/packages/examples/sdk-react-native/android/app/build.gradle similarity index 68% rename from packages/reactnative/example/android/app/build.gradle rename to packages/examples/sdk-react-native/android/app/build.gradle index 146e8e65c..3e450ec37 100644 --- a/packages/reactnative/example/android/app/build.gradle +++ b/packages/examples/sdk-react-native/android/app/build.gradle @@ -1,8 +1,6 @@ apply plugin: "com.android.application" apply plugin: "com.facebook.react" -import com.android.build.OutputFile - /** * This is the configuration block to customize your React Native Android app. * By default you don't need to apply any configuration, just uncomment the lines you need. @@ -13,8 +11,8 @@ react { // root = file("../") // The folder where the react-native NPM package is. Default is ../node_modules/react-native // reactNativeDir = file("../node_modules/react-native") - // The folder where the react-native Codegen package is. Default is ../node_modules/react-native-codegen - // codegenDir = file("../node_modules/react-native-codegen") + // The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen + // codegenDir = file("../node_modules/@react-native/codegen") // The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js // cliFile = file("../node_modules/react-native/cli.js") @@ -52,14 +50,6 @@ react { // hermesFlags = ["-O", "-output-source-map"] } -/** - * Set this to true to create four separate APKs instead of one, - * one for each native architecture. This is useful if you don't - * use App Bundles (https://developer.android.com/guide/app-bundle/) - * and want to have separate APKs to upload to the Play Store. - */ -def enableSeparateBuildPerCPUArchitecture = false - /** * Set this to true to Run Proguard on Release builds to minify the Java bytecode. */ @@ -78,38 +68,19 @@ def enableProguardInReleaseBuilds = false */ def jscFlavor = 'org.webkit:android-jsc:+' -/** - * Private function to get the list of Native Architectures you want to build. - * This reads the value from reactNativeArchitectures in your gradle.properties - * file and works together with the --active-arch-only flag of react-native run-android. - */ -def reactNativeArchitectures() { - def value = project.getProperties().get("reactNativeArchitectures") - return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"] -} - android { ndkVersion rootProject.ext.ndkVersion compileSdkVersion rootProject.ext.compileSdkVersion - namespace "com.reactnativesdkexample" + namespace "com.rnsdktest" defaultConfig { - applicationId "com.reactnativesdkexample" + applicationId "com.rnsdktest" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion versionCode 1 versionName "1.0" } - - splits { - abi { - reset() - enable enableSeparateBuildPerCPUArchitecture - universalApk false // If true, also generate a universal APK - include (*reactNativeArchitectures()) - } - } signingConfigs { debug { storeFile file('debug.keystore') @@ -130,30 +101,12 @@ android { proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" } } - - // applicationVariants are e.g. debug, release - applicationVariants.all { variant -> - variant.outputs.each { output -> - // For each separate APK per architecture, set a unique version code as described here: - // https://developer.android.com/studio/build/configure-apk-splits.html - // Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc. - def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4] - def abi = output.getFilter(OutputFile.ABI) - if (abi != null) { // null for the universal-debug, universal-release variants - output.versionCodeOverride = - defaultConfig.versionCode * 1000 + versionCodes.get(abi) - } - - } - } } dependencies { // The version of react-native is set by the React Native Gradle Plugin implementation("com.facebook.react:react-android") - implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.0.0") - debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") { exclude group:'com.squareup.okhttp3', module:'okhttp' diff --git a/packages/reactnative/example/android/app/debug.keystore b/packages/examples/sdk-react-native/android/app/debug.keystore similarity index 100% rename from packages/reactnative/example/android/app/debug.keystore rename to packages/examples/sdk-react-native/android/app/debug.keystore diff --git a/packages/reactnative/example/android/app/proguard-rules.pro b/packages/examples/sdk-react-native/android/app/proguard-rules.pro similarity index 100% rename from packages/reactnative/example/android/app/proguard-rules.pro rename to packages/examples/sdk-react-native/android/app/proguard-rules.pro diff --git a/packages/reactnative/example/android/app/src/debug/AndroidManifest.xml b/packages/examples/sdk-react-native/android/app/src/debug/AndroidManifest.xml similarity index 100% rename from packages/reactnative/example/android/app/src/debug/AndroidManifest.xml rename to packages/examples/sdk-react-native/android/app/src/debug/AndroidManifest.xml diff --git a/packages/reactnative/example/android/app/src/debug/java/com/reactnativesdkexample/ReactNativeFlipper.java b/packages/examples/sdk-react-native/android/app/src/debug/java/com/rnsdktest/ReactNativeFlipper.java similarity index 98% rename from packages/reactnative/example/android/app/src/debug/java/com/reactnativesdkexample/ReactNativeFlipper.java rename to packages/examples/sdk-react-native/android/app/src/debug/java/com/rnsdktest/ReactNativeFlipper.java index 28e270b48..b78fe0f7c 100644 --- a/packages/reactnative/example/android/app/src/debug/java/com/reactnativesdkexample/ReactNativeFlipper.java +++ b/packages/examples/sdk-react-native/android/app/src/debug/java/com/rnsdktest/ReactNativeFlipper.java @@ -4,7 +4,7 @@ *
This source code is licensed under the MIT license found in the LICENSE file in the root
* directory of this source tree.
*/
-package com.reactnativesdkexample;
+package com.rnsdktest;
import android.content.Context;
import com.facebook.flipper.android.AndroidFlipperClient;
diff --git a/packages/reactnative/example/android/app/src/main/AndroidManifest.xml b/packages/examples/sdk-react-native/android/app/src/main/AndroidManifest.xml
similarity index 100%
rename from packages/reactnative/example/android/app/src/main/AndroidManifest.xml
rename to packages/examples/sdk-react-native/android/app/src/main/AndroidManifest.xml
diff --git a/packages/reactnative/example/android/app/src/main/java/com/reactnativesdkexample/MainActivity.java b/packages/examples/sdk-react-native/android/app/src/main/java/com/rnsdktest/MainActivity.java
similarity index 73%
rename from packages/reactnative/example/android/app/src/main/java/com/reactnativesdkexample/MainActivity.java
rename to packages/examples/sdk-react-native/android/app/src/main/java/com/rnsdktest/MainActivity.java
index 93585fbcf..fe5e31f58 100644
--- a/packages/reactnative/example/android/app/src/main/java/com/reactnativesdkexample/MainActivity.java
+++ b/packages/examples/sdk-react-native/android/app/src/main/java/com/rnsdktest/MainActivity.java
@@ -1,4 +1,4 @@
-package com.reactnativesdkexample;
+package com.rnsdktest;
import com.facebook.react.ReactActivity;
import com.facebook.react.ReactActivityDelegate;
@@ -13,7 +13,7 @@ public class MainActivity extends ReactActivity {
*/
@Override
protected String getMainComponentName() {
- return "ReactNativeSdkExample";
+ return "rnsdktest";
}
/**
@@ -27,9 +27,6 @@ protected ReactActivityDelegate createReactActivityDelegate() {
this,
getMainComponentName(),
// If you opted-in for the New Architecture, we enable the Fabric Renderer.
- DefaultNewArchitectureEntryPoint.getFabricEnabled(), // fabricEnabled
- // If you opted-in for the New Architecture, we enable Concurrent React (i.e. React 18).
- DefaultNewArchitectureEntryPoint.getConcurrentReactEnabled() // concurrentRootEnabled
- );
+ DefaultNewArchitectureEntryPoint.getFabricEnabled());
}
}
diff --git a/packages/reactnative/example/android/app/src/main/java/com/reactnativesdkexample/MainApplication.java b/packages/examples/sdk-react-native/android/app/src/main/java/com/rnsdktest/MainApplication.java
similarity index 98%
rename from packages/reactnative/example/android/app/src/main/java/com/reactnativesdkexample/MainApplication.java
rename to packages/examples/sdk-react-native/android/app/src/main/java/com/rnsdktest/MainApplication.java
index 9f81d13c3..2dca23b4d 100644
--- a/packages/reactnative/example/android/app/src/main/java/com/reactnativesdkexample/MainApplication.java
+++ b/packages/examples/sdk-react-native/android/app/src/main/java/com/rnsdktest/MainApplication.java
@@ -1,4 +1,4 @@
-package com.reactnativesdkexample;
+package com.rnsdktest;
import android.app.Application;
import com.facebook.react.PackageList;
diff --git a/packages/reactnative/example/android/app/src/main/res/drawable/rn_edit_text_material.xml b/packages/examples/sdk-react-native/android/app/src/main/res/drawable/rn_edit_text_material.xml
similarity index 99%
rename from packages/reactnative/example/android/app/src/main/res/drawable/rn_edit_text_material.xml
rename to packages/examples/sdk-react-native/android/app/src/main/res/drawable/rn_edit_text_material.xml
index f35d99620..73b37e4d9 100644
--- a/packages/reactnative/example/android/app/src/main/res/drawable/rn_edit_text_material.xml
+++ b/packages/examples/sdk-react-native/android/app/src/main/res/drawable/rn_edit_text_material.xml
@@ -20,7 +20,7 @@
android:insetBottom="@dimen/abc_edit_text_inset_bottom_material">