@nrwl/react-native 15.6.2 → 15.7.0-beta.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.
Files changed (70) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/README.md +1 -1
  3. package/migrations.json +77 -0
  4. package/package.json +11 -11
  5. package/plugins/metro-resolver.js +16 -5
  6. package/plugins/metro-resolver.js.map +1 -1
  7. package/src/executors/build-android/build-android.impl.js +2 -3
  8. package/src/executors/build-android/build-android.impl.js.map +1 -1
  9. package/src/executors/build-android/build-android.impl.ts +2 -3
  10. package/src/executors/run-android/run-android.impl.js +2 -3
  11. package/src/executors/run-android/run-android.impl.js.map +1 -1
  12. package/src/executors/run-android/run-android.impl.ts +2 -2
  13. package/src/executors/run-ios/schema.json +8 -2
  14. package/src/generators/application/application.d.ts +1 -1
  15. package/src/generators/application/application.js +5 -6
  16. package/src/generators/application/application.js.map +1 -1
  17. package/src/generators/application/application.spec.ts +5 -5
  18. package/src/generators/application/files/app/.ruby-version +1 -0
  19. package/src/generators/application/files/app/Gemfile.template +6 -0
  20. package/src/generators/application/files/app/android/app/build.gradle.template +71 -217
  21. package/src/generators/application/files/app/android/app/src/androidTest/java/com/__lowerCaseName__/DetoxTest.java.template +2 -8
  22. package/src/generators/application/files/app/android/app/src/debug/java/com/__lowerCaseName__/ReactNativeFlipper.java.template +4 -2
  23. package/src/generators/application/files/app/android/app/src/main/AndroidManifest.xml.template +3 -3
  24. package/src/generators/application/files/app/android/app/src/main/java/com/__lowerCaseName__/MainActivity.java.template +13 -26
  25. package/src/generators/application/files/app/android/app/src/main/java/com/__lowerCaseName__/MainApplication.java.template +19 -48
  26. package/src/generators/application/files/app/android/app/src/release/java/com/__lowerCaseName__/ReactNativeFlipper.java.template +20 -0
  27. package/src/generators/application/files/app/android/build.gradle.template +13 -36
  28. package/src/generators/application/files/app/android/gradle.properties +4 -0
  29. package/src/generators/application/files/app/android/settings.gradle.template +2 -17
  30. package/src/generators/application/files/app/ios/Podfile.template +21 -5
  31. package/src/generators/application/files/app/ios/__className__/AppDelegate.h +2 -4
  32. package/src/generators/application/files/app/ios/__className__/AppDelegate.mm.template +12 -109
  33. package/src/generators/application/files/app/ios/__className__/Info.plist.template +2 -2
  34. package/src/generators/application/files/app/ios/__className__.xcodeproj/project.pbxproj.template +4 -2
  35. package/src/generators/application/files/app/ios/__className__.xcworkspace/xcshareddata/contents.xcworkspacedata +10 -0
  36. package/src/generators/application/files/app/src/app/App.tsx.template +1 -1
  37. package/src/generators/init/init.js +8 -7
  38. package/src/generators/init/init.js.map +1 -1
  39. package/src/generators/init/lib/gitignore-entries.d.ts +1 -1
  40. package/src/generators/init/lib/gitignore-entries.js +17 -10
  41. package/src/generators/init/lib/gitignore-entries.js.map +1 -1
  42. package/src/generators/storybook-configuration/configuration.spec.ts +0 -4
  43. package/src/generators/storybook-configuration/schema.json +3 -1
  44. package/src/generators/upgrade-native/upgrade-native.d.ts +1 -1
  45. package/src/generators/upgrade-native/upgrade-native.js +7 -9
  46. package/src/generators/upgrade-native/upgrade-native.js.map +1 -1
  47. package/src/utils/add-linting.spec.ts +1 -1
  48. package/src/utils/chmod-android-gradle-files.d.ts +3 -0
  49. package/src/utils/chmod-android-gradle-files.js +24 -0
  50. package/src/utils/chmod-android-gradle-files.js.map +1 -0
  51. package/src/utils/versions.d.ts +14 -14
  52. package/src/utils/versions.js +14 -14
  53. package/src/utils/versions.js.map +1 -1
  54. package/src/generators/application/files/app/android/app/_BUCK.template +0 -55
  55. package/src/generators/application/files/app/android/app/build_defs.bzl +0 -19
  56. package/src/generators/application/files/app/android/app/src/main/java/com/__lowerCaseName__/newarchitecture/MainApplicationReactNativeHost.java.template +0 -116
  57. package/src/generators/application/files/app/android/app/src/main/java/com/__lowerCaseName__/newarchitecture/components/MainComponentsRegistry.java.template +0 -36
  58. package/src/generators/application/files/app/android/app/src/main/java/com/__lowerCaseName__/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java.template +0 -48
  59. package/src/generators/application/files/app/android/app/src/main/jni/CMakeLists.txt.template +0 -6
  60. package/src/generators/application/files/app/android/app/src/main/jni/MainApplicationModuleProvider.cpp +0 -32
  61. package/src/generators/application/files/app/android/app/src/main/jni/MainApplicationModuleProvider.h +0 -16
  62. package/src/generators/application/files/app/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp +0 -45
  63. package/src/generators/application/files/app/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h.template +0 -38
  64. package/src/generators/application/files/app/android/app/src/main/jni/MainComponentsRegistry.cpp +0 -65
  65. package/src/generators/application/files/app/android/app/src/main/jni/MainComponentsRegistry.h.template +0 -32
  66. package/src/generators/application/files/app/android/app/src/main/jni/OnLoad.cpp +0 -11
  67. package/src/generators/application/files/app/ios/__className__.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  68. package/src/utils/chmod-task.d.ts +0 -2
  69. package/src/utils/chmod-task.js +0 -18
  70. package/src/utils/chmod-task.js.map +0 -1
@@ -2,56 +2,33 @@
2
2
 
