@nrwl/react-native 14.8.8 → 14.9.0-beta.1
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 +1 -1
- package/LICENSE +22 -22
- package/README.md +6 -27
- package/migrations.json +268 -0
- package/package.json +13 -13
- package/plugins/metro-resolver.js +16 -5
- package/plugins/metro-resolver.js.map +1 -1
- package/project.json +5 -35
- package/src/executors/build-android/build-android.impl.js +3 -4
- package/src/executors/build-android/build-android.impl.js.map +1 -1
- package/src/executors/build-android/build-android.impl.ts +4 -4
- package/src/executors/build-android/schema.json +4 -1
- package/src/executors/bundle/bundle.impl.js +2 -2
- package/src/executors/bundle/bundle.impl.js.map +1 -1
- package/src/executors/bundle/bundle.impl.ts +4 -3
- package/src/executors/bundle/schema.d.ts +1 -1
- package/src/executors/bundle/schema.json +5 -1
- package/src/executors/ensure-symlink/ensure-symlink.impl.js +1 -1
- package/src/executors/ensure-symlink/ensure-symlink.impl.js.map +1 -1
- package/src/executors/ensure-symlink/ensure-symlink.impl.ts +2 -1
- package/src/executors/ensure-symlink/schema.json +2 -0
- package/src/executors/run-android/run-android.impl.js +8 -4
- package/src/executors/run-android/run-android.impl.js.map +1 -1
- package/src/executors/run-android/run-android.impl.ts +8 -3
- package/src/executors/run-android/schema.d.ts +1 -0
- package/src/executors/run-android/schema.json +11 -2
- package/src/executors/run-ios/run-ios.impl.js +1 -1
- package/src/executors/run-ios/run-ios.impl.js.map +1 -1
- package/src/executors/run-ios/run-ios.impl.ts +2 -1
- package/src/executors/run-ios/schema.json +21 -7
- package/src/executors/start/schema.json +4 -1
- package/src/executors/start/start.impl.js +2 -2
- package/src/executors/start/start.impl.js.map +1 -1
- package/src/executors/start/start.impl.ts +3 -2
- package/src/executors/storybook/schema.json +2 -0
- package/src/executors/storybook/storybook.impl.js +1 -1
- package/src/executors/storybook/storybook.impl.js.map +1 -1
- package/src/executors/storybook/storybook.impl.ts +2 -1
- package/src/executors/sync-deps/schema.json +2 -0
- package/src/executors/sync-deps/sync-deps.impl.js +1 -1
- package/src/executors/sync-deps/sync-deps.impl.js.map +1 -1
- package/src/executors/sync-deps/sync-deps.impl.ts +2 -1
- package/src/generators/application/application.d.ts +1 -1
- package/src/generators/application/application.js +6 -8
- package/src/generators/application/application.js.map +1 -1
- package/src/generators/application/application.spec.ts +124 -5
- package/src/generators/application/files/app/.ruby-version +1 -0
- package/src/generators/application/files/app/Gemfile.template +6 -0
- package/src/generators/application/files/app/android/app/build.gradle.template +71 -217
- package/src/generators/application/files/app/android/app/src/androidTest/java/com/__lowerCaseName__/DetoxTest.java.template +2 -8
- package/src/generators/application/files/app/android/app/src/debug/java/com/__lowerCaseName__/ReactNativeFlipper.java.template +4 -2
- package/src/generators/application/files/app/android/app/src/main/AndroidManifest.xml.template +3 -3
- package/src/generators/application/files/app/android/app/src/main/java/com/__lowerCaseName__/MainActivity.java.template +13 -26
- package/src/generators/application/files/app/android/app/src/main/java/com/__lowerCaseName__/MainApplication.java.template +19 -48
- package/src/generators/application/files/app/android/app/src/release/java/com/__lowerCaseName__/ReactNativeFlipper.java.template +20 -0
- package/src/generators/application/files/app/android/build.gradle.template +13 -36
- package/src/generators/application/files/app/android/gradle.properties +4 -0
- package/src/generators/application/files/app/android/settings.gradle.template +2 -17
- package/src/generators/application/files/app/ios/Podfile.template +21 -5
- package/src/generators/application/files/app/ios/__className__/AppDelegate.h +2 -4
- package/src/generators/application/files/app/ios/__className__/AppDelegate.mm.template +12 -109
- package/src/generators/application/files/app/ios/__className__/Info.plist.template +2 -2
- package/src/generators/application/files/app/ios/__className__.xcodeproj/project.pbxproj.template +4 -2
- package/src/generators/application/files/app/ios/__className__.xcworkspace/{contents.xcworkspacedata → xcshareddata/contents.xcworkspacedata} +1 -1
- package/src/generators/application/files/app/src/app/App.tsx.template +224 -38
- package/src/generators/application/files/app/tsconfig.app.json.template +2 -2
- package/src/generators/application/files/app/tsconfig.json.template +3 -2
- package/src/generators/application/lib/add-detox.js +1 -1
- package/src/generators/application/lib/add-detox.js.map +1 -1
- package/src/generators/application/lib/add-project.js +2 -8
- package/src/generators/application/lib/add-project.js.map +1 -1
- package/src/generators/application/lib/create-application-files.js +2 -2
- package/src/generators/application/lib/create-application-files.js.map +1 -1
- package/src/generators/application/lib/nomalize-options.spec.ts +1 -1
- package/src/generators/application/lib/normalize-options.js +1 -1
- package/src/generators/application/lib/normalize-options.js.map +1 -1
- package/src/generators/application/schema.d.ts +1 -0
- package/src/generators/application/schema.json +14 -7
- package/src/generators/component/component.js +6 -2
- package/src/generators/component/component.js.map +1 -1
- package/src/generators/component/component.spec.ts +1 -1
- package/src/generators/component/lib/add-import.d.ts +1 -1
- package/src/generators/component/lib/add-import.js +7 -3
- package/src/generators/component/lib/add-import.js.map +1 -1
- package/src/generators/component/schema.json +3 -3
- package/src/generators/component-story/component-story.spec.ts +9 -14
- package/src/generators/init/init.d.ts +3 -3
- package/src/generators/init/init.js +16 -9
- package/src/generators/init/init.js.map +1 -1
- package/src/generators/init/init.spec.ts +1 -1
- package/src/generators/init/lib/gitignore-entries.d.ts +1 -1
- package/src/generators/init/lib/gitignore-entries.js +17 -9
- package/src/generators/init/lib/gitignore-entries.js.map +1 -1
- package/src/generators/init/schema.d.ts +1 -0
- package/src/generators/init/schema.json +8 -1
- package/src/generators/library/files/lib/tsconfig.json__tmpl__ +1 -1
- package/src/generators/library/files/lib/tsconfig.lib.json__tmpl__ +3 -4
- package/src/generators/library/library.js +8 -24
- package/src/generators/library/library.js.map +1 -1
- package/src/generators/library/library.spec.ts +14 -1
- package/src/generators/library/schema.d.ts +1 -1
- package/src/generators/library/schema.json +14 -10
- package/src/generators/stories/stories-app.spec.ts +1 -1
- package/src/generators/stories/stories-lib.spec.ts +1 -1
- package/src/generators/stories/stories.js +6 -4
- package/src/generators/stories/stories.js.map +1 -1
- package/src/generators/storybook-configuration/configuration.js +3 -2
- package/src/generators/storybook-configuration/configuration.js.map +1 -1
- package/src/generators/storybook-configuration/configuration.spec.ts +10 -6
- package/src/generators/storybook-configuration/files/app/storybook.ts.template +4 -4
- package/src/generators/storybook-configuration/lib/add-resolver-main-fields-to-metro-config.spec.ts +1 -1
- package/src/generators/storybook-configuration/lib/create-storybook-files.js +5 -6
- package/src/generators/storybook-configuration/lib/create-storybook-files.js.map +1 -1
- package/src/generators/storybook-configuration/lib/replace-app-import-with-storybook-toggle.spec.ts +1 -1
- package/src/generators/storybook-configuration/schema.json +6 -3
- package/src/generators/upgrade-native/schema.json +2 -1
- package/src/generators/upgrade-native/upgrade-native.d.ts +5 -1
- package/src/generators/upgrade-native/upgrade-native.js +10 -13
- package/src/generators/upgrade-native/upgrade-native.js.map +1 -1
- package/src/migrations/update-12-10-0/add-react-native-svg-12-10-0.spec.ts +1 -1
- package/src/migrations/update-12-5-0/update-jest-for-react-native.js +1 -1
- package/src/migrations/update-12-5-0/update-jest-for-react-native.js.map +1 -1
- package/src/migrations/update-13-5-0/add-babel-config-root-13-5-0.js +2 -2
- package/src/migrations/update-13-5-0/add-babel-config-root-13-5-0.js.map +1 -1
- package/src/migrations/update-13-5-0/add-babel-config-root-13-5-0.spec.ts +1 -1
- package/src/migrations/update-13-5-0/update-react-native-typing-svg-13-5-0.spec.ts +1 -1
- package/src/migrations/update-14-0-0/add-project-root-metro-config-14-0-0.spec.ts +1 -1
- package/src/migrations/update-14-0-0/update-entry-file-bundle-14-0-0.spec.ts +1 -1
- package/src/migrations/update-14-0-2/change-main-to-class-name-14-0-2.spec.ts +1 -1
- package/src/migrations/update-14-2-1/rename-blockList-metro-config.spec.ts +1 -1
- package/src/migrations/update-14-5-5/add-exclude-sync-deps.spec.ts +1 -1
- package/src/migrations/update-14-5-8/change-searchDir-storybook.spec.ts +1 -1
- package/src/migrations/update-14-6-0/remove-jest-transform.js +1 -1
- package/src/migrations/update-14-6-0/remove-jest-transform.js.map +1 -1
- package/src/migrations/update-14-6-0/remove-jest-transform.spec.ts +1 -1
- package/src/migrations/update-15-0-0/add-babel-inputs.d.ts +2 -0
- package/src/migrations/update-15-0-0/add-babel-inputs.js +11 -0
- package/src/migrations/update-15-0-0/add-babel-inputs.js.map +1 -0
- package/src/migrations/update-15-0-0/add-babel-inputs.spec.ts +73 -0
- package/src/utils/add-jest.d.ts +1 -1
- package/src/utils/add-jest.js +3 -2
- package/src/utils/add-jest.js.map +1 -1
- package/src/utils/add-linting.d.ts +3 -2
- package/src/utils/add-linting.js +16 -17
- package/src/utils/add-linting.js.map +1 -1
- package/src/utils/add-linting.spec.ts +2 -17
- package/src/utils/chmod-android-gradle-files.d.ts +3 -0
- package/src/utils/chmod-android-gradle-files.js +24 -0
- package/src/utils/chmod-android-gradle-files.js.map +1 -0
- package/src/utils/find-all-npm-dependencies.spec.ts +1 -1
- package/src/utils/pod-install-task.js +1 -1
- package/src/utils/pod-install-task.js.map +1 -1
- package/src/utils/versions.d.ts +17 -13
- package/src/utils/versions.js +18 -14
- package/src/utils/versions.js.map +1 -1
- package/src/generators/application/files/app/android/app/_BUCK.template +0 -55
- package/src/generators/application/files/app/android/app/build_defs.bzl +0 -19
- package/src/generators/application/files/app/android/app/src/main/java/com/__lowerCaseName__/newarchitecture/MainApplicationReactNativeHost.java.template +0 -116
- package/src/generators/application/files/app/android/app/src/main/java/com/__lowerCaseName__/newarchitecture/components/MainComponentsRegistry.java.template +0 -36
- package/src/generators/application/files/app/android/app/src/main/java/com/__lowerCaseName__/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java.template +0 -48
- package/src/generators/application/files/app/android/app/src/main/jni/CMakeLists.txt.template +0 -6
- package/src/generators/application/files/app/android/app/src/main/jni/MainApplicationModuleProvider.cpp +0 -32
- package/src/generators/application/files/app/android/app/src/main/jni/MainApplicationModuleProvider.h +0 -16
- package/src/generators/application/files/app/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp +0 -45
- package/src/generators/application/files/app/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h.template +0 -38
- package/src/generators/application/files/app/android/app/src/main/jni/MainComponentsRegistry.cpp +0 -65
- package/src/generators/application/files/app/android/app/src/main/jni/MainComponentsRegistry.h.template +0 -32
- package/src/generators/application/files/app/android/app/src/main/jni/OnLoad.cpp +0 -11
- package/src/generators/application/files/app/ios/__className__.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/src/generators/application/files/app/src/app/icons/blog.svg +0 -1
- package/src/generators/application/files/app/src/app/icons/book.svg +0 -1
- package/src/generators/application/files/app/src/app/icons/checkmark.svg +0 -1
- package/src/generators/application/files/app/src/app/icons/chevron-right.svg +0 -1
- package/src/generators/application/files/app/src/app/icons/courses.svg +0 -1
- package/src/generators/application/files/app/src/app/icons/github.svg +0 -1
- package/src/generators/application/files/app/src/app/icons/heart.svg +0 -1
- package/src/generators/application/files/app/src/app/icons/logo.png +0 -0
- package/src/generators/application/files/app/src/app/icons/nx-cloud.svg +0 -1
- package/src/generators/application/files/app/src/app/icons/pointer.svg +0 -1
- package/src/generators/application/files/app/src/app/icons/terminal.svg +0 -1
- package/src/generators/application/files/app/src/app/icons/vscode.svg +0 -1
- package/src/generators/application/files/app/src/app/icons/youtube.svg +0 -1
- package/src/generators/init/lib/init-root-babel-config.d.ts +0 -2
- package/src/generators/init/lib/init-root-babel-config.js +0 -20
- package/src/generators/init/lib/init-root-babel-config.js.map +0 -1
- package/src/utils/chmod-task.d.ts +0 -2
- package/src/utils/chmod-task.js +0 -18
- package/src/utils/chmod-task.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @nrwl/react-native
|
package/LICENSE
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
(The MIT License)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2017-
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
-
a copy of this software and associated documentation files (the
|
|
7
|
-
'Software'), to deal in the Software without restriction, including
|
|
8
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
-
permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
-
the following conditions:
|
|
12
|
-
|
|
13
|
-
The above copyright notice and this permission notice shall be
|
|
14
|
-
included in all copies or substantial portions of the Software.
|
|
15
|
-
|
|
16
|
-
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
19
|
-
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
20
|
-
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
21
|
-
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
22
|
-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
1
|
+
(The MIT License)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2017-2023 Narwhal Technologies Inc.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
+
a copy of this software and associated documentation files (the
|
|
7
|
+
'Software'), to deal in the Software without restriction, including
|
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
+
the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be
|
|
14
|
+
included in all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
19
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
20
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
21
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
22
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
Nx is a next generation build system with first class monorepo support and powerful integrations.
|
|
21
21
|
|
|
22
|
-
This package is a [React Native plugin for Nx](https://nx.dev/
|
|
22
|
+
This package is a [React Native plugin for Nx](https://nx.dev/packages/react-native).
|
|
23
23
|
|
|
24
24
|
## Getting Started
|
|
25
25
|
|
|
@@ -43,40 +43,19 @@ npm init nx-workspace
|
|
|
43
43
|
yarn create nx-workspace
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
```
|
|
49
|
-
? What to create in the new workspace (Use arrow keys)
|
|
50
|
-
❯ apps [an empty workspace with no plugins with a layout that works best for building apps]
|
|
51
|
-
core [an empty workspace with no plugins set up to publish npm packages (similar to yarn workspaces)]
|
|
52
|
-
ts [an empty workspace with the JS/TS plugin preinstalled]
|
|
53
|
-
react [a workspace with a single React application]
|
|
54
|
-
angular [a workspace with a single Angular application]
|
|
55
|
-
next.js [a workspace with a single Next.js application]
|
|
56
|
-
nest [a workspace with a single Nest application]
|
|
57
|
-
express [a workspace with a single Express application]
|
|
58
|
-
web components [a workspace with a single app built using web components]
|
|
59
|
-
react-native [a workspace with a single React Native application]
|
|
60
|
-
react-express [a workspace with a full stack application (React + Express)]
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
Select the preset that works best for you
|
|
64
|
-
|
|
65
|
-
### Adding Nx to an Existing Monorepo
|
|
46
|
+
### Adding Nx to an Existing Repository
|
|
66
47
|
|
|
67
48
|
Run:
|
|
68
49
|
|
|
69
50
|
```bash
|
|
70
|
-
npx
|
|
51
|
+
npx nx@latest init
|
|
71
52
|
```
|
|
72
53
|
|
|
73
54
|
## Documentation & Resources
|
|
74
55
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
- [Nx
|
|
78
|
-
- [Tutorial: Adding Nx to an Existing Monorepo](/recipe/adding-to-monorepo)
|
|
79
|
-
- [Official Nx YouTube Channel](https://www.youtube.com/c/Nrwl_io)
|
|
56
|
+
- [Nx.Dev: Documentation, Guides, Tutorials](https://nx.dev)
|
|
57
|
+
- [Intro to Nx](https://nx.dev/getting-started/intro)
|
|
58
|
+
- [Official Nx YouTube Channel](https://www.youtube.com/@NxDevtools)
|
|
80
59
|
- [Blog Posts About Nx](https://blog.nrwl.io/nx/home)
|
|
81
60
|
|
|
82
61
|
<p style="text-align: center;"><a href="https://nx.dev/#learning-materials" target="_blank" rel="noreferrer"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-courses-and-videos.svg"
|
package/migrations.json
CHANGED
|
@@ -65,6 +65,12 @@
|
|
|
65
65
|
"cli": "nx",
|
|
66
66
|
"description": "Remove transform in jest.config",
|
|
67
67
|
"factory": "./src/migrations/update-14-6-0/remove-jest-transform"
|
|
68
|
+
},
|
|
69
|
+
"add-babel-inputs": {
|
|
70
|
+
"cli": "nx",
|
|
71
|
+
"version": "15.0.0-beta.0",
|
|
72
|
+
"description": "Adds babel.config.json to the hash of all tasks",
|
|
73
|
+
"factory": "./src/migrations/update-15-0-0/add-babel-inputs"
|
|
68
74
|
}
|
|
69
75
|
},
|
|
70
76
|
"packageJsonUpdates": {
|
|
@@ -993,6 +999,268 @@
|
|
|
993
999
|
"alwaysAddToPackageJson": false
|
|
994
1000
|
}
|
|
995
1001
|
}
|
|
1002
|
+
},
|
|
1003
|
+
"15.0.0": {
|
|
1004
|
+
"version": "15.0.0-beta.0",
|
|
1005
|
+
"packages": {
|
|
1006
|
+
"metro": {
|
|
1007
|
+
"version": "0.72.3",
|
|
1008
|
+
"alwaysAddToPackageJson": false
|
|
1009
|
+
},
|
|
1010
|
+
"metro-resolver": {
|
|
1011
|
+
"version": "0.72.3",
|
|
1012
|
+
"alwaysAddToPackageJson": false
|
|
1013
|
+
},
|
|
1014
|
+
"metro-babel-register": {
|
|
1015
|
+
"version": "0.72.3",
|
|
1016
|
+
"alwaysAddToPackageJson": false
|
|
1017
|
+
},
|
|
1018
|
+
"metro-config": {
|
|
1019
|
+
"version": "0.72.3",
|
|
1020
|
+
"alwaysAddToPackageJson": false
|
|
1021
|
+
},
|
|
1022
|
+
"metro-react-native-babel-preset": {
|
|
1023
|
+
"version": "0.72.3",
|
|
1024
|
+
"alwaysAddToPackageJson": false
|
|
1025
|
+
},
|
|
1026
|
+
"metro-react-native-babel-transformer": {
|
|
1027
|
+
"version": "0.72.3",
|
|
1028
|
+
"alwaysAddToPackageJson": false
|
|
1029
|
+
},
|
|
1030
|
+
"@types/react-native": {
|
|
1031
|
+
"version": "0.70.4",
|
|
1032
|
+
"alwaysAddToPackageJson": false
|
|
1033
|
+
},
|
|
1034
|
+
"@testing-library/react-native": {
|
|
1035
|
+
"version": "11.2.0",
|
|
1036
|
+
"alwaysAddToPackageJson": false
|
|
1037
|
+
},
|
|
1038
|
+
"@testing-library/jest-native": {
|
|
1039
|
+
"version": "4.0.13",
|
|
1040
|
+
"alwaysAddToPackageJson": false
|
|
1041
|
+
}
|
|
1042
|
+
}
|
|
1043
|
+
},
|
|
1044
|
+
"15.2.2": {
|
|
1045
|
+
"version": "15.2.2-beta.0",
|
|
1046
|
+
"packages": {
|
|
1047
|
+
"react-native": {
|
|
1048
|
+
"version": "0.70.6",
|
|
1049
|
+
"alwaysAddToPackageJson": false
|
|
1050
|
+
},
|
|
1051
|
+
"@types/react-native": {
|
|
1052
|
+
"version": "0.70.6",
|
|
1053
|
+
"alwaysAddToPackageJson": false
|
|
1054
|
+
},
|
|
1055
|
+
"metro-resolver": {
|
|
1056
|
+
"version": "0.73.3",
|
|
1057
|
+
"alwaysAddToPackageJson": false
|
|
1058
|
+
},
|
|
1059
|
+
"metro-babel-register": {
|
|
1060
|
+
"version": "0.73.3",
|
|
1061
|
+
"alwaysAddToPackageJson": false
|
|
1062
|
+
},
|
|
1063
|
+
"metro-config": {
|
|
1064
|
+
"version": "0.73.3",
|
|
1065
|
+
"alwaysAddToPackageJson": false
|
|
1066
|
+
},
|
|
1067
|
+
"metro-react-native-babel-preset": {
|
|
1068
|
+
"version": "0.73.3",
|
|
1069
|
+
"alwaysAddToPackageJson": false
|
|
1070
|
+
},
|
|
1071
|
+
"metro-react-native-babel-transformer": {
|
|
1072
|
+
"version": "0.73.3",
|
|
1073
|
+
"alwaysAddToPackageJson": false
|
|
1074
|
+
},
|
|
1075
|
+
"react-native-config": {
|
|
1076
|
+
"version": "1.4.11",
|
|
1077
|
+
"alwaysAddToPackageJson": false
|
|
1078
|
+
},
|
|
1079
|
+
"@testing-library/react-native": {
|
|
1080
|
+
"version": "11.5.0",
|
|
1081
|
+
"alwaysAddToPackageJson": false
|
|
1082
|
+
},
|
|
1083
|
+
"@testing-library/jest-native": {
|
|
1084
|
+
"version": "5.3.0",
|
|
1085
|
+
"alwaysAddToPackageJson": false
|
|
1086
|
+
},
|
|
1087
|
+
"react-native-svg": {
|
|
1088
|
+
"version": "13.6.0",
|
|
1089
|
+
"alwaysAddToPackageJson": false
|
|
1090
|
+
},
|
|
1091
|
+
"@babel/runtime": {
|
|
1092
|
+
"version": "7.20.1",
|
|
1093
|
+
"alwaysAddToPackageJson": false
|
|
1094
|
+
},
|
|
1095
|
+
"@react-native-community/cli": {
|
|
1096
|
+
"version": "9.3.2",
|
|
1097
|
+
"alwaysAddToPackageJson": false
|
|
1098
|
+
},
|
|
1099
|
+
"@react-native-community/cli-platform-android": {
|
|
1100
|
+
"version": "9.3.1",
|
|
1101
|
+
"alwaysAddToPackageJson": false
|
|
1102
|
+
},
|
|
1103
|
+
"@react-native-community/cli-platform-ios": {
|
|
1104
|
+
"version": "9.3.0",
|
|
1105
|
+
"alwaysAddToPackageJson": false
|
|
1106
|
+
},
|
|
1107
|
+
"@react-native-async-storage/async-storage": {
|
|
1108
|
+
"version": "1.17.11",
|
|
1109
|
+
"alwaysAddToPackageJson": false
|
|
1110
|
+
}
|
|
1111
|
+
}
|
|
1112
|
+
},
|
|
1113
|
+
"15.6.2": {
|
|
1114
|
+
"version": "15.6.2-beta.0",
|
|
1115
|
+
"packages": {
|
|
1116
|
+
"react-native": {
|
|
1117
|
+
"version": "0.71.1",
|
|
1118
|
+
"alwaysAddToPackageJson": false
|
|
1119
|
+
},
|
|
1120
|
+
"@types/react-native": {
|
|
1121
|
+
"version": "0.71.0",
|
|
1122
|
+
"alwaysAddToPackageJson": false
|
|
1123
|
+
},
|
|
1124
|
+
"metro-resolver": {
|
|
1125
|
+
"version": "0.74.1",
|
|
1126
|
+
"alwaysAddToPackageJson": false
|
|
1127
|
+
},
|
|
1128
|
+
"metro-babel-register": {
|
|
1129
|
+
"version": "0.74.1",
|
|
1130
|
+
"alwaysAddToPackageJson": false
|
|
1131
|
+
},
|
|
1132
|
+
"metro-config": {
|
|
1133
|
+
"version": "0.74.1",
|
|
1134
|
+
"alwaysAddToPackageJson": false
|
|
1135
|
+
},
|
|
1136
|
+
"metro-react-native-babel-preset": {
|
|
1137
|
+
"version": "0.74.1",
|
|
1138
|
+
"alwaysAddToPackageJson": false
|
|
1139
|
+
},
|
|
1140
|
+
"metro-react-native-babel-transformer": {
|
|
1141
|
+
"version": "0.74.1",
|
|
1142
|
+
"alwaysAddToPackageJson": false
|
|
1143
|
+
},
|
|
1144
|
+
"react-native-config": {
|
|
1145
|
+
"version": "1.4.12",
|
|
1146
|
+
"alwaysAddToPackageJson": false
|
|
1147
|
+
},
|
|
1148
|
+
"@testing-library/jest-native": {
|
|
1149
|
+
"version": "5.4.1",
|
|
1150
|
+
"alwaysAddToPackageJson": false
|
|
1151
|
+
},
|
|
1152
|
+
"react-native-svg": {
|
|
1153
|
+
"version": "13.7.0",
|
|
1154
|
+
"alwaysAddToPackageJson": false
|
|
1155
|
+
},
|
|
1156
|
+
"@babel/runtime": {
|
|
1157
|
+
"version": "7.20.7",
|
|
1158
|
+
"alwaysAddToPackageJson": false
|
|
1159
|
+
},
|
|
1160
|
+
"@react-native-community/cli": {
|
|
1161
|
+
"version": "10.1.3",
|
|
1162
|
+
"alwaysAddToPackageJson": false
|
|
1163
|
+
},
|
|
1164
|
+
"@react-native-community/cli-platform-android": {
|
|
1165
|
+
"version": "10.1.3",
|
|
1166
|
+
"alwaysAddToPackageJson": false
|
|
1167
|
+
},
|
|
1168
|
+
"@react-native-community/cli-platform-ios": {
|
|
1169
|
+
"version": "10.1.1",
|
|
1170
|
+
"alwaysAddToPackageJson": false
|
|
1171
|
+
},
|
|
1172
|
+
"@types/node": {
|
|
1173
|
+
"version": "18.11.18",
|
|
1174
|
+
"alwaysAddToPackageJson": false
|
|
1175
|
+
},
|
|
1176
|
+
"react": {
|
|
1177
|
+
"version": "18.2.0",
|
|
1178
|
+
"alwaysAddToPackageJson": false
|
|
1179
|
+
},
|
|
1180
|
+
"react-dom": {
|
|
1181
|
+
"version": "18.2.0",
|
|
1182
|
+
"alwaysAddToPackageJson": false
|
|
1183
|
+
},
|
|
1184
|
+
"react-test-renderer": {
|
|
1185
|
+
"version": "18.2.0",
|
|
1186
|
+
"alwaysAddToPackageJson": false
|
|
1187
|
+
}
|
|
1188
|
+
}
|
|
1189
|
+
},
|
|
1190
|
+
"15.7.1": {
|
|
1191
|
+
"version": "15.7.1-beta.0",
|
|
1192
|
+
"packages": {
|
|
1193
|
+
"react-native": {
|
|
1194
|
+
"version": "0.71.2",
|
|
1195
|
+
"alwaysAddToPackageJson": false
|
|
1196
|
+
},
|
|
1197
|
+
"@types/react-native": {
|
|
1198
|
+
"version": "0.71.2",
|
|
1199
|
+
"alwaysAddToPackageJson": false
|
|
1200
|
+
},
|
|
1201
|
+
"react-native-config": {
|
|
1202
|
+
"version": "1.5.0",
|
|
1203
|
+
"alwaysAddToPackageJson": false
|
|
1204
|
+
},
|
|
1205
|
+
"@testing-library/react-native": {
|
|
1206
|
+
"version": "11.5.2",
|
|
1207
|
+
"alwaysAddToPackageJson": false
|
|
1208
|
+
},
|
|
1209
|
+
"react-native-svg": {
|
|
1210
|
+
"version": "13.8.0",
|
|
1211
|
+
"alwaysAddToPackageJson": false
|
|
1212
|
+
},
|
|
1213
|
+
"@babel/runtime": {
|
|
1214
|
+
"version": "7.20.13",
|
|
1215
|
+
"alwaysAddToPackageJson": false
|
|
1216
|
+
}
|
|
1217
|
+
}
|
|
1218
|
+
},
|
|
1219
|
+
"15.8.3": {
|
|
1220
|
+
"version": "15.8.3-beta.0",
|
|
1221
|
+
"packages": {
|
|
1222
|
+
"react-native": {
|
|
1223
|
+
"version": "0.71.3",
|
|
1224
|
+
"alwaysAddToPackageJson": false
|
|
1225
|
+
},
|
|
1226
|
+
"@types/react-native": {
|
|
1227
|
+
"version": "0.71.3",
|
|
1228
|
+
"alwaysAddToPackageJson": false
|
|
1229
|
+
},
|
|
1230
|
+
"@types/node": {
|
|
1231
|
+
"version": "18.14.4",
|
|
1232
|
+
"alwaysAddToPackageJson": false
|
|
1233
|
+
},
|
|
1234
|
+
"@react-native-community/cli": {
|
|
1235
|
+
"version": "10.2.0",
|
|
1236
|
+
"alwaysAddToPackageJson": false
|
|
1237
|
+
},
|
|
1238
|
+
"@react-native-community/cli-platform-android": {
|
|
1239
|
+
"version": "10.2.0",
|
|
1240
|
+
"alwaysAddToPackageJson": false
|
|
1241
|
+
},
|
|
1242
|
+
"@react-native-community/cli-platform-ios": {
|
|
1243
|
+
"version": "10.2.0",
|
|
1244
|
+
"alwaysAddToPackageJson": false
|
|
1245
|
+
},
|
|
1246
|
+
"@testing-library/jest-native": {
|
|
1247
|
+
"version": "5.4.2",
|
|
1248
|
+
"alwaysAddToPackageJson": false
|
|
1249
|
+
},
|
|
1250
|
+
"@babel/runtime": {
|
|
1251
|
+
"version": "7.21.0",
|
|
1252
|
+
"alwaysAddToPackageJson": false
|
|
1253
|
+
}
|
|
1254
|
+
}
|
|
1255
|
+
},
|
|
1256
|
+
"15.8.6": {
|
|
1257
|
+
"version": "15.8.6-beta.0",
|
|
1258
|
+
"packages": {
|
|
1259
|
+
"react-native": {
|
|
1260
|
+
"version": "0.71.4",
|
|
1261
|
+
"alwaysAddToPackageJson": false
|
|
1262
|
+
}
|
|
1263
|
+
}
|
|
996
1264
|
}
|
|
997
1265
|
}
|
|
998
1266
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nrwl/react-native",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.9.0-beta.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Nx Plugin for React Native contains generators for managing React Native applications and libraries within an Nx workspace. It provides: \n\n-Integration with libraries such as Jest, Detox, and Storybook.\n-Scaffolding for creating buildable libraries that can be published to npm.\n-Utilities for automatic workspace refactoring.",
|
|
6
6
|
"keywords": [
|
|
@@ -25,24 +25,24 @@
|
|
|
25
25
|
"main": "index.js",
|
|
26
26
|
"types": "index.d.ts",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@nrwl/detox": "14.
|
|
29
|
-
"@nrwl/devkit": "14.
|
|
30
|
-
"@nrwl/jest": "14.
|
|
31
|
-
"@nrwl/
|
|
32
|
-
"@nrwl/
|
|
33
|
-
"@nrwl/
|
|
34
|
-
"@nrwl/workspace": "14.
|
|
28
|
+
"@nrwl/detox": "14.9.0-beta.1",
|
|
29
|
+
"@nrwl/devkit": "14.9.0-beta.1",
|
|
30
|
+
"@nrwl/jest": "14.9.0-beta.1",
|
|
31
|
+
"@nrwl/js": "14.9.0-beta.1",
|
|
32
|
+
"@nrwl/linter": "14.9.0-beta.1",
|
|
33
|
+
"@nrwl/react": "14.9.0-beta.1",
|
|
34
|
+
"@nrwl/workspace": "14.9.0-beta.1",
|
|
35
35
|
"chalk": "^4.1.0",
|
|
36
36
|
"enhanced-resolve": "^5.8.3",
|
|
37
|
-
"fs-extra": "^
|
|
37
|
+
"fs-extra": "^11.1.0",
|
|
38
38
|
"ignore": "^5.0.4",
|
|
39
|
-
"metro-resolver": "^0.
|
|
39
|
+
"metro-resolver": "^0.74.1",
|
|
40
40
|
"minimatch": "3.0.5",
|
|
41
41
|
"node-fetch": "^2.6.7",
|
|
42
|
-
"tsconfig-paths": "^
|
|
42
|
+
"tsconfig-paths": "^4.1.2"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"react-native": "^0.
|
|
45
|
+
"react-native": "^0.71.4"
|
|
46
46
|
},
|
|
47
47
|
"builders": "./executors.json",
|
|
48
48
|
"ng-update": {
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"publishConfig": {
|
|
54
54
|
"access": "public"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "b2a467bcb2bdc124ed52f3755780bca429a43855"
|
|
57
57
|
}
|
|
@@ -17,13 +17,14 @@ const devkit_1 = require("@nrwl/devkit");
|
|
|
17
17
|
*/
|
|
18
18
|
function getResolveRequest(extensions) {
|
|
19
19
|
return function (_context, realModuleName, platform) {
|
|
20
|
-
const
|
|
21
|
-
if (
|
|
20
|
+
const debug = process.env.NX_REACT_NATIVE_DEBUG === 'true';
|
|
21
|
+
if (debug)
|
|
22
22
|
console.log(chalk.cyan(`[Nx] Resolving: ${realModuleName}`));
|
|
23
23
|
const { resolveRequest } = _context, context = tslib_1.__rest(_context, ["resolveRequest"]);
|
|
24
|
-
const resolvedPath =
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
const resolvedPath = resolveRequestFromContext(resolveRequest, _context, realModuleName, platform, debug) ||
|
|
25
|
+
defaultMetroResolver(context, realModuleName, platform, debug) ||
|
|
26
|
+
tsconfigPathsResolver(context, extensions, realModuleName, platform, debug) ||
|
|
27
|
+
pnpmResolver(extensions, context, realModuleName, debug);
|
|
27
28
|
if (resolvedPath) {
|
|
28
29
|
return resolvedPath;
|
|
29
30
|
}
|
|
@@ -31,6 +32,15 @@ function getResolveRequest(extensions) {
|
|
|
31
32
|
};
|
|
32
33
|
}
|
|
33
34
|
exports.getResolveRequest = getResolveRequest;
|
|
35
|
+
function resolveRequestFromContext(resolveRequest, context, realModuleName, platform, debug) {
|
|
36
|
+
try {
|
|
37
|
+
return resolveRequest(context, realModuleName, platform);
|
|
38
|
+
}
|
|
39
|
+
catch (_a) {
|
|
40
|
+
if (debug)
|
|
41
|
+
console.log(chalk.cyan(`[Nx] Unable to resolve with default resolveRequest: ${realModuleName}`));
|
|
42
|
+
}
|
|
43
|
+
}
|
|
34
44
|
/**
|
|
35
45
|
* This function try to resolve path using metro's default resolver
|
|
36
46
|
* @returns path if resolved, else undefined
|
|
@@ -115,6 +125,7 @@ function getPnpmResolver(extensions) {
|
|
|
115
125
|
extensions: extensions.map((extension) => '.' + extension),
|
|
116
126
|
useSyncFileSystemCalls: true,
|
|
117
127
|
modules: [(0, path_1.join)(devkit_1.workspaceRoot, 'node_modules'), 'node_modules'],
|
|
128
|
+
conditionNames: ['native', 'browser', 'require', 'default'],
|
|
118
129
|
});
|
|
119
130
|
}
|
|
120
131
|
return resolver;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metro-resolver.js","sourceRoot":"","sources":["../../../../packages/react-native/plugins/metro-resolver.ts"],"names":[],"mappings":";;;;AAAA,gDAAgD;AAEhD,mDAA6D;AAC7D,+BAA+B;AAC/B,uDAA0E;AAC1E,+BAAqC;AACrC,yBAAyB;AACzB,yCAA6C;AAE7C;;;;;GAKG;AACH,SAAgB,iBAAiB,CAAC,UAAoB;IACpD,OAAO,UACL,QAAa,EACb,cAAsB,EACtB,QAAuB;QAEvB,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,qBAAqB,KAAK,MAAM,CAAC;QAE3D,IAAI,KAAK;YAAE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,mBAAmB,cAAc,EAAE,CAAC,CAAC,CAAC;QAExE,MAAM,EAAE,cAAc,KAAiB,QAAQ,EAApB,OAAO,kBAAK,QAAQ,EAAzC,kBAA8B,CAAW,CAAC;QAEhD,MAAM,YAAY,GAChB,oBAAoB,CAAC,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,KAAK,CAAC;YAC9D,qBAAqB,CACnB,OAAO,EACP,UAAU,EACV,cAAc,EACd,QAAQ,EACR,KAAK,CACN;YACD,YAAY,CAAC,UAAU,EAAE,OAAO,EAAE,cAAc,EAAE,KAAK,CAAC,CAAC;QAC3D,IAAI,YAAY,EAAE;YAChB,OAAO,YAAY,CAAC;SACrB;QACD,MAAM,IAAI,KAAK,CAAC,kBAAkB,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;IAClE,CAAC,CAAC;AACJ,CAAC;
|
|
1
|
+
{"version":3,"file":"metro-resolver.js","sourceRoot":"","sources":["../../../../packages/react-native/plugins/metro-resolver.ts"],"names":[],"mappings":";;;;AAAA,gDAAgD;AAEhD,mDAA6D;AAC7D,+BAA+B;AAC/B,uDAA0E;AAC1E,+BAAqC;AACrC,yBAAyB;AACzB,yCAA6C;AAE7C;;;;;GAKG;AACH,SAAgB,iBAAiB,CAAC,UAAoB;IACpD,OAAO,UACL,QAAa,EACb,cAAsB,EACtB,QAAuB;QAEvB,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,qBAAqB,KAAK,MAAM,CAAC;QAE3D,IAAI,KAAK;YAAE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,mBAAmB,cAA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AU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,GAAG,GAAG,SAAS,CAAC;YAC1D,sBAAsB,EAAE,IAAI;YAC5B,OAAO,EAAE,CAAC,IAAA,WAAI,EAAC,sBAAa,EAAE,cAAc,CAAC,EAAE,cAAc,CAAC;YAC9D,cAAc,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC;SAC5D,CAAC,CAAC;KACJ;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
package/project.json
CHANGED
|
@@ -1,43 +1,14 @@
|
|
|
1
1
|
{
|
|
2
|
+
"name": "react-native",
|
|
2
3
|
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
|
3
4
|
"sourceRoot": "packages/react-native/src",
|
|
4
5
|
"projectType": "library",
|
|
5
6
|
"targets": {
|
|
6
|
-
"lint": {
|
|
7
|
-
|
|
8
|
-
"options": {
|
|
9
|
-
"lintFilePatterns": [
|
|
10
|
-
"packages/react-native/**/*.ts",
|
|
11
|
-
"packages/react-native/**/*.spec.ts",
|
|
12
|
-
"packages/react-native/**/*.spec.tsx",
|
|
13
|
-
"packages/react-native/**/*.spec.js",
|
|
14
|
-
"packages/react-native/**/*.spec.jsx",
|
|
15
|
-
"packages/react-native/**/*.d.ts",
|
|
16
|
-
"packages/react-native/**/executors/**/schema.json",
|
|
17
|
-
"packages/react-native/**/generators/**/schema.json",
|
|
18
|
-
"packages/react-native/generators.json",
|
|
19
|
-
"packages/react-native/executors.json",
|
|
20
|
-
"packages/react-native/package.json",
|
|
21
|
-
"packages/react-native/migrations.json"
|
|
22
|
-
]
|
|
23
|
-
},
|
|
24
|
-
"outputs": ["{options.outputFile}"]
|
|
25
|
-
},
|
|
26
|
-
"test": {
|
|
27
|
-
"executor": "@nrwl/jest:jest",
|
|
28
|
-
"options": {
|
|
29
|
-
"jestConfig": "packages/react-native/jest.config.ts",
|
|
30
|
-
"passWithNoTests": true
|
|
31
|
-
},
|
|
32
|
-
"outputs": ["coverage/packages/react-native"]
|
|
33
|
-
},
|
|
7
|
+
"lint": {},
|
|
8
|
+
"test": {},
|
|
34
9
|
"build-base": {
|
|
35
10
|
"executor": "@nrwl/js:tsc",
|
|
36
11
|
"options": {
|
|
37
|
-
"outputPath": "build/packages/react-native",
|
|
38
|
-
"tsConfig": "packages/react-native/tsconfig.lib.json",
|
|
39
|
-
"main": "packages/react-native/index.ts",
|
|
40
|
-
"updateBuildableProjectDepsInPackageJson": false,
|
|
41
12
|
"assets": [
|
|
42
13
|
"packages/react-native/*.md",
|
|
43
14
|
{
|
|
@@ -77,12 +48,11 @@
|
|
|
77
48
|
"output": "/"
|
|
78
49
|
}
|
|
79
50
|
]
|
|
80
|
-
}
|
|
81
|
-
"outputs": ["{options.outputPath}"]
|
|
51
|
+
}
|
|
82
52
|
},
|
|
83
53
|
"build": {
|
|
84
54
|
"executor": "nx:run-commands",
|
|
85
|
-
"outputs": ["build/packages/react-native"],
|
|
55
|
+
"outputs": ["{workspaceRoot}/build/packages/react-native"],
|
|
86
56
|
"options": {
|
|
87
57
|
"command": "node ./scripts/copy-readme.js react-native"
|
|
88
58
|
}
|
|
@@ -4,14 +4,13 @@ const tslib_1 = require("tslib");
|
|
|
4
4
|
const path_1 = require("path");
|
|
5
5
|
const ensure_node_modules_symlink_1 = require("../../utils/ensure-node-modules-symlink");
|
|
6
6
|
const child_process_1 = require("child_process");
|
|
7
|
-
const
|
|
7
|
+
const chmod_android_gradle_files_1 = require("../../utils/chmod-android-gradle-files");
|
|
8
8
|
let childProcess;
|
|
9
9
|
function buildAndroidExecutor(options, context) {
|
|
10
10
|
return tslib_1.__asyncGenerator(this, arguments, function* buildAndroidExecutor_1() {
|
|
11
|
-
const projectRoot = context.
|
|
11
|
+
const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
|
|
12
12
|
(0, ensure_node_modules_symlink_1.ensureNodeModulesSymlink)(context.root, projectRoot);
|
|
13
|
-
(0,
|
|
14
|
-
(0, fs_1.chmodSync)((0, path_1.join)(projectRoot, 'android', 'gradlew.bat'), 0o775);
|
|
13
|
+
(0, chmod_android_gradle_files_1.chmodAndroidGradlewFiles)((0, path_1.join)(projectRoot, 'android'));
|
|
15
14
|
try {
|
|
16
15
|
yield tslib_1.__await(runCliBuild(context.root, projectRoot, options));
|
|
17
16
|
yield yield tslib_1.__await({ success: true });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-android.impl.js","sourceRoot":"","sources":["../../../../../../packages/react-native/src/executors/build-android/build-android.impl.ts"],"names":[],"mappings":";;;AACA,+BAA4B;AAC5B,yFAAmF;AACnF,iDAAoD;
|
|
1
|
+
{"version":3,"file":"build-android.impl.js","sourceRoot":"","sources":["../../../../../../packages/react-native/src/executors/build-android/build-android.impl.ts"],"names":[],"mappings":";;;AACA,+BAA4B;AAC5B,yFAAmF;AACnF,iDAAoD;AAEpD,uFAAkF;AAKlF,IAAI,YAA0B,CAAC;AAE/B,SAA+B,oBAAoB,CACjD,OAAgC,EAChC,OAAwB;;QAExB,MAAM,WAAW,GACf,OAAO,CAAC,sBAAsB,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC;QACpE,IAAA,sDAAwB,EAAC,OAAO,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QACpD,IAAA,qDAAwB,EAAC,IAAA,WAAI,EAAC,WAAW,EAAE,SAAS,CAAC,CAAC,CAAC;QAEvD,IAAI;YACF,sBAAM,WAAW,CAAC,OAAO,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,CAAC,CAAA,CAAC;YACtD,4BAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAA,CAAC;SACzB;gBAAS;YACR,IAAI,YAAY,EAAE;gBAChB,YAAY,CAAC,IAAI,EAAE,CAAC;aACrB;SACF;IACH,CAAC;CAAA;AAjBD,uCAiBC;AAED,SAAS,WAAW,CAClB,aAAqB,EACrB,WAAmB,EACnB,OAAgC;IAEh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ACxB;QACD,OAAO,iBAAiB,CAAC;KAC1B;SAAM;QACL,IAAI,OAAO,CAAC,KAAK,EAAE;YACjB,OAAO,aAAa,CAAC;SACtB;QACD,OAAO,eAAe,CAAC;KACxB;AACH,CAAC"}
|
|
@@ -2,8 +2,8 @@ import { ExecutorContext } from '@nrwl/devkit';
|
|
|
2
2
|
import { join } from 'path';
|
|
3
3
|
import { ensureNodeModulesSymlink } from '../../utils/ensure-node-modules-symlink';
|
|
4
4
|
import { ChildProcess, spawn } from 'child_process';
|
|
5
|
-
import { chmodSync } from 'fs';
|
|
6
5
|
import { ReactNativeBuildOptions } from './schema';
|
|
6
|
+
import { chmodAndroidGradlewFiles } from '../../utils/chmod-android-gradle-files';
|
|
7
7
|
export interface ReactNativeBuildOutput {
|
|
8
8
|
success: boolean;
|
|
9
9
|
}
|
|
@@ -14,10 +14,10 @@ export default async function* buildAndroidExecutor(
|
|
|
14
14
|
options: ReactNativeBuildOptions,
|
|
15
15
|
context: ExecutorContext
|
|
16
16
|
): AsyncGenerator<ReactNativeBuildOutput> {
|
|
17
|
-
const projectRoot =
|
|
17
|
+
const projectRoot =
|
|
18
|
+
context.projectsConfigurations.projects[context.projectName].root;
|
|
18
19
|
ensureNodeModulesSymlink(context.root, projectRoot);
|
|
19
|
-
|
|
20
|
-
chmodSync(join(projectRoot, 'android', 'gradlew.bat'), 0o775);
|
|
20
|
+
chmodAndroidGradlewFiles(join(projectRoot, 'android'));
|
|
21
21
|
|
|
22
22
|
try {
|
|
23
23
|
await runCliBuild(context.root, projectRoot, options);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
+
"version": 2,
|
|
3
|
+
"outputCapture": "direct-nodejs",
|
|
2
4
|
"cli": "nx",
|
|
3
5
|
"$id": "NxReactNativeBuildAndroid",
|
|
4
6
|
"$schema": "http://json-schema.org/schema",
|
|
@@ -19,5 +21,6 @@
|
|
|
19
21
|
"description": "Override default gradle task incase of multi build variants"
|
|
20
22
|
}
|
|
21
23
|
},
|
|
22
|
-
"required": []
|
|
24
|
+
"required": [],
|
|
25
|
+
"examplesFile": "../../../docs/build-android-examples.md"
|
|
23
26
|
}
|
|
@@ -9,7 +9,7 @@ const ensure_node_modules_symlink_1 = require("../../utils/ensure-node-modules-s
|
|
|
9
9
|
let childProcess;
|
|
10
10
|
function bundleExecutor(options, context) {
|
|
11
11
|
return tslib_1.__asyncGenerator(this, arguments, function* bundleExecutor_1() {
|
|
12
|
-
const projectRoot = context.
|
|
12
|
+
const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
|
|
13
13
|
options.bundleOutput = (0, path_1.join)(context.root, options.bundleOutput);
|
|
14
14
|
(0, fileutils_1.createDirectory)((0, path_1.dirname)(options.bundleOutput));
|
|
15
15
|
(0, ensure_node_modules_symlink_1.ensureNodeModulesSymlink)(context.root, projectRoot);
|
|
@@ -28,7 +28,7 @@ exports.default = bundleExecutor;
|
|
|
28
28
|
function runCliBuild(workspaceRoot, projectRoot, options) {
|
|
29
29
|
return new Promise((resolve, reject) => {
|
|
30
30
|
const cliOptions = createBundleOptions(options);
|
|
31
|
-
childProcess = (0, child_process_1.fork)((0, path_1.join)(workspaceRoot, './node_modules/react-native/cli.js'), ['bundle', ...cliOptions], { cwd: (0, path_1.join)(workspaceRoot, projectRoot) });
|
|
31
|
+
childProcess = (0, child_process_1.fork)((0, path_1.join)(workspaceRoot, './node_modules/react-native/cli.js'), ['bundle', ...cliOptions], { cwd: (0, path_1.join)(workspaceRoot, projectRoot), env: process.env });
|
|
32
32
|
// Ensure the child process is killed when the parent exits
|
|
33
33
|
process.on('exit', () => childProcess.kill());
|
|
34
34
|
process.on('SIGTERM', () => childProcess.kill());
|