@brightlayer-ui/react-native-template-authentication-typescript 3.0.1-alpha.0 → 4.0.0-alpha.0
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/CHANGELOG.md +22 -9
- package/README.md +10 -8
- package/package.json +2 -2
- package/template/.prettierrc.js +0 -2
- package/template/App.tsx +5 -5
- package/template/Gemfile +11 -2
- package/template/android/app/build.gradle +15 -13
- package/template/android/app/src/main/AndroidManifest.xml +2 -1
- package/template/android/app/src/main/java/com/example/MainApplication.kt +4 -11
- package/template/android/app/src/main/res/drawable/rn_edit_text_material.xml +2 -1
- package/template/android/build.gradle +6 -6
- package/template/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/template/android/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/template/android/gradle.properties +1 -3
- package/template/android/gradlew +13 -11
- package/template/android/gradlew.bat +19 -12
- package/template/android/settings.gradle +3 -1
- package/template/ios/Podfile +3 -27
- package/template/ios/Podfile.lock +2224 -662
- package/template/ios/example/AppDelegate.swift +48 -0
- package/template/ios/example/Info.plist +16 -26
- package/template/ios/example/PrivacyInfo.xcprivacy +37 -0
- package/template/ios/example.xcodeproj/project.pbxproj +26 -268
- package/template/ios/exampleTests/Info.plist +31 -18
- package/template/package.json +52 -46
- package/template/src/components/UserMenuComponent.tsx +1 -2
- package/template/translations/i18n.ts +5 -5
- package/template/yarn.lock +8512 -0
- package/template/_gitignore +0 -64
- package/template/ios/example/AppDelegate.h +0 -6
- package/template/ios/example/AppDelegate.mm +0 -31
- package/template/ios/example/main.m +0 -10
- package/template/ios/exampleTests/exampleTests.m +0 -66
package/CHANGELOG.md
CHANGED
|
@@ -1,23 +1,32 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v4.0.0 (Unreleased)
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
|
|
7
|
+
- Update to build with React Native 0.80.
|
|
8
|
+
- Upgraded the BLUI packages to use latest version.
|
|
9
|
+
- Package dependencies upgraded to use latest version.
|
|
10
|
+
- Changed cli to use latest template command of RN Community.
|
|
11
|
+
|
|
3
12
|
## v3.0.0 (June 5, 2024)
|
|
4
13
|
|
|
5
14
|
### Changed
|
|
6
15
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
16
|
+
- Update to build with React Native 0.73.
|
|
17
|
+
- Updated the templates to use React Native CLI
|
|
9
18
|
|
|
10
19
|
## v2.1.0 (November 1, 2022)
|
|
11
20
|
|
|
12
21
|
### Changed
|
|
13
22
|
|
|
14
|
-
-
|
|
23
|
+
- Update to build with React Native 0.70.
|
|
15
24
|
|
|
16
25
|
## v2.0.0 (December 16, 2021)
|
|
17
26
|
|
|
18
27
|
### Changed
|
|
19
28
|
|
|
20
|
-
-
|
|
29
|
+
- Changed package namespace from `@pxblue` to `@brightlayer-ui`.
|
|
21
30
|
|
|
22
31
|
## Package Migration Notice
|
|
23
32
|
|
|
@@ -46,31 +55,35 @@ Previous versions listed after this indicator refer to our deprecated `@pxblue`
|
|
|
46
55
|
## v1.3.0 (September 30, 2021)
|
|
47
56
|
|
|
48
57
|
### Changed
|
|
58
|
+
|
|
49
59
|
- Upgrade PX Blue packages
|
|
50
60
|
- Changed default drawer width to 300.
|
|
51
61
|
|
|
52
62
|
## v1.2.0 (July 26, 2021)
|
|
53
63
|
|
|
54
64
|
### Changed
|
|
65
|
+
|
|
55
66
|
- Updated version of react-native-modal dependency to 12.0.2
|
|
56
67
|
|
|
57
68
|
## v1.1.1 (June 30, 2021)
|
|
58
69
|
|
|
59
70
|
### Changed
|
|
60
|
-
|
|
71
|
+
|
|
72
|
+
- Dropped version of react-native-webview peerDependency to match requirements of @pxblue/react-native-auth-workflow.
|
|
61
73
|
|
|
62
74
|
## v1.1.0 (March 31, 2021)
|
|
63
75
|
|
|
64
76
|
### Changed
|
|
65
|
-
|
|
66
|
-
-
|
|
77
|
+
|
|
78
|
+
- Updated dependencies to use latest packages.
|
|
79
|
+
- Reorganized folder structure
|
|
67
80
|
|
|
68
81
|
### Fixed
|
|
69
|
-
- Jest configuration allows default tests to pass.
|
|
70
82
|
|
|
83
|
+
- Jest configuration allows default tests to pass.
|
|
71
84
|
|
|
72
85
|
## v1.0.0 (March 1, 2021)
|
|
73
86
|
|
|
74
87
|
### Added
|
|
75
88
|
|
|
76
|
-
-
|
|
89
|
+
- Initial authentication template for TypeScript projects
|
package/README.md
CHANGED
|
@@ -2,16 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|