3
3
  buildscript {
4
4
  ext {
5
- buildToolsVersion = "31.0.0"
5
+ buildToolsVersion = "33.0.0"
6
6
  minSdkVersion = 21
7
- compileSdkVersion = 31
8
- targetSdkVersion = 31
9
- <% if (e2eTestRunner === 'detox') { %>
10
- kotlinVersion = '1.7.10'
11
- <% } %>
7
+ compileSdkVersion = 33
8
+ targetSdkVersion = 33
9
+ kotlinVersion = "1.7.21"
12
10
 
13
- if (System.properties['os.arch'] == "aarch64") {
14
- // For M1 Users we need to use the NDK 24 which added support for aarch64
15
- ndkVersion = "24.0.8215888"
16
- } else {
17
- // Otherwise we default to the side-by-side NDK version from AGP.
18
- ndkVersion = "21.4.7075529"
19
- }
11
+ // We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP.
12
+ ndkVersion = "23.1.7779620"
20
13
  }
21
14
  repositories {
22
15
  google()
23
16
  mavenCentral()
24
17
  }
25
18
  dependencies {
26
- classpath("com.android.tools.build:gradle:7.2.1")
19
+ classpath("com.android.tools.build:gradle:7.3.1")
27
20
  classpath("com.facebook.react:react-native-gradle-plugin")
28
- classpath("de.undercouch:gradle-download-task:5.0.1")
29
- <% if (e2eTestRunner === 'detox') { %>
30
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
31
- <% } %>
32
- // NOTE: Do not place your application dependencies here; they belong
33
- // in the individual module build.gradle files
21
+ classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
34
22
  }
35
23
  }
36
24
 
37
25
  allprojects {
38
26
  repositories {
27
+ <% if (e2eTestRunner === 'detox') { %>
39
28
  maven {
40
- // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
41
- url("$rootDir/../node_modules/react-native/android")
42
- }
43
- maven {
44
- // Android JSC is installed from npm
45
- url("$rootDir/../node_modules/jsc-android/dist")
46
- }
47
- mavenCentral {
48
- // We don't want to fetch react-native from Maven Central as there are
49
- // older versions over there.
50
- content {
51
- excludeGroup "com.facebook.react"
52
- }
29
+ // https://wix.github.io/Detox/docs/introduction/project-setup
30
+ url("$rootDir/../node_modules/detox/Detox-android")
53
31
  }
54
- google()
55
- maven { url 'https://www.jitpack.io' }
32
+ <% } %>
56
33
  }
57
- }
34
+ }
@@ -38,3 +38,7 @@ reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
38
38
  # to write custom TurboModules/Fabric components OR use libraries that
39
39
  # are providing them.
40
40
  newArchEnabled=false
41
+
42
+ # Use this property to enable or disable the Hermes JS engine.
43
+ # If set to false, you will be using JSC instead.
44
+ hermesEnabled=true
@@ -1,22 +1,7 @@
1
1
  rootProject.name = '<%= className %>'
2
2
 
3
3
  include ':react-native-config'
4
- project(':react-native-config').projectDir = new File(rootProject.projectDir, '../../../node_modules/react-native-config/android')
5
-
6
- <% if (e2eTestRunner === 'detox') { %>
7
- include ':detox'
8
- project(':detox').projectDir = new File(rootProject.projectDir, '../node_modules/detox/android/detox')
9
- <% } %>
10
-
11
- apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle");
12
- applyNativeModulesSettingsGradle(settings)
13
-
4
+ project(':react-native-config').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-config/android')
5
+ apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
14
6
  include ':app'
15
7
  includeBuild('../node_modules/react-native-gradle-plugin')
16
-
17
- if (settings.hasProperty("newArchEnabled") && settings.newArchEnabled == "true") {
18
- include(":ReactAndroid")
19
- project(":ReactAndroid").projectDir = file('../node_modules/react-native/ReactAndroid')
20
- include(":ReactAndroid:hermes-engine")
21
- project(":ReactAndroid:hermes-engine").projectDir = file('../node_modules/react-native/ReactAndroid/hermes-engine')
22
- }
@@ -2,8 +2,25 @@ require_relative '<%= offsetFromRoot %>../node_modules/react-native/scripts/reac
2
2
  require_relative '<%= offsetFromRoot %>../node_modules/@react-native-community/cli-platform-ios/native_modules'
3
3
  require_relative '<%= offsetFromRoot %>../node_modules/@nrwl/react-native/nx_post_install'
4
4
 
5
- platform :ios, '12.4'
6
- install! 'cocoapods', :deterministic_uuids => false
5
+ platform :ios, min_ios_version_supported
6
+ prepare_react_native_project!
7
+
8
+ # If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
9
+ # because `react-native-flipper` depends on (FlipperKit,...) that will be excluded
10
+ #
11
+ # To fix this you can also exclude `react-native-flipper` using a `react-native.config.js`
12
+ # ```js
13
+ # module.exports = {
14
+ # dependencies: {
15
+ # ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
16
+ # ```
17
+ flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled
18
+
19
+ linkage = ENV['USE_FRAMEWORKS']
20
+ if linkage != nil
21
+ Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
22
+ use_frameworks! :linkage => linkage.to_sym
23
+ end
7
24
 
8
25
  target '<%= className %>' do
9
26
  config = use_native_modules!
@@ -16,14 +33,13 @@ target '<%= className %>' do
16
33
  # Hermes is now enabled by default. Disable by setting this flag to false.
17
34
  # Upcoming versions of React Native may rely on get_default_flags(), but
18
35
  # we make it explicit here to aid in the React Native upgrade process.
19
- # disabled hermes due to issue https://github.com/facebook/react-native/issues/34599 https://github.com/facebook/react-native/issues/34608
20
- :hermes_enabled => false,
36
+ :hermes_enabled => flags[:hermes_enabled],
21
37
  :fabric_enabled => flags[:fabric_enabled],
22
38
  # Enables Flipper.
23
39
  #
24
40
  # Note that if you have use_frameworks! enabled, Flipper will not work and
25
41
  # you should disable the next line.
