Skip to content

Commit 64d3408

Browse files
Nivaldo Bondançafacebook-github-bot
authored andcommitted
Update ktfmt component on FBS:master (#53956)
Summary: X-link: https://github.com/facebookexternal/meta-ar-mr-tooling/pull/200 Pull Request resolved: #53956 Reviewed By: jselbo Differential Revision: D82570814 fbshipit-source-id: 6eeade55734548d057c5eae77a9188172473a819
1 parent b9dcc1b commit 64d3408

17 files changed

Lines changed: 445 additions & 445 deletions

File tree

packages/gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactRootProjectPlugin.kt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,18 +67,18 @@ class ReactRootProjectPlugin : Plugin<Project> {
6767
) {
6868
project.logger.error(
6969
"""
70-
********************************************************************************
70+
********************************************************************************
7171
72-
WARNING: Setting `newArchEnabled=false` in your `gradle.properties` file is not
73-
supported anymore since React Native 0.82.
74-
75-
You can remove the line from your `gradle.properties` file.
76-
77-
The application will run with the New Architecture enabled by default.
72+
WARNING: Setting `newArchEnabled=false` in your `gradle.properties` file is not
73+
supported anymore since React Native 0.82.
7874
79-
********************************************************************************
75+
You can remove the line from your `gradle.properties` file.
8076
81-
"""
77+
The application will run with the New Architecture enabled by default.
78+
79+
********************************************************************************
80+
81+
"""
8282
.trimIndent()
8383
)
8484
}

packages/gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/GenerateAutolinkingNewArchitecturesFileTask.kt

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -168,13 +168,13 @@ abstract class GenerateAutolinkingNewArchitecturesFileTask : DefaultTask() {
168168
# This code was generated by [React Native](https://www.npmjs.com/package/@react-native/gradle-plugin)
169169
cmake_minimum_required(VERSION 3.13)
170170
set(CMAKE_VERBOSE_MAKEFILE on)
171-
171+
172172
# We set REACTNATIVE_MERGED_SO so libraries/apps can selectively decide to depend on either libreactnative.so
173173
# or link against a old prefab target (this is needed for React Native 0.76 on).
174174
set(REACTNATIVE_MERGED_SO true)
175-
175+
176176
{{ libraryIncludes }}
177-
177+
178178
set(AUTOLINKED_LIBRARIES
179179
{{ libraryModules }}
180180
)
@@ -191,28 +191,28 @@ abstract class GenerateAutolinkingNewArchitecturesFileTask : DefaultTask() {
191191
* once the code is regenerated.
192192
*
193193
*/
194-
194+
195195
#include "autolinking.h"
196196
{{ autolinkingCppIncludes }}
197-
197+
198198
namespace facebook {
199199
namespace react {
200-
200+
201201
std::shared_ptr<TurboModule> autolinking_ModuleProvider(const std::string moduleName, const JavaTurboModule::InitParams &params) {
202202
{{ autolinkingCppTurboModuleJavaProviders }}
203203
return nullptr;
204204
}
205-
205+
206206
std::shared_ptr<TurboModule> autolinking_cxxModuleProvider(const std::string moduleName, const std::shared_ptr<CallInvoker>& jsInvoker) {
207207
{{ autolinkingCppTurboModuleCxxProviders }}
208208
return nullptr;
209209
}
210-
210+
211211
void autolinking_registerProviders(std::shared_ptr<ComponentDescriptorProviderRegistry const> providerRegistry) {
212212
{{ autolinkingCppComponentDescriptors }}
213213
return;
214214
}
215-
215+
216216
} // namespace react
217217
} // namespace facebook
218218
"""
@@ -228,22 +228,22 @@ abstract class GenerateAutolinkingNewArchitecturesFileTask : DefaultTask() {
228228
* once the code is regenerated.
229229
*
230230
*/
231-
231+
232232
#pragma once
233-
233+
234234
#include <ReactCommon/CallInvoker.h>
235235
#include <ReactCommon/JavaTurboModule.h>
236236
#include <ReactCommon/TurboModule.h>
237237
#include <jsi/jsi.h>
238238
#include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
239-
239+
240240
namespace facebook {
241241
namespace react {
242-
242+
243243
std::shared_ptr<TurboModule> autolinking_ModuleProvider(const std::string moduleName, const JavaTurboModule::InitParams &params);
244244
std::shared_ptr<TurboModule> autolinking_cxxModuleProvider(const std::string moduleName, const std::shared_ptr<CallInvoker>& jsInvoker);
245245
void autolinking_registerProviders(std::shared_ptr<ComponentDescriptorProviderRegistry const> providerRegistry);
246-
246+
247247
} // namespace react
248248
} // namespace facebook
249249
"""

packages/gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/GenerateEntryPointTask.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,19 +65,19 @@ abstract class GenerateEntryPointTask : DefaultTask() {
6565
val generatedFileContentsTemplate =
6666
"""
6767
package com.facebook.react;
68-
68+
6969
import android.app.Application;
7070
import android.content.Context;
7171
import android.content.res.Resources;
72-
72+
7373
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
7474
import com.facebook.react.common.annotations.internal.LegacyArchitectureLogger;
7575
import com.facebook.react.views.view.WindowUtilKt;
7676
import com.facebook.react.soloader.OpenSourceMergedSoMapping;
7777
import com.facebook.soloader.SoLoader;
78-
78+
7979
import java.io.IOException;
80-
80+
8181
/**
8282
* This class is the entry point for loading React Native using the configuration
8383
* that the users specifies in their .gradle files.
@@ -102,7 +102,7 @@ abstract class GenerateEntryPointTask : DefaultTask() {
102102
}
103103
}
104104
}
105-
"""
105+
"""
106106
.trimIndent()
107107
}
108108
}

packages/gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/GeneratePackageListTask.kt

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -137,61 +137,61 @@ abstract class GeneratePackageListTask : DefaultTask() {
137137
val generatedFileContentsTemplate =
138138
"""
139139
package com.facebook.react;
140-
140+
141141
import android.app.Application;
142142
import android.content.Context;
143143
import android.content.res.Resources;
144-
144+
145145
import com.facebook.react.ReactPackage;
146146
import com.facebook.react.shell.MainPackageConfig;
147147
import com.facebook.react.shell.MainReactPackage;
148148
import java.util.Arrays;
149149
import java.util.ArrayList;
150-
150+
151151
{{ packageImports }}
152-
152+
153153
@SuppressWarnings("deprecation")
154154
public class PackageList {
155155
private Application application;
156156
private ReactNativeHost reactNativeHost;
157157
private MainPackageConfig mConfig;
158-
158+
159159
public PackageList(ReactNativeHost reactNativeHost) {
160160
this(reactNativeHost, null);
161161
}
162-
162+
163163
public PackageList(Application application) {
164164
this(application, null);
165165
}
166-
166+
167167
public PackageList(ReactNativeHost reactNativeHost, MainPackageConfig config) {
168168
this.reactNativeHost = reactNativeHost;
169169
mConfig = config;
170170
}
171-
171+
172172
public PackageList(Application application, MainPackageConfig config) {
173173
this.reactNativeHost = null;
174174
this.application = application;
175175
mConfig = config;
176176
}
177-
177+
178178
private ReactNativeHost getReactNativeHost() {
179179
return this.reactNativeHost;
180180
}
181-
181+
182182
private Resources getResources() {
183183
return this.getApplication().getResources();
184184
}
185-
185+
186186
private Application getApplication() {
187187
if (this.reactNativeHost == null) return this.application;
188188
return this.reactNativeHost.getApplication();
189189
}
190-
190+
191191
private Context getApplicationContext() {
192192
return this.getApplication().getApplicationContext();
193193
}
194-
194+
195195
public ArrayList<ReactPackage> getPackages() {
196196
return new ArrayList<>(Arrays.<ReactPackage>asList(
197197
new MainReactPackage(mConfig){{ packageClassInstances }}

packages/gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/BackwardCompatUtils.kt

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,24 +21,24 @@ internal object BackwardCompatUtils {
2121
if (reactMap.isNotEmpty()) {
2222
project.logger.error(
2323
"""
24-
********************************************************************************
25-
26-
ERROR: Using old project.ext.react configuration.
27-
We identified that your project is using a old configuration block as:
28-
29-
project.ext.react = [
30-
// ...
31-
]
32-
33-
You should migrate to the new configuration:
34-
35-
react {
36-
// ...
37-
}
38-
You can find documentation inside `android/app/build.gradle` on how to use it.
39-
40-
********************************************************************************
41-
"""
24+
********************************************************************************
25+
26+
ERROR: Using old project.ext.react configuration.
27+
We identified that your project is using a old configuration block as:
28+
29+
project.ext.react = [
30+
// ...
31+
]
32+
33+
You should migrate to the new configuration:
34+
35+
react {
36+
// ...
37+
}
38+
You can find documentation inside `android/app/build.gradle` on how to use it.
39+
40+
********************************************************************************
41+
"""
4242
.trimIndent()
4343
)
4444
}

packages/gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/PathUtils.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,11 @@ private fun detectCliFile(reactNativeRoot: File, preconfiguredCliFile: File?): F
105105

106106
error(
107107
"""
108-
Couldn't determine CLI location!
108+
Couldn't determine CLI location!
109109
110-
Please set `react { cliFile = file(...) }` inside your
111-
build.gradle to the path of the react-native cli.js file.
112-
This file typically resides in `node_modules/react-native/cli.js`
110+
Please set `react { cliFile = file(...) }` inside your
111+
build.gradle to the path of the react-native cli.js file.
112+
This file typically resides in `node_modules/react-native/cli.js`
113113
"""
114114
.trimIndent()
115115
)

0 commit comments

Comments
 (0)