|
|
4
4
|
|
|
5
|
-
|
|
6
5
|
This template installs and configures the Brightlayer UI [react-native-auth-workflow](https://www.npmjs.com/package/@brightlayer-ui/react-native-auth-workflow) package to automatically wrap your main application with functions and screens for Login, Registration, Change Password, etc. This uses the same configurations as the sample project for that package — you will need to replace the API integrations with implementations specific to your API. This template also includes the installation and initial setup of routing using [React Navigation](https://reactnavigation.org/). It includes several placeholder routes/screens and a [Drawer](https://brightlayer-ui-components.github.io/react-native/?path=/info/components-documentation--drawer) navigator from the Brightlayer UI [React Native Component Library](https://www.npmjs.com/package/@brightlayer-ui/react-native-components).
|
|
7
6
|
|
|
8
7
|
## Usage
|
|
8
|
+
|
|
9
9
|
To create a new project using the Authenication Template simply run :
|
|
10
|
+
|
|
10
11
|
```sh
|
|
11
|
-
npx react-native init MyApp --template @brightlayer-ui/react-native-template-authentication-typescript
|
|
12
|
+
npx @react-native-community/cli@latest init MyApp --template @brightlayer-ui/react-native-template-authentication-typescript
|
|
12
13
|
```
|
|
13
14
|
|
|
14
15
|
## Project Structure
|
|
16
|
+
|
|
15
17
|
Projects created using this template will start out with the following file structure:
|
|
16
18
|
|
|
17
19
|
```
|
|
@@ -19,23 +21,23 @@ Projects created using this template will start out with the following file stru
|
|
|
19
21
|
|── /android // android project folder
|
|
20
22
|
|── App.tsx // app entry point
|
|
21
23
|
|── src
|
|
22
|
-
| |── actions
|
|
24
|
+
| |── actions
|
|
23
25
|
| | |── AuthUIActions.tsx // handles the implementation of the authentication related actions (such as login and forgot password)
|
|
24
26
|
| | └── RegistrationUIActions.tsx // handles the implementation of the registration related actions (such as loading the EULA and registration by invitation)
|
|
25
27
|
| |── assets // fonts and images used by the application
|
|
26
|
-
| |── constants
|
|
28
|
+
| |── constants
|
|
27
29
|
| | |── index.ts // application constants
|
|
28
30
|
| | └── sampleEula.ts // sample Eula
|
|
29
31
|
| |── contexts
|
|
30
32
|
| | |── AppContextProvider.tsx // handles context for Auth
|
|
31
33
|
| | └── ThemeContext.ts // handles context for theme
|
|
32
34
|
| |── screens // sample application pages
|
|
33
|
-
| |── navigation
|
|
35
|
+
| |── navigation
|
|
34
36
|
| | |── index.tsx // sets up routing
|
|
35
37
|
| | └── navigation-drawer.tsx // sets up Drawer
|
|
36
|
-
| └── store
|
|
38
|
+
| └── store
|
|
37
39
|
| └── local-storage.ts // mock implementation for storing/retrieving user authentication session data
|
|
38
40
|
└──/translations
|
|
39
|
-
|── /dictionary // translation dictionary for i18next
|
|
41
|
+
|── /dictionary // translation dictionary for i18next
|
|
40
42
|
|── i18n.ts // configuration for i18next
|
|
41
|
-
```
|
|
43
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brightlayer-ui/react-native-template-authentication-typescript",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0-alpha.0",
|
|
4
4
|
"author": "brightlayer-ui <brightlayer-ui@eaton.com>",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react native",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"description": "A template with pre-configured login workflow and routing for React Native projects created with the React Native CLI.",
|
|
12
12
|
"repository": {
|
|
13
13
|
"type": "git",
|
|
14
|
-
"url": "https://github.com/etn-ccis/blui-react-native
|
|
14
|
+
"url": "https://github.com/etn-ccis/blui-react-native/tree/master/packages/cli-templates"
|
|
15
15
|
},
|
|
16
16
|
"scripts": {
|
|
17
17
|
"publish:package": "set npm_config_yes=true && npx -p @brightlayer-ui/publish blui-publish",
|
package/template/.prettierrc.js
CHANGED
package/template/App.tsx
CHANGED
|
@@ -18,7 +18,7 @@ import { AppContext, AppContextType } from './src/contexts/AppContextProvider';
|
|
|
18
18
|
import { LocalStorage } from './src/store/local-storage';
|
|
19
19
|
import { Spinner } from '@brightlayer-ui/react-native-auth-workflow';
|
|
20
20
|
import AsyncStorage from '@react-native-async-storage/async-storage';
|
|
21
|
-
import { NativeModules, Platform } from 'react-native';
|
|
21
|
+
// import { NativeModules, Platform } from 'react-native';
|
|
22
22
|
|
|
23
23
|
export const App = (): JSX.Element => {
|
|
24
24
|
const [theme, setTheme] = useState<ThemeType>('light');
|
|
@@ -37,10 +37,10 @@ export const App = (): JSX.Element => {
|
|
|
37
37
|
setLanguage(storedLanguage);
|
|
38
38
|
void i18n.changeLanguage(storedLanguage);
|
|
39
39
|
} else {
|
|
40
|
-
const locale =
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
const locale = 'en';
|
|
41
|
+
// Platform.OS === 'ios'
|
|
42
|
+
// ? NativeModules.SettingsManager.settings.AppleLocale
|
|
43
|
+
// : NativeModules.I18nManager.localeIdentifier;
|
|
44
44
|
setLanguage(locale?.substring(0, 2) || 'en');
|
|
45
45
|
}
|
|
46
46
|
} catch (error) {
|
package/template/Gemfile
CHANGED
|
@@ -3,5 +3,14 @@ source 'https://rubygems.org'
|
|
|
3
3
|
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
|
|
4
4
|
ruby ">= 2.6.10"
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
gem '
|
|
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'
|
|
11
|
+
|
|
12
|
+
# Ruby 3.4.0 has removed some libraries from the standard library.
|
|
13
|
+
gem 'bigdecimal'
|
|
14
|
+
gem 'logger'
|
|
15
|
+
gem 'benchmark'
|
|
16
|
+
gem 'mutex_m'
|
|
@@ -8,14 +8,14 @@ apply plugin: "com.facebook.react"
|
|
|
8
8
|
*/
|
|
9
9
|
react {
|
|
10
10
|
/* Folders */
|
|
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
|
|
14
|
-
// reactNativeDir = file("
|
|
15
|
-
// The folder where the react-native Codegen package is. Default is
|
|
16
|
-
// codegenDir = file("
|
|
17
|
-
// The cli.js file which is the React Native CLI entrypoint. Default is
|
|
18
|
-
// cliFile = file("
|
|
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")
|
|
19
19
|
|
|
20
20
|
/* Variants */
|
|
21
21
|
// The list of variants to that are debuggable. For those we're going to
|
|
@@ -49,6 +49,9 @@ react {
|
|
|
49
49
|
//
|
|
50
50
|
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
|
|
51
51
|
// hermesFlags = ["-O", "-output-source-map"]
|
|
52
|
+
|
|
53
|
+
/* Autolinking */
|
|
54
|
+
autolinkLibrariesWithApp()
|
|
52
55
|
}
|
|
53
56
|
|
|
54
57
|
/**
|
|
@@ -60,14 +63,14 @@ def enableProguardInReleaseBuilds = false
|
|
|
60
63
|
* The preferred build flavor of JavaScriptCore (JSC)
|
|
61
64
|
*
|
|
62
65
|
* For example, to use the international variant, you can use:
|
|
63
|
-
* `def jscFlavor =
|
|
66
|
+
* `def jscFlavor = io.github.react-native-community:jsc-android-intl:2026004.+`
|
|
64
67
|
*
|
|
65
68
|
* The international variant includes ICU i18n library and necessary data
|
|
66
69
|
* allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
|
|
67
70
|
* give correct results when using with locales other than en-US. Note that
|
|
68
71
|
* this variant is about 6MiB larger per architecture than default.
|
|
69
72
|
*/
|
|
70
|
-
def jscFlavor = '
|
|
73
|
+
def jscFlavor = 'io.github.react-native-community:jsc-android:2026004.+'
|
|
71
74
|
|
|
72
75
|
android {
|
|
73
76
|
ndkVersion rootProject.ext.ndkVersion
|
|
@@ -81,6 +84,7 @@ android {
|
|
|
81
84
|
targetSdkVersion rootProject.ext.targetSdkVersion
|
|
82
85
|
versionCode 1
|
|
83
86
|
versionName "1.0"
|
|
87
|
+
manifestPlaceholders = [appAuthRedirectScheme: 'com.example']
|
|
84
88
|
}
|
|
85
89
|
signingConfigs {
|
|
86
90
|
debug {
|
|
@@ -107,7 +111,6 @@ android {
|
|
|
107
111
|
dependencies {
|
|
108
112
|
// The version of react-native is set by the React Native Gradle Plugin
|
|
109
113
|
implementation("com.facebook.react:react-android")
|
|
110
|
-
implementation("com.facebook.react:flipper-integration")
|
|
111
114
|
|
|
112
115
|
if (hermesEnabled.toBoolean()) {
|
|
113
116
|
implementation("com.facebook.react:hermes-android")
|
|
@@ -116,6 +119,5 @@ dependencies {
|
|
|
116
119
|
}
|
|
117
120
|
}
|
|
118
121
|
|
|
119
|
-
apply from:
|
|
120
|
-
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
|
|
122
|
+
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
|
|
121
123
|
apply from: "../../node_modules/@brightlayer-ui/react-native-vector-icons/fonts.gradle"
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
android:icon="@mipmap/ic_launcher"
|
|
9
9
|
android:roundIcon="@mipmap/ic_launcher_round"
|
|
10
10
|
android:allowBackup="false"
|
|
11
|
-
android:theme="@style/AppTheme"
|
|
11
|
+
android:theme="@style/AppTheme"
|
|
12
|
+
android:supportsRtl="true">
|
|
12
13
|
<activity
|
|
13
14
|
android:name=".MainActivity"
|
|
14
15
|
android:label="@string/app_name"
|
|
@@ -4,13 +4,11 @@ import android.app.Application
|
|
|
4
4
|
import com.facebook.react.PackageList
|
|
5
5
|
import com.facebook.react.ReactApplication
|
|
6
6
|
import com.facebook.react.ReactHost
|
|
7
|
+
import com.facebook.react.ReactNativeApplicationEntryPoint.loadReactNative
|
|
7
8
|
import com.facebook.react.ReactNativeHost
|
|
8
9
|
import com.facebook.react.ReactPackage
|
|
9
|
-
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
|
|
10
10
|
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
|
|
11
11
|
import com.facebook.react.defaults.DefaultReactNativeHost
|
|
12
|
-
import com.facebook.react.flipper.ReactNativeFlipper
|
|
13
|
-
import com.facebook.soloader.SoLoader
|
|
14
12
|
|
|
15
13
|
class MainApplication : Application(), ReactApplication {
|
|
16
14
|
|
|
@@ -31,15 +29,10 @@ class MainApplication : Application(), ReactApplication {
|
|
|
31
29
|
}
|
|
32
30
|
|
|
33
31
|
override val reactHost: ReactHost
|
|
34
|
-
get() = getDefaultReactHost(
|
|
35
|
-
|
|
32
|
+
get() = getDefaultReactHost(applicationContext, reactNativeHost)
|
|
33
|
+
|
|
36
34
|
override fun onCreate() {
|
|
37
35
|
super.onCreate()
|
|
38
|
-
|
|
39
|
-
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
|
|
40
|
-
// If you opted-in for the New Architecture, we load the native entry point for this app.
|
|
41
|
-
load()
|
|
42
|
-
}
|
|
43
|
-
ReactNativeFlipper.initializeFlipper(this, reactNativeHost.reactInstanceManager)
|
|
36
|
+
loadReactNative(this)
|
|
44
37
|
}
|
|
45
38
|
}
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
android:insetLeft="@dimen/abc_edit_text_inset_horizontal_material"
|
|
18
18
|
android:insetRight="@dimen/abc_edit_text_inset_horizontal_material"
|
|
19
19
|
android:insetTop="@dimen/abc_edit_text_inset_top_material"
|
|
20
|
-
android:insetBottom="@dimen/abc_edit_text_inset_bottom_material"
|
|
20
|
+
android:insetBottom="@dimen/abc_edit_text_inset_bottom_material"
|
|
21
|
+
>
|
|
21
22
|
|
|
22
23
|
<selector>
|
|
23
24
|
<!--
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
buildscript {
|
|
2
2
|
ext {
|
|
3
|
-
buildToolsVersion = "
|
|
4
|
-
minSdkVersion =
|
|
5
|
-
compileSdkVersion =
|
|
6
|
-
targetSdkVersion =
|
|
7
|
-
ndkVersion = "
|
|
8
|
-
kotlinVersion = "1.
|
|
3
|
+
buildToolsVersion = "35.0.0"
|
|
4
|
+
minSdkVersion = 24
|
|
5
|
+
compileSdkVersion = 35
|
|
6
|
+
targetSdkVersion = 35
|
|
7
|
+
ndkVersion = "27.1.12297006"
|
|
8
|
+
kotlinVersion = "2.1.20"
|
|
9
9
|
}
|
|
10
10
|
repositories {
|
|
11
11
|
google()
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
distributionBase=GRADLE_USER_HOME
|
|
2
2
|
distributionPath=wrapper/dists
|
|
3
|
-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.
|
|
3
|
+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-bin.zip
|
|
4
4
|
networkTimeout=10000
|
|
5
5
|
validateDistributionUrl=true
|
|
6
6
|
zipStoreBase=GRADLE_USER_HOME
|
|
@@ -21,8 +21,6 @@ org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m
|
|
|
21
21
|
# Android operating system, and which are packaged with your app's APK
|
|
22
22
|
# https://developer.android.com/topic/libraries/support-library/androidx-rn
|
|
23
23
|
android.useAndroidX=true
|
|
24
|
-
# Automatically convert third-party libraries to use AndroidX
|
|
25
|
-
android.enableJetifier=true
|
|
26
24
|
|
|
27
25
|
# Use this property to specify which architecture you want to build.
|
|
28
26
|
# You can also override it from the CLI using
|
|
@@ -34,7 +32,7 @@ reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
|
|
|
34
32
|
# your application. You should enable this flag either if you want
|
|
35
33
|
# to write custom TurboModules/Fabric components OR use libraries that
|
|
36
34
|
# are providing them.
|
|
37
|
-
newArchEnabled=
|
|
35
|
+
newArchEnabled=true
|
|
38
36
|
|
|
39
37
|
# Use this property to enable or disable the Hermes JS engine.
|
|
40
38
|
# If set to false, you will be using JSC instead.
|
package/template/android/gradlew
CHANGED
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
# See the License for the specific language governing permissions and
|
|
16
16
|
# limitations under the License.
|
|
17
17
|
#
|
|
18
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
19
|
+
#
|
|
18
20
|
|
|
19
21
|
##############################################################################
|
|
20
22
|
#
|
|
@@ -55,7 +57,7 @@
|
|
|
55
57
|
# Darwin, MinGW, and NonStop.
|
|
56
58
|
#
|
|
57
59
|
# (3) This script is generated from the Groovy template
|
|
58
|
-
# https://github.com/gradle/gradle/blob/HEAD/
|
|
60
|
+
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
|
59
61
|
# within the Gradle project.
|
|
60
62
|
#
|
|
61
63
|
# You can find Gradle at https://github.com/gradle/gradle/.
|
|
@@ -84,7 +86,7 @@ done
|
|
|
84
86
|
# shellcheck disable=SC2034
|
|
85
87
|
APP_BASE_NAME=${0##*/}
|
|
86
88
|
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
|
87
|
-
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null &&
|
|
89
|
+
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
|
|
88
90
|
|
|
89
91
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
|
90
92
|
MAX_FD=maximum
|
|
@@ -112,7 +114,7 @@ case "$( uname )" in #(
|
|
|
112
114
|
NONSTOP* ) nonstop=true ;;
|
|
113
115
|
esac
|
|
114
116
|
|
|
115
|
-
CLASSPATH
|
|
117
|
+
CLASSPATH="\\\"\\\""
|
|
116
118
|
|
|
117
119
|
|
|
118
120
|
# Determine the Java command to use to start the JVM.
|
|
@@ -145,7 +147,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
|
|
145
147
|
case $MAX_FD in #(
|
|
146
148
|
max*)
|
|
147
149
|
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
|
148
|
-
# shellcheck disable=SC3045
|
|
150
|
+
# shellcheck disable=SC2039,SC3045
|
|
149
151
|
MAX_FD=$( ulimit -H -n ) ||
|
|
150
152
|
warn "Could not query maximum file descriptor limit"
|
|
151
153
|
esac
|
|
@@ -153,7 +155,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
|
|
153
155
|
'' | soft) :;; #(
|
|
154
156
|
*)
|
|
155
157
|
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
|
156
|
-
# shellcheck disable=SC3045
|
|
158
|
+
# shellcheck disable=SC2039,SC3045
|
|
157
159
|
ulimit -n "$MAX_FD" ||
|
|
158
160
|
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
|
159
161
|
esac
|
|
@@ -202,16 +204,16 @@ fi
|
|
|
202
204
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
|
203
205
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
|
204
206
|
|
|
205
|
-
# Collect all arguments for the java command
|
|
206
|
-
# *
|
|
207
|
-
#
|
|
208
|
-
#
|
|
209
|
-
#
|
|
207
|
+
# Collect all arguments for the java command:
|
|
208
|
+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
|
209
|
+
# and any embedded shellness will be escaped.
|
|
210
|
+
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
|
211
|
+
# treated as '${Hostname}' itself on the command line.
|
|
210
212
|
|
|
211
213
|
set -- \
|
|
212
214
|
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
|
213
215
|
-classpath "$CLASSPATH" \
|
|
214
|
-
|
|
216
|
+
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
|
215
217
|
"$@"
|
|
216
218
|
|
|
217
219
|
# Stop when "xargs" is not available.
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
@REM Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
@REM
|
|
3
|
+
@REM This source code is licensed under the MIT license found in the
|
|
4
|
+
@REM LICENSE file in the root directory of this source tree.
|
|
5
|
+
|
|
1
6
|
@rem
|
|
2
7
|
@rem Copyright 2015 the original author or authors.
|
|
3
8
|
@rem
|
|
@@ -13,6 +18,8 @@
|
|
|
13
18
|
@rem See the License for the specific language governing permissions and
|
|
14
19
|
@rem limitations under the License.
|
|
15
20
|
@rem
|
|
21
|
+
@rem SPDX-License-Identifier: Apache-2.0
|
|
22
|
+
@rem
|
|
16
23
|
|
|
17
24
|
@if "%DEBUG%"=="" @echo off
|
|
18
25
|
@rem ##########################################################################
|
|
@@ -43,11 +50,11 @@ set JAVA_EXE=java.exe
|
|
|
43
50
|
%JAVA_EXE% -version >NUL 2>&1
|
|
44
51
|
if %ERRORLEVEL% equ 0 goto execute
|
|
45
52
|
|
|
46
|
-
echo.
|
|
47
|
-
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
|
48
|
-
echo.
|
|
49
|
-
echo Please set the JAVA_HOME variable in your environment to match the
|
|
50
|
-
echo location of your Java installation.
|
|
53
|
+
echo. 1>&2
|
|
54
|
+
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
|
55
|
+
echo. 1>&2
|
|
56
|
+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
|
57
|
+
echo location of your Java installation. 1>&2
|
|
51
58
|
|
|
52
59
|
goto fail
|
|
53
60
|
|
|
@@ -57,22 +64,22 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
|
|
57
64
|
|
|
58
65
|
if exist "%JAVA_EXE%" goto execute
|
|
59
66
|
|
|
60
|
-
echo.
|
|
61
|
-
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
|
62
|
-
echo.
|
|
63
|
-
echo Please set the JAVA_HOME variable in your environment to match the
|
|
64
|
-
echo location of your Java installation.
|
|
67
|
+
echo. 1>&2
|
|
68
|
+
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
|
69
|
+
echo. 1>&2
|
|
70
|
+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
|
71
|
+
echo location of your Java installation. 1>&2
|
|
65
72
|
|
|
66
73
|
goto fail
|
|
67
74
|
|
|
68
75
|
:execute
|
|
69
76
|
@rem Setup the command line
|
|
70
77
|
|
|
71
|
-
set CLASSPATH
|
|
78
|
+
set CLASSPATH=
|
|
72
79
|
|
|
73
80
|
|
|
74
81
|
@rem Execute Gradle
|
|
75
|
-
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%"
|
|
82
|
+
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
|
76
83
|
|
|
77
84
|
:end
|
|
78
85
|
@rem End local scope for the variables with windows NT shell
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
pluginManagement { includeBuild("../node_modules/@react-native/gradle-plugin") }
|
|
2
|
+
plugins { id("com.facebook.react.settings") }
|
|
3
|
+
extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() }
|
|
1
4
|
rootProject.name = 'example'
|
|
2
|
-
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
|
|
3
5
|
include ':app'
|
|
4
6
|
includeBuild('../node_modules/@react-native/gradle-plugin')
|
package/template/ios/Podfile
CHANGED
|
@@ -8,17 +8,6 @@ require Pod::Executable.execute_command('node', ['-p',
|
|
|
8
8
|
platform :ios, min_ios_version_supported
|
|
9
9
|
prepare_react_native_project!
|
|
10
10
|
|
|
11
|
-
# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
|
|
12
|
-
# because `react-native-flipper` depends on (FlipperKit,...) that will be excluded
|
|
13
|
-
#
|
|
14
|
-
# To fix this you can also exclude `react-native-flipper` using a `react-native.config.js`
|
|
15
|
-
# ```js
|
|
16
|
-
# module.exports = {
|
|
17
|
-
# dependencies: {
|
|
18
|
-
# ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
|
|
19
|
-
# ```
|
|
20
|
-
flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled
|
|
21
|
-
|
|
22
11
|
linkage = ENV['USE_FRAMEWORKS']
|
|
23
12
|
if linkage != nil
|
|
24
13
|
Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
|
|
@@ -30,30 +19,17 @@ target 'example' do
|
|
|
30
19
|
|
|
31
20
|
use_react_native!(
|
|
32
21
|
:path => config[:reactNativePath],
|
|
33
|
-
# Enables Flipper.
|
|
34
|
-
#
|
|
35
|
-
# Note that if you have use_frameworks! enabled, Flipper will not work and
|
|
36
|
-
# you should disable the next line.
|
|
37
|
-
:flipper_configuration => flipper_config,
|
|
38
22
|
# An absolute path to your application root.
|
|
39
23
|
:app_path => "#{Pod::Config.instance.installation_root}/.."
|
|
40
24
|
)
|
|
41
25
|
|
|
42
|
-
target 'exampleTests' do
|
|
43
|
-
inherit! :complete
|
|
44
|
-
# Pods for testing
|
|
45
|
-
end
|
|
46
|
-
|
|
47
26
|
post_install do |installer|
|
|
48
27
|
# https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
|
|
49
28
|
react_native_post_install(
|
|
50
29
|
installer,
|
|
51
30
|
config[:reactNativePath],
|
|
52
|
-
:mac_catalyst_enabled => false
|
|
31
|
+
:mac_catalyst_enabled => false,
|
|
32
|
+
# :ccache_enabled => true
|
|
53
33
|
)
|
|
54
34
|
end
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
|
|
58
|
-
pod 'RNBLUIVectorIcons', :path => '../node_modules/@brightlayer-ui/react-native-vector-icons'
|
|
59
|
-
end
|
|
35
|
+
end
|