26
- :flipper_configuration => FlipperConfiguration.enabled,
42
+ :flipper_configuration => flipper_config,
27
43
  # An absolute path to your application root.
28
44
  :app_path => "#{Pod::Config.instance.installation_root}/.."
29
45
  )
@@ -1,8 +1,6 @@
1
- #import <React/RCTBridgeDelegate.h>
1
+ #import <RCTAppDelegate.h>
2
2
  #import <UIKit/UIKit.h>
3
3
 
4
- @interface AppDelegate : UIResponder <UIApplicationDelegate, RCTBridgeDelegate>
5
-
6
- @property (nonatomic, strong) UIWindow *window;
4
+ @interface AppDelegate : RCTAppDelegate
7
5
 
8
6
  @end
@@ -1,85 +1,17 @@
1
1
  #import "AppDelegate.h"
2
2
 
3
- #import <React/RCTBridge.h>
4
3
  #import <React/RCTBundleURLProvider.h>
5
- #import <React/RCTRootView.h>
6
-
7
- #import <React/RCTAppSetupUtils.h>
8
-
9
- #if RCT_NEW_ARCH_ENABLED
10
- #import <React/CoreModulesPlugins.h>
11
- #import <React/RCTCxxBridgeDelegate.h>
12
- #import <React/RCTFabricSurfaceHostingProxyRootView.h>
13
- #import <React/RCTSurfacePresenter.h>
14
- #import <React/RCTSurfacePresenterBridgeAdapter.h>
15
- #import <ReactCommon/RCTTurboModuleManager.h>
16
-
17
- #import <react/config/ReactNativeConfig.h>
18
-
19
- static NSString *const kRNConcurrentRoot = @"concurrentRoot";
20
-
21
- @interface AppDelegate () <RCTCxxBridgeDelegate, RCTTurboModuleManagerDelegate> {
22
- RCTTurboModuleManager *_turboModuleManager;
23
- RCTSurfacePresenterBridgeAdapter *_bridgeAdapter;
24
- std::shared_ptr<const facebook::react::ReactNativeConfig> _reactNativeConfig;
25
- facebook::react::ContextContainer::Shared _contextContainer;
26
- }
27
- @end
28
- #endif
29
4
 
30
5
  @implementation AppDelegate
31
6
 
32
7
  - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
33
8
  {
34
- RCTAppSetupPrepareApp(application);
35
-
36
- RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
37
-
38
- #if RCT_NEW_ARCH_ENABLED
39
- _contextContainer = std::make_shared<facebook::react::ContextContainer const>();
40
- _reactNativeConfig = std::make_shared<facebook::react::EmptyReactNativeConfig const>();
41
- _contextContainer->insert("ReactNativeConfig", _reactNativeConfig);
42
- _bridgeAdapter = [[RCTSurfacePresenterBridgeAdapter alloc] initWithBridge:bridge contextContainer:_contextContainer];
43
- bridge.surfacePresenter = _bridgeAdapter.surfacePresenter;
44
- #endif
45
-
46
- NSDictionary *initProps = [self prepareInitialProps];
47
- UIView *rootView = RCTAppSetupDefaultRootView(bridge, @"<%= className %>", initProps);
48
-
49
- if (@available(iOS 13.0, *)) {
50
- rootView.backgroundColor = [UIColor systemBackgroundColor];
51
- } else {
52
- rootView.backgroundColor = [UIColor whiteColor];
53
- }
9
+ self.moduleName = @"<%= className %>";
10
+ // You can add your custom initial props in the dictionary below.
11
+ // They will be passed down to the ViewController used by React Native.
12
+ self.initialProps = @{};
54
13
 
55
- self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
56
- UIViewController *rootViewController = [UIViewController new];
57
- rootViewController.view = rootView;
58
- self.window.rootViewController = rootViewController;
59
- [self.window makeKeyAndVisible];
60
- return YES;
61
- }
62
-
63
- /// This method controls whether the `concurrentRoot`feature of React18 is turned on or off.
64
- ///
65
- /// @see: https://reactjs.org/blog/2022/03/29/react-v18.html
66
- /// @note: This requires to be rendering on Fabric (i.e. on the New Architecture).
67
- /// @return: `true` if the `concurrentRoot` feture is enabled. Otherwise, it returns `false`.
68
- - (BOOL)concurrentRootEnabled
69
- {
70
- // Switch this bool to turn on and off the concurrent root
71
- return true;
72
- }
73
-
74
- - (NSDictionary *)prepareInitialProps
75
- {
76
- NSMutableDictionary *initProps = [NSMutableDictionary new];
77
-
78
- #ifdef RCT_NEW_ARCH_ENABLED
79
- initProps[kRNConcurrentRoot] = @([self concurrentRootEnabled]);
80
- #endif
81
-
82
- return initProps;
14
+ return [super application:application didFinishLaunchingWithOptions:launchOptions];
83
15
  }
84
16
 
85
17
  - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
@@ -91,43 +23,14 @@ static NSString *const kRNConcurrentRoot = @"concurrentRoot";
91
23
  #endif
92
24
  }
93
25
 
