Skip to content

Commit 0eb52eb

Browse files
Merge pull request #158 from SimformSolutionsPvtLtd/feature/UNT-T32504-upgrade-rn-version-example
feat(UNT-T32504): upgrade rn version to 0.77 in example app
2 parents 33fc88e + 3905320 commit 0eb52eb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+2054
-1349
lines changed

example/.gitignore

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ DerivedData
2020
*.hmap
2121
*.ipa
2222
*.xcuserstate
23-
ios/.xcode.env.local
23+
**/.xcode.env.local
2424
ios/link-assets-manifest.json
2525

2626
# Android/IntelliJ
@@ -33,6 +33,8 @@ local.properties
3333
*.hprof
3434
.cxx/
3535
android/link-assets-manifest.json
36+
*.keystore
37+
!debug.keystore
3638

3739
# node.js
3840
#
@@ -63,5 +65,19 @@ buck-out/
6365
*.jsbundle
6466

6567
# Ruby / CocoaPods
66-
/ios/Pods/
68+
**/Pods/
6769
/vendor/bundle/
70+
71+
# Temporary files created by Metro to check the health of the file watcher
72+
.metro-health-check*
73+
74+
# testing
75+
/coverage
76+
77+
# Yarn
78+
.yarn/*
79+
!.yarn/patches
80+
!.yarn/plugins
81+
!.yarn/releases
82+
!.yarn/sdks
83+
!.yarn/versions

example/.node-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

example/.ruby-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

example/Gemfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,8 @@ source 'https://rubygems.org'
33
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
44
ruby ">= 2.6.10"
55

6-
gem 'cocoapods', '~> 1.13'
7-
gem 'activesupport', '>= 6.1.7.3', '< 7.1.0'
6+
# Exclude problematic versions of cocoapods and activesupport that causes build failures.
7+
gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
8+
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
9+
gem 'xcodeproj', '< 1.26.0'
10+
gem 'concurrent-ruby', '< 1.3.4'

example/android/app/build.gradle

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
apply plugin: "com.android.application"
2+
apply plugin: "org.jetbrains.kotlin.android"
23
apply plugin: "com.facebook.react"
34

45
/**
@@ -7,14 +8,14 @@ apply plugin: "com.facebook.react"
78
*/
89
react {
910
/* Folders */
10-
// The root of your project, i.e. where "package.json" lives. Default is '..'
11-
// root = file("../")
12-
// The folder where the react-native NPM package is. Default is ../node_modules/react-native
13-
// reactNativeDir = file("../node_modules/react-native")
14-
// The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen
15-
// codegenDir = file("../node_modules/@react-native/codegen")
16-
// The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
17-
// cliFile = file("../node_modules/react-native/cli.js")
11+
// The root of your project, i.e. where "package.json" lives. Default is '../..'
12+
// root = file("../../")
13+
// The folder where the react-native NPM package is. Default is ../../node_modules/react-native
14+
// reactNativeDir = file("../../node_modules/react-native")
15+
// The folder where the react-native Codegen package is. Default is ../../node_modules/@react-native/codegen
16+
// codegenDir = file("../../node_modules/@react-native/codegen")
17+
// The cli.js file which is the React Native CLI entrypoint. Default is ../../node_modules/react-native/cli.js
18+
// cliFile = file("../../node_modules/react-native/cli.js")
1819

1920
/* Variants */
2021
// The list of variants to that are debuggable. For those we're going to
@@ -48,6 +49,9 @@ react {
4849
//
4950
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
5051
// hermesFlags = ["-O", "-output-source-map"]
52+
53+
/* Autolinking */
54+
autolinkLibrariesWithApp()
5155
}
5256

5357
/**
@@ -70,8 +74,8 @@ def jscFlavor = 'org.webkit:android-jsc:+'
7074

7175
android {
7276
ndkVersion rootProject.ext.ndkVersion
73-
74-
compileSdkVersion rootProject.ext.compileSdkVersion
77+
buildToolsVersion rootProject.ext.buildToolsVersion
78+
compileSdk rootProject.ext.compileSdkVersion
7579

7680
namespace "com.audiowaveformexample"
7781
defaultConfig {
@@ -106,19 +110,10 @@ android {
106110
dependencies {
107111
// The version of react-native is set by the React Native Gradle Plugin
108112
implementation("com.facebook.react:react-android")
109-
implementation 'com.facebook.fresco:animated-gif:2.5.0'
110113

111-
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}")
112-
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
113-
exclude group:'com.squareup.okhttp3', module:'okhttp'
114-
}
115-
116-
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}")
117114
if (hermesEnabled.toBoolean()) {
118115
implementation("com.facebook.react:hermes-android")
119116
} else {
120117
implementation jscFlavor
121118
}
122119
}
123-
124-
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)

example/android/app/src/debug/AndroidManifest.xml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,8 @@
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:tools="http://schemas.android.com/tools">
44

5-
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
6-
75
<application
86
android:usesCleartextTraffic="true"
97
tools:targetApi="28"
10-
tools:ignore="GoogleAppIndexingWarning">
11-
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false" />
12-
</application>
8+
tools:ignore="GoogleAppIndexingWarning"/>
139
</manifest>

example/android/app/src/debug/java/com/audiowaveformexample/ReactNativeFlipper.java

Lines changed: 0 additions & 75 deletions
This file was deleted.
Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,14 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
22

3-
<uses-permission android:name="android.permission.INTERNET" />
4-
<uses-permission android:name="android.permission.RECORD_AUDIO" />
3+
<uses-permission android:name="android.permission.INTERNET" />
4+
<uses-permission android:name="android.permission.RECORD_AUDIO" />
55

6-
<application
7-
android:name=".MainApplication"
8-
android:label="@string/app_name"
9-
android:icon="@mipmap/ic_launcher"
10-
android:roundIcon="@mipmap/ic_launcher_round"
11-
android:allowBackup="false"
12-
android:theme="@style/AppTheme">
13-
<activity
14-
android:name=".MainActivity"
15-
android:label="@string/app_name"
16-
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
17-
android:launchMode="singleTask"
18-
android:windowSoftInputMode="adjustResize"
19-
android:exported="true">
20-
<intent-filter>
21-
<action android:name="android.intent.action.MAIN" />
22-
<category android:name="android.intent.category.LAUNCHER" />
23-
</intent-filter>
24-
</activity>
25-
</application>
26-
</manifest>
6+
<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">
7+
<activity android:name=".MainActivity" android:label="@string/app_name" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode" android:launchMode="singleTask" android:windowSoftInputMode="adjustResize" android:exported="true">
8+
<intent-filter>
9+
<action android:name="android.intent.action.MAIN" />
10+
<category android:name="android.intent.category.LAUNCHER" />
11+
</intent-filter>
12+
</activity>
13+
</application>
14+
</manifest>

example/android/app/src/main/java/com/audiowaveformexample/MainActivity.java

Lines changed: 0 additions & 32 deletions
This file was deleted.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package com.audiowaveformexample
2+
3+
import com.facebook.react.ReactActivity
4+
import com.facebook.react.ReactActivityDelegate
5+
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
6+
import com.facebook.react.defaults.DefaultReactActivityDelegate
7+
8+
class MainActivity : 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 fun getMainComponentName(): String = "AudioWaveformExample"
15+
16+
/**
17+
* Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate]
18+
* which allows you to enable New Architecture with a single boolean flags [fabricEnabled]
19+
*/
20+
override fun createReactActivityDelegate(): ReactActivityDelegate =
21+
DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled)
22+
}

0 commit comments

Comments
 (0)