94
- #if RCT_NEW_ARCH_ENABLED
95
-
96
- #pragma mark - RCTCxxBridgeDelegate
97
-
98
- - (std::unique_ptr<facebook::react::JSExecutorFactory>)jsExecutorFactoryForBridge:(RCTBridge *)bridge
99
- {
100
- _turboModuleManager = [[RCTTurboModuleManager alloc] initWithBridge:bridge
101
- delegate:self
102
- jsInvoker:bridge.jsCallInvoker];
103
- return RCTAppSetupDefaultJsExecutorFactory(bridge, _turboModuleManager);
104
- }
105
-
106
- #pragma mark RCTTurboModuleManagerDelegate
107
-
108
- - (Class)getModuleClassFromName:(const char *)name
109
- {
110
- return RCTCoreModulesClassProvider(name);
111
- }
112
-
113
- - (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:(const std::string &)name
114
- jsInvoker:(std::shared_ptr<facebook::react::CallInvoker>)jsInvoker
115
- {
116
- return nullptr;
117
- }
118
-
119
- - (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:(const std::string &)name
120
- initParams:
121
- (const facebook::react::ObjCTurboModule::InitParams &)params
122
- {
123
- return nullptr;
124
- }
125
-
126
- - (id<RCTTurboModule>)getModuleInstanceFromClass:(Class)moduleClass
26
+ /// This method controls whether the `concurrentRoot`feature of React18 is turned on or off.
27
+ ///
28
+ /// @see: https://reactjs.org/blog/2022/03/29/react-v18.html
29
+ /// @note: This requires to be rendering on Fabric (i.e. on the New Architecture).
30
+ /// @return: `true` if the `concurrentRoot` feature is enabled. Otherwise, it returns `false`.
31
+ - (BOOL)concurrentRootEnabled
127
32
  {
128
- return RCTAppSetupDefaultModuleFromClass(moduleClass);
33
+ return true;
129
34
  }
130
35
 
131
- #endif
132
-
133
36
  @end
@@ -17,11 +17,11 @@
17
17
  <key>CFBundlePackageType</key>
18
18
  <string>APPL</string>
19
19
  <key>CFBundleShortVersionString</key>
20
- <string>1.0</string>
20
+ <string>$(MARKETING_VERSION)</string>
21
21
  <key>CFBundleSignature</key>
22
22
  <string>????</string>
23
23
  <key>CFBundleVersion</key>
24
- <string>1</string>
24
+ <string>$(CURRENT_PROJECT_VERSION)</string>
25
25
  <key>LSRequiresIPhoneOS</key>
26
26
  <true/>
27
27
  <key>NSAppTransportSecurity</key>
@@ -492,6 +492,7 @@
492
492
  "$(inherited)",
493
493
  "@executable_path/Frameworks",
494
494
  );
495
+ MARKETING_VERSION = 1.0;
495
496
  OTHER_LDFLAGS = (
496
497
  "$(inherited)",
497
498
  "-ObjC",
@@ -517,6 +518,7 @@
517
518
  "$(inherited)",
518
519
  "@executable_path/Frameworks",
519
520
  );
521
+ MARKETING_VERSION = 1.0;
520
522
  OTHER_LDFLAGS = (
521
523
  "$(inherited)",
522
524
  "-ObjC",
@@ -562,7 +564,7 @@
562
564
  COPY_PHASE_STRIP = NO;
563
565
  ENABLE_STRICT_OBJC_MSGSEND = YES;
564
566
  ENABLE_TESTABILITY = YES;
565
- "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386;
567
+ "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
566
568
  GCC_C_LANGUAGE_STANDARD = gnu99;
567
569
  GCC_DYNAMIC_NO_PIC = NO;
568
570
  GCC_NO_COMMON_BLOCKS = YES;
@@ -633,7 +635,7 @@
633
635
  COPY_PHASE_STRIP = YES;
634
636
  ENABLE_NS_ASSERTIONS = NO;
635
637
  ENABLE_STRICT_OBJC_MSGSEND = YES;
636
- "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386;
638
+ "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
637
639
  GCC_C_LANGUAGE_STANDARD = gnu99;
638
640
  GCC_NO_COMMON_BLOCKS = YES;
639
641
  GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
@@ -0,0 +1,10 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <Workspace
3
+ version = "1.0">
4
+ <FileRef
5
+ location = "group:<%= className %>.xcodeproj">
6
+ </FileRef>
7
+ <FileRef
8
+ location = "group:Pods/Pods.xcodeproj">
9
+ </FileRef>
10
+ </Workspace>
@@ -162,7 +162,7 @@ export const App = () => {
162
162
  style={[styles.listItem, styles.learning]}
163
163
  onPress={() =>
164
164
  Linking.openURL(
165
- 'https://www.youtube.com/c/Nrwl_io/videos?utm_source=nx-project'
165
+ 'https://www.youtube.com/@NxDevtools/videos?utm_source=nx-project'
166
166
  )
167
167
  }
168
168
  >
@@ -7,7 +7,8 @@ const run_tasks_in_serial_1 = require("@nrwl/workspace/src/utilities/run-tasks-i
7
7
  const add_babel_inputs_1 = require("@nrwl/js/src/utils/add-babel-inputs");
8
8
  const jest_1 = require("@nrwl/jest");
9
9
  const detox_1 = require("@nrwl/detox");
10
- const versions_1 = require("../../utils/versions");
10
+ const versions_1 = require("@nrwl/react/src/utils/versions");
11
+ const versions_2 = require("../../utils/versions");
11
12
  const add_git_ignore_entry_1 = require("./lib/add-git-ignore-entry");
12
13
  function reactNativeInitGenerator(host, schema) {
13
14
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
@@ -37,13 +38,13 @@ exports.reactNativeInitGenerator = reactNativeInitGenerator;
37
38
  function updateDependencies(host) {
38
39
  const isPnpm = (0, devkit_1.detectPackageManager)(host.root) === 'pnpm';
39
40
  return (0, devkit_1.addDependenciesToPackageJson)(host, {
40
- react: versions_1.reactVersion,
41
- 'react-dom': versions_1.reactDomVersion,
42
- 'react-native': versions_1.reactNativeVersion,
43
- }, Object.assign({ '@nrwl/react-native': versions_1.nxVersion, '@types/node': versions_1.typesNodeVersion, '@types/react': versions_1.typesReactVersion, '@types/react-native': versions_1.typesReactNativeVersion, '@react-native-community/cli': versions_1.reactNativeCommunityCli, '@react-native-community/cli-platform-android': versions_1.reactNativeCommunityCliAndroid, '@react-native-community/cli-platform-ios': versions_1.reactNativeCommunityCliIos, '@testing-library/react-native': versions_1.testingLibraryReactNativeVersion, '@testing-library/jest-native': versions_1.testingLibraryJestNativeVersion, 'jest-react-native': versions_1.jestReactNativeVersion, metro: versions_1.metroVersion, 'metro-resolver': versions_1.metroVersion, 'metro-babel-register': versions_1.metroVersion, 'metro-react-native-babel-preset': versions_1.metroVersion, 'metro-react-native-babel-transformer': versions_1.metroVersion, 'react-test-renderer': versions_1.reactTestRendererVersion, 'react-native-svg-transformer': versions_1.reactNativeSvgTransformerVersion, 'react-native-svg': versions_1.reactNativeSvgVersion, 'react-native-config': versions_1.reactNativeConfigVersion, '@react-native-async-storage/async-storage': versions_1.reactNativeAsyncStorageAsyncStorageVersion }, (isPnpm
41
+ react: versions_2.reactVersion,
42
+ 'react-dom': versions_2.reactDomVersion,
43
+ 'react-native': versions_2.reactNativeVersion,
44
+ }, Object.assign({ '@nrwl/react-native': versions_2.nxVersion, '@types/node': versions_2.typesNodeVersion, '@types/react': versions_2.typesReactVersion, '@types/react-native': versions_2.typesReactNativeVersion, '@react-native-community/cli': versions_2.reactNativeCommunityCli, '@react-native-community/cli-platform-android': versions_2.reactNativeCommunityCliAndroid, '@react-native-community/cli-platform-ios': versions_2.reactNativeCommunityCliIos, '@testing-library/react-native': versions_2.testingLibraryReactNativeVersion, '@testing-library/jest-native': versions_2.testingLibraryJestNativeVersion, 'jest-react-native': versions_2.jestReactNativeVersion, metro: versions_2.metroVersion, 'metro-resolver': versions_2.metroVersion, 'metro-babel-register': versions_2.metroVersion, 'metro-react-native-babel-preset': versions_2.metroVersion, 'metro-react-native-babel-transformer': versions_2.metroVersion, 'react-test-renderer': versions_2.reactTestRendererVersion, 'react-native-svg-transformer': versions_2.reactNativeSvgTransformerVersion, 'react-native-svg': versions_2.reactNativeSvgVersion, 'react-native-config': versions_2.reactNativeConfigVersion, '@react-native-async-storage/async-storage': versions_2.reactNativeAsyncStorageAsyncStorageVersion, '@babel/preset-react': versions_1.babelPresetReactVersion }, (isPnpm
44
45
  ? {
45
- 'metro-config': versions_1.metroVersion,
46
- '@babel/runtime': versions_1.babelRuntimeVersion, // @babel/runtime is used by react-native-svg
46
+ 'metro-config': versions_2.metroVersion,
47
+ '@babel/runtime': versions_2.babelRuntimeVersion, // @babel/runtime is used by react-native-svg
47
48
  }
48
49
  : {})));
49
50
  }
@@ -1 +1 @@
1
- {"version":3,"file":"init.js","sourceRoot":"","sources":["../../../../../../packages/react-native/src/generators/init/init.ts"],"names":[],"mappings":";;;;AAAA,yCAQsB;AAEtB,2FAAqF;AACrF,0EAAqE;AAErE,qCAA+C;AAC/C,uCAAiD;AAEjD,mDAqB8B;AAE9B,qEAA+D;AAE/D,SAAsB,wBAAwB,CAAC,IAAU,EAAE,MAAc;;QACvE,IAAA,wCAAiB,EAAC,IAAI,CAAC,CAAC;QACxB,IAAA,iCAAc,EAAC,IAAI,CAAC,CAAC;QAErB,MAAM,KAAK,GAAwB,EAAE,CAAC;QAEtC,IAAI,CAAC,MAAM,CAAC,eAAe,EAAE;YAC3B,MAAM,WAAW,GAAG,kBAAkB,CAAC,IAAI,CAAC,CAAC;YAE7C,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC;YACjC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;SACzB;QAED,IAAI,CAAC,MAAM,CAAC,c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C,sCAAsC,EAAE,uBAAY,EACpD,qBAAqB,EAAE,mCAAwB,EAC/C,8BAA8B,EAAE,2CAAgC,EAChE,kBAAkB,EAAE,gCAAqB,EACzC,qBAAqB,EAAE,mCAAwB,EAC/C,2CAA2C,EACzC,qDAA0C,IACzC,CAAC,MAAM;QACR,CAAC,CAAC;YACE,cAAc,EAAE,uBAAY;YAC5B,gBAAgB,EAAE,8BAAmB,EAAE,6CAA6C;SACrF;QACH,CAAC,CAAC,EAAE,CAAC,EAEV,CAAC;AACJ,CAAC;AAxCD,gDAwCC;AAED,SAAS,cAAc,CAAC,IAAU;IAChC,OAAO,IAAA,0CAAiC,EAAC,IAAI,EAAE,CAAC,oBAAoB,CAAC,EAAE,EAAE,CAAC,CAAC;AAC7E,CAAC;AAED,kBAAe,wBAAwB,CAAC;AAC3B,QAAA,wBAAwB,GAAG,IAAA,2BAAkB,EACxD,wBAAwB,CACzB,CAAC"}
1
+ {"version":3,"file":"init.js","sourceRoot":"","sources":["../../../../../../packages/react-native/src/generators/init/init.ts"],"names":[],"mappings":";;;;AAAA,yCAQsB;AAEtB,2FAAqF;AACrF,0EAAqE;AACrE,qCAA+C;AAC/C,uCAAiD;AACjD,6DAAyE;AAEzE,mDAqB8B;AAE9B,qEAA+D;AAE/D,SAAsB,wBAAwB,CAAC,IAAU,EAAE,MAAc;;QACvE,IAAA,wCAAiB,EAAC,IAAI,CAAC,CAAC;QACxB,IAAA,iCAAc,EAAC,IAAI,CAAC,CAAC;QAErB,MAAM,KAAK,GAAwB,EAAE,CAAC;QAEtC,IAAI,CAAC,MAAM,CAAC,eAAe,EAAE;YAC3B,MAAM,WAAW,GAAG,kBAAkB,CAAC,IAAI,CAAC,CAAC;YAE7C,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC;YACjC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;SACzB;QAED,IAAI,CAAC,MAAM,CAAC,cAAc,IAAI,MAAM,CAAC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Y,EACpD,qBAAqB,EAAE,mCAAwB,EAC/C,8BAA8B,EAAE,2CAAgC,EAChE,kBAAkB,EAAE,gCAAqB,EACzC,qBAAqB,EAAE,mCAAwB,EAC/C,2CAA2C,EACzC,qDAA0C,EAC5C,qBAAqB,EAAE,kCAAuB,IAC3C,CAAC,MAAM;QACR,CAAC,CAAC;YACE,cAAc,EAAE,uBAAY;YAC5B,gBAAgB,EAAE,8BAAmB,EAAE,6CAA6C;SACrF;QACH,CAAC,CAAC,EAAE,CAAC,EAEV,CAAC;AACJ,CAAC;AAzCD,gDAyCC;AAED,SAAS,cAAc,CAAC,IAAU;IAChC,OAAO,IAAA,0CAAiC,EAAC,IAAI,EAAE,CAAC,oBAAoB,CAAC,EAAE,EAAE,CAAC,CAAC;AAC7E,CAAC;AAED,kBAAe,wBAAwB,CAAC;AAC3B,QAAA,wBAAwB,GAAG,IAAA,2BAAkB,EACxD,wBAAwB,CACzB,CAAC"}
@@ -1 +1 @@
1
- export declare const gitIgnoreEntriesForReactNative = "\n# React Native\n\n# Xcode\n#\nbuild/\n*.pbxuser\n!default.pbxuser\n*.mode1v3\n!default.mode1v3\n*.mode2v3\n!default.mode2v3\n*.perspectivev3\n!default.perspectivev3\nxcuserdata\n*.xccheckout\n*.moved-aside\nDerivedData\n*.hmap\n*.ipa\n*.xcuserstate\n**/ios/.xcode.env.local\n\n# Android/IntelliJ\n#\nbuild/\n.idea\n.gradle\nlocal.properties\n*.iml\n*.hprof\n\n# node.js\n#\n.yarn/\nnode_modules/\nnpm-debug.log\nyarn-error.log\n\n# BUCK\nbuck-out/\n.buckd/\n*.keystore\n!debug.keystore\n\n# fastlane\n#\n# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the\n# screenshots whenever they are needed.\n# For more information about the recommended setup visit:\n# https://docs.fastlane.tools/best-practices/source-control/\n\n**/fastlane/report.xml\n**/fastlane/Preview.html\n**/fastlane/screenshots\n**/fastlane/test_output\n\n# Bundle artifact\n*.jsbundle\n\n# Ruby / CocoaPods\n**/ios/Pods/\n**/vendor/bundle/\n";
1
+ export declare const gitIgnoreEntriesForReactNative = "\n# React Native\n\n# OSX\n#\n.DS_Store\n\n# Xcode\n#\nbuild/\n*.pbxuser\n!default.pbxuser\n*.mode1v3\n!default.mode1v3\n*.mode2v3\n!default.mode2v3\n*.perspectivev3\n!default.perspectivev3\nxcuserdata\n*.xccheckout\n*.moved-aside\nDerivedData\n*.hmap\n*.ipa\n*.xcuserstate\nios/.xcode.env.local\n\n# Android/IntelliJ\n#\nbuild/\n.idea\n.gradle\nlocal.properties\n*.iml\n*.hprof\n.cxx/\n*.keystore\n!debug.keystore\n\n# node.js\n#\nnode_modules/\nnpm-debug.log\nyarn-error.log\n\n# fastlane\n#\n# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the\n# screenshots whenever they are needed.\n# For more information about the recommended setup visit:\n# https://docs.fastlane.tools/best-practices/source-control/\n\n**/fastlane/report.xml\n**/fastlane/Preview.html\n**/fastlane/screenshots\n**/fastlane/test_output\n\n# Bundle artifact\n*.jsbundle\n\n# Ruby / CocoaPods\n/ios/Pods/\n/vendor/bundle/\n\n# Temporary files created by Metro to check the health of the file watcher\n.metro-health-check*\n\n# testing\n/coverage\n";
@@ -1,9 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.gitIgnoreEntriesForReactNative = void 0;
4
+ // template from https://github.com/facebook/react-native/blob/main/template/_gitignore
4
5
  exports.gitIgnoreEntriesForReactNative = `
5
6
  # React Native
6
7
 
8
+ # OSX
9
+ #
10
+ .DS_Store
11
+
7
12
  # Xcode
8
13
  #
9
14
  build/
@@ -22,7 +27,7 @@ DerivedData
22
27
  *.hmap
23
28
  *.ipa
24
29
  *.xcuserstate
25
- **/ios/.xcode.env.local
30
+ ios/.xcode.env.local
26
31
 
27
32
  # Android/IntelliJ
28
33
  #
@@ -32,20 +37,16 @@ build/
32
37
  local.properties
33
38
  *.iml
34
39
  *.hprof
40
+ .cxx/
41
+ *.keystore
42
+ !debug.keystore
35
43
 
36
44
  # node.js
37
45
  #
38
- .yarn/
39
46
  node_modules/
40
47
  npm-debug.log
41
48
  yarn-error.log
42
49
 
43
- # BUCK
44
- buck-out/
45
- \.buckd/
46
- *.keystore
47
- !debug.keystore
48
-
49
50
  # fastlane
50
51
  #
51
52
  # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
@@ -62,7 +63,13 @@ buck-out/
62
63
  *.jsbundle
63
64
 
64
65
  # Ruby / CocoaPods
65
- **/ios/Pods/
66
- **/vendor/bundle/
66
+ /ios/Pods/
67
+ /vendor/bundle/
68
+
69
+ # Temporary files created by Metro to check the health of the file watcher
70
+ .metro-health-check*
71
+
72
+ # testing
73
+ /coverage
67
74
  `;
68
75
  //# sourceMappingURL=gitignore-entries.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"gitignore-entries.js","sourceRoot":"","sources":["../../../../../../../packages/react-native/src/generators/init/lib/gitignore-entries.ts"],"names":[],"mappings":";;;AAAa,QAAA,8BAA8B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+D7C,CAAC"}
1
+ {"version":3,"file":"gitignore-entries.js","sourceRoot":"","sources":["../../../../../../../packages/react-native/src/generators/init/lib/gitignore-entries.ts"],"names":[],"mappings":";;;AAAA,uFAAuF;AAC1E,QAAA,8BAA8B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqE7C,CAAC"}
@@ -35,7 +35,6 @@ describe('react-native:storybook-configuration', () => {
35
35
  appTree.write('.gitignore', '');
36
36
  await storybookConfigurationGenerator(appTree, {
37
37
  name: 'test-ui-lib',
38
- standaloneConfig: false,
39
38
  });
40
39
 
41
40
  expect(
@@ -55,7 +54,6 @@ describe('react-native:storybook-configuration', () => {
55
54
  await storybookConfigurationGenerator(appTree, {
56
55
  name: 'test-ui-lib',
57
56
  generateStories: true,
58
- standaloneConfig: false,
59
57
  });
60
58
 
61
59
  expect(
@@ -71,7 +69,6 @@ describe('react-native:storybook-configuration', () => {
71
69
  appTree = await createTestAppLib('test-ui-app');
72
70
  await storybookConfigurationGenerator(appTree, {
73
71
  name: 'test-ui-app',
74
- standaloneConfig: false,
75
72
  });
76
73
 
77
74
  expect(
@@ -87,7 +84,6 @@ describe('react-native:storybook-configuration', () => {
87
84
  await storybookConfigurationGenerator(appTree, {
88
85
  name: 'test-ui-app',
89
86
  generateStories: true,
90
- standaloneConfig: false,
91
87
  });
92
88
 
93
89
  // Currently the auto-generate stories feature only picks up components under the 'lib' directory.
@@ -42,7 +42,9 @@
42
42
  },
43
43
  "standaloneConfig": {
44
44
  "description": "Split the project configuration into `<projectRoot>/project.json` rather than including it inside `workspace.json`.",
45
- "type": "boolean"
45
+ "type": "boolean",
46
+ "default": true,
47
+ "x-deprecated": "Nx only supports standaloneConfig"
46
48
  },
47
49
  "ignorePaths": {
48
50
  "type": "array",
@@ -1,5 +1,5 @@
1
- import { UpgradeNativeConfigureSchema } from './schema';
2
1
  import { Tree, GeneratorCallback } from '@nrwl/devkit';
2
+ import { UpgradeNativeConfigureSchema } from './schema';
3
3
  export declare function reactNativeUpgradeNativeGenerator(host: Tree, schema: UpgradeNativeConfigureSchema): Promise<GeneratorCallback>;
4
4
  export default reactNativeUpgradeNativeGenerator;
5
5
  export declare const reactNativeUpgradeNativeSchematic: (generatorOptions: UpgradeNativeConfigureSchema) => (tree: any, context: any) => Promise<any>;
@@ -8,26 +8,24 @@ const tslib_1 = require("tslib");
8
8
  */
9
9
  const run_tasks_in_serial_1 = require("@nrwl/workspace/src/utilities/run-tasks-in-serial");
10
10
  const devkit_1 = require("@nrwl/devkit");
11
- const path_1 = require("path");
12
- const create_native_files_1 = require("./lib/create-native-files");
13
- const fs_extra_1 = require("fs-extra");
11
+ const fs_1 = require("fs");
14
12
  const pod_install_task_1 = require("../../utils/pod-install-task");
15
- const chmod_task_1 = require("../../utils/chmod-task");
13
+ const chmod_android_gradle_files_1 = require("../../utils/chmod-android-gradle-files");
14
+ const create_native_files_1 = require("./lib/create-native-files");
16
15
  function reactNativeUpgradeNativeGenerator(host, schema) {
17
16
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
18
17
  const { projectType, root: appProjectRoot } = (0, devkit_1.readProjectConfiguration)(host, schema.name);
19
18
  const iosProjectRoot = (0, devkit_1.joinPathFragments)(host.root, appProjectRoot, 'ios');
20
19
  const androidProjectRoot = (0, devkit_1.joinPathFragments)(host.root, appProjectRoot, 'android');
21
20
  if (projectType !== 'application' ||
22
- !(0, fs_extra_1.existsSync)(iosProjectRoot) ||
23
- !(0, fs_extra_1.existsSync)(androidProjectRoot)) {
21
+ !(0, fs_1.existsSync)(iosProjectRoot) ||
22
+ !(0, fs_1.existsSync)(androidProjectRoot)) {
24
23
  throw new Error(`Could not upgrade React Native code for ${schema.name}`);
25
24
  }
26
25
  (0, create_native_files_1.createNativeFiles)(host, schema, appProjectRoot);
27
26
  const podInstallTask = (0, pod_install_task_1.runPodInstall)(iosProjectRoot, schema.install);
28
- const chmodTaskGradlew = (0, chmod_task_1.runChmod)((0, path_1.join)(androidProjectRoot, 'gradlew'), 0o775);
29
- const chmodTaskGradlewBat = (0, chmod_task_1.runChmod)((0, path_1.join)(androidProjectRoot, 'gradlew.bat'), 0o775);
30
- return (0, run_tasks_in_serial_1.runTasksInSerial)(podInstallTask, chmodTaskGradlew, chmodTaskGradlewBat);
27
+ const chmodTaskGradlew = (0, chmod_android_gradle_files_1.chmodAndroidGradlewFilesTask)(androidProjectRoot);
28
+ return (0, run_tasks_in_serial_1.runTasksInSerial)(podInstallTask, chmodTaskGradlew);
31
29
  });
32
30
  }
33
31
  exports.reactNativeUpgradeNativeGenerator = reactNativeUpgradeNativeGenerator;
@@ -1 +1 @@
1
- {"version":3,"file":"upgrade-native.js","sourceRoot":"","sources":["../../../../../../packages/react-native/src/gener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AED,kBAAe,iCAAiC,CAAC;AACpC,QAAA,iCAAiC,GAAG,IAAA,2BAAkB,EACjE,iCAAiC,CAClC,CAAC"}
1
+ {"version":3,"file":"upgrade-native.js","sourceRoot":"","sources":["../../../../../../packages/react-native/src/generators/upgrade-native/upgrade-native.ts"],"names":[],"mappings":";;;;AAAA;;;GAGG;AACH,2FAAqF;AACrF,yCAMsB;AACtB,2BAAgC;AAEhC,mEAA6D;AAC7D,uFAAsF;AAEtF,mEAA8D;AAG9D,SAAsB,iCAAiC,CACrD,IAAU,EACV,MAAoC;;QAEpC,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,cAAc,EAAE,GAAG,IAAA,iCAAwB,EACpE,IAAI,EACJ,MAAM,CAAC,IAAI,CACZ,CAAC;QACF,MAAM,cAAc,GAAG,IAAA,0BAAiB,EAAC,IAAI,CAAC,IAAI,EAAE,cAAc,EAAE,KAAK,CAAC,CAAC;QAC3E,MAAM,kBAAkB,GAAG,IAAA,0BAAiB,EAC1C,IAAI,CAAC,IAAI,EACT,cAAc,EACd,SAAS,CACV,CAAC;QAEF,IACE,WAAW,KAAK,aAAa;YAC7B,CAAC,IAAA,eAAU,EAAC,cAAc,CAAC;YAC3B,CAAC,IAAA,eAAU,EAAC,kBAAkB,CAAC,EAC/B;YACA,MAAM,IAAI,KAAK,CAAC,2CAA2C,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;SAC3E;QAED,IAAA,uCAAiB,EAAC,IAAI,EAAE,MAAM,EAAE,cAAc,CAAC,CAAC;QAEhD,MAAM,cAAc,GAAG,IAAA,gCAAa,EAAC,cAAc,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;QACrE,MAAM,gBAAgB,GAAG,IAAA,yDAA4B,EAAC,kBAAkB,CAAC,CAAC;QAE1E,OAAO,IAAA,sCAAgB,EAAC,cAAc,EAAE,gBAAgB,CAAC,CAAC;IAC5D,CAAC;CAAA;AA7BD,8EA6BC;AAED,kBAAe,iCAAiC,CAAC;AACpC,QAAA,iCAAiC,GAAG,IAAA,2BAAkB,EACjE,iCAAiC,CAClC,CAAC"}
@@ -15,7 +15,7 @@ describe('Add Linting', () => {
15
15
  });
16
16
  });
17
17
 
18
- it('should add update `workspace.json` file properly when eslint is passed', () => {
18
+ it('should add update configuration when eslint is passed', () => {
19
19
  addLinting(tree, {
20
20
  projectName: 'my-lib',
21
21
  linter: Linter.EsLint,
@@ -0,0 +1,3 @@
1
+ import { GeneratorCallback } from '@nrwl/devkit';
2
+ export declare function chmodAndroidGradlewFiles(androidFolder: string): void;
3
+ export declare function chmodAndroidGradlewFilesTask(androidFolder: string): GeneratorCallback;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.chmodAndroidGradlewFilesTask = exports.chmodAndroidGradlewFiles = void 0;
4
+ const devkit_1 = require("@nrwl/devkit");
5
+ const fs_1 = require("fs");
6
+ const path_1 = require("path");
7
+ function chmodAndroidGradlewFiles(androidFolder) {
8
+ (0, fs_1.chmodSync)((0, path_1.join)(androidFolder, 'gradlew'), 0o775);
9
+ (0, fs_1.chmodSync)((0, path_1.join)(androidFolder, 'gradlew.bat'), 0o775);
10
+ }
11
+ exports.chmodAndroidGradlewFiles = chmodAndroidGradlewFiles;
12
+ function chmodAndroidGradlewFilesTask(androidFolder) {
13
+ return () => {
14
+ devkit_1.logger.info(`chmod android gradlew files under ${androidFolder}`);
15
+ try {
16
+ chmodAndroidGradlewFiles(androidFolder);
17
+ }
18
+ catch (_a) {
19
+ throw new Error(`chmod failed gradlew file under ${androidFolder}`);
20
+ }
21
+ };
22
+ }
23
+ exports.chmodAndroidGradlewFilesTask = chmodAndroidGradlewFilesTask;
24
+ //# sourceMappingURL=chmod-android-gradle-files.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chmod-android-gradle-files.js","sourceRoot":"","sources":["../../../../../packages/react-native/src/utils/chmod-android-gradle-files.ts"],"names":[],"mappings":";;;AAAA,yCAAyD;AACzD,2BAA+B;AAC/B,+BAA4B;AAE5B,SAAgB,wBAAwB,CAAC,aAAqB;IAC5D,IAAA,cAAS,EAAC,IAAA,WAAI,EAAC,aAAa,EAAE,SAAS,CAAC,EAAE,KAAK,CAAC,CAAC;IACjD,IAAA,cAAS,EAAC,IAAA,WAAI,EAAC,aAAa,EAAE,aAAa,CAAC,EAAE,KAAK,CAAC,CAAC;AACvD,CAAC;AAHD,4DAGC;AAED,SAAgB,4BAA4B,CAC1C,aAAqB;IAErB,OAAO,GAAG,EAAE;QACV,eAAM,CAAC,IAAI,CAAC,qCAAqC,aAAa,EAAE,CAAC,CAAC;QAClE,IAAI;YACF,wBAAwB,CAAC,aAAa,CAAC,CAAC;SACzC;QAAC,WAAM;YACN,MAAM,IAAI,KAAK,CAAC,mCAAmC,aAAa,EAAE,CAAC,CAAC;SACrE;IACH,CAAC,CAAC;AACJ,CAAC;AAXD,oEAWC"}