Skip to content

Commit 63e9c15

Browse files
Nivaldo Bondançameta-codesync[bot]
authored andcommitted
Update ktfmt component on FBS:master
Reviewed By: cortinico Differential Revision: D112366935 fbshipit-source-id: e0b509473d93d3fb4a465a3007bd0a7b63fa553d
1 parent 8e995e8 commit 63e9c15

237 files changed

Lines changed: 1440 additions & 1459 deletions

File tree

Some content is hidden

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

build.gradle.kts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ fun getListReactAndroidProperty(name: String) = reactAndroidProperties.getProper
2626

2727
apiValidation {
2828
ignoredPackages.addAll(
29-
getListReactAndroidProperty("binaryCompatibilityValidator.ignoredPackages")
29+
getListReactAndroidProperty("binaryCompatibilityValidator.ignoredPackages"),
3030
)
3131
ignoredClasses.addAll(getListReactAndroidProperty("binaryCompatibilityValidator.ignoredClasses"))
3232
nonPublicMarkers.addAll(
33-
getListReactAndroidProperty("binaryCompatibilityValidator.nonPublicMarkers")
33+
getListReactAndroidProperty("binaryCompatibilityValidator.nonPublicMarkers"),
3434
)
3535
validationDisabled =
3636
reactAndroidProperties
@@ -86,12 +86,12 @@ tasks.register("clean", Delete::class.java) {
8686
delete(rootProject.file("./packages/react-native/sdks/download/"))
8787
delete(rootProject.file("./packages/react-native/sdks/hermes/"))
8888
delete(
89-
rootProject.file("./packages/react-native/ReactAndroid/src/main/jni/prebuilt/lib/arm64-v8a/")
89+
rootProject.file("./packages/react-native/ReactAndroid/src/main/jni/prebuilt/lib/arm64-v8a/"),
9090
)
9191
delete(
9292
rootProject.file(
93-
"./packages/react-native/ReactAndroid/src/main/jni/prebuilt/lib/armeabi-v7a/"
94-
)
93+
"./packages/react-native/ReactAndroid/src/main/jni/prebuilt/lib/armeabi-v7a/",
94+
),
9595
)
9696
delete(rootProject.file("./packages/react-native/ReactAndroid/src/main/jni/prebuilt/lib/x86/"))
9797
delete(rootProject.file("./packages/react-native/ReactAndroid/src/main/jni/prebuilt/lib/x86_64/"))
@@ -137,7 +137,7 @@ if (project.findProperty("react.internal.useHermesStable")?.toString()?.toBoolea
137137

138138
if (hermesCompilerVersion == "0.0.0") {
139139
throw RuntimeException(
140-
"Trying to use Hermes Nightly but hermes-compiler version is not specified"
140+
"Trying to use Hermes Nightly but hermes-compiler version is not specified",
141141
)
142142
}
143143

@@ -156,7 +156,7 @@ if (project.findProperty("react.internal.useHermesStable")?.toString()?.toBoolea
156156
That's fine for local development, but you should not commit this change.
157157
********************************************************************************
158158
"""
159-
.trimIndent()
159+
.trimIndent(),
160160
)
161161
}
162162

packages/gradle-plugin/react-native-gradle-plugin/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ tasks.withType<KotlinCompile>().configureEach {
6868
// See comment above on JDK 11 support
6969
jvmTarget.set(JvmTarget.JVM_11)
7070
allWarningsAsErrors.set(
71-
project.properties["enableWarningsAsErrors"]?.toString()?.toBoolean() ?: false
71+
project.properties["enableWarningsAsErrors"]?.toString()?.toBoolean() ?: false,
7272
)
7373
}
7474
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ abstract class ReactExtension @Inject constructor(val project: Project) {
208208
} else {
209209
buildTypes.forEach { buildType ->
210210
result.add(
211-
(dependencyConfiguration ?: "${buildType}Implementation") to ":$nameCleansed"
211+
(dependencyConfiguration ?: "${buildType}Implementation") to ":$nameCleansed",
212212
)
213213
}
214214
}

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@ class ReactPlugin : Plugin<Project> {
6969
.toBoolean()
7070
if (value) {
7171
project.logger.warn(
72-
"WARNING: The 'hermesV1Enabled' property is no longer needed. Hermes V1 is now always enabled. You can safely remove this property from your gradle.properties."
72+
"WARNING: The 'hermesV1Enabled' property is no longer needed. Hermes V1 is now always enabled. You can safely remove this property from your gradle.properties.",
7373
)
7474
} else {
7575
project.logger.warn(
76-
"WARNING: Opting out of Hermes V1 is no longer supported. The 'hermesV1Enabled=false' property will be ignored. Hermes V1 is now always enabled. Please remove this property from your gradle.properties."
76+
"WARNING: Opting out of Hermes V1 is no longer supported. The 'hermesV1Enabled=false' property will be ignored. Hermes V1 is now always enabled. Please remove this property from your gradle.properties.",
7777
)
7878
}
7979
}
@@ -161,7 +161,7 @@ class ReactPlugin : Plugin<Project> {
161161
********************************************************************************
162162
163163
"""
164-
.trimIndent()
164+
.trimIndent(),
165165
)
166166
exitProcess(1)
167167
}
@@ -304,7 +304,7 @@ class ReactPlugin : Plugin<Project> {
304304
// We want to exclude the build directory, to avoid picking them up for execution
305305
// avoidance.
306306
tree.exclude("**/build/**/*")
307-
}
307+
},
308308
)
309309
val shouldRunTask = onlyIf(packageJson)
310310
task.onlyIf { shouldRunTask }
@@ -413,7 +413,7 @@ class ReactPlugin : Plugin<Project> {
413413
project.extensions.getByType(ApplicationAndroidComponentsExtension::class.java).apply {
414414
onVariants(selector().all()) { variant ->
415415
variant.sources.java?.addStaticSourceDirectory(
416-
generatedAutolinkingJavaDir.get().asFile.absolutePath
416+
generatedAutolinkingJavaDir.get().asFile.absolutePath,
417417
)
418418
}
419419
}
@@ -466,7 +466,7 @@ class ReactPlugin : Plugin<Project> {
466466
}
467467

468468
internal fun getPureCxxCodegenDependencies(
469-
autolinkingFile: File
469+
autolinkingFile: File,
470470
): List<ModelAutolinkingDependenciesJson> {
471471
val model = JsonUtils.fromAutolinkingConfigJson(autolinkingFile)
472472
return model?.dependencies?.values?.filter { dependency ->

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class ReactRootProjectPlugin : Plugin<Project> {
7979
********************************************************************************
8080
8181
"""
82-
.trimIndent()
82+
.trimIndent(),
8383
)
8484
}
8585
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ abstract class PrivateReactExtension @Inject constructor(project: Project) {
4646
project.rootProject.layout.projectDirectory.dir("../../")
4747
} else {
4848
project.rootProject.layout.projectDirectory.dir("../")
49-
}
49+
},
5050
)
5151

5252
val reactNativeDir: DirectoryProperty =

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ abstract class GenerateAutolinkingNewArchitecturesFileTask : DefaultTask() {
4848
}
4949

5050
internal fun filterAndroidPackages(
51-
model: ModelAutolinkingConfigJson?
51+
model: ModelAutolinkingConfigJson?,
5252
): List<ModelAutolinkingDependenciesPlatformAndroidJson> =
5353
model?.dependencies?.values?.mapNotNull { it.platforms?.android } ?: emptyList()
5454

5555
internal fun generateCmakeFileContent(
56-
packages: List<ModelAutolinkingDependenciesPlatformAndroidJson>
56+
packages: List<ModelAutolinkingDependenciesPlatformAndroidJson>,
5757
): String {
5858
val libraryIncludes =
5959
packages.joinToString("\n") { dep ->
@@ -102,7 +102,7 @@ abstract class GenerateAutolinkingNewArchitecturesFileTask : DefaultTask() {
102102
}
103103

104104
internal fun cmakeListsPathForDependency(
105-
dep: ModelAutolinkingDependenciesPlatformAndroidJson
105+
dep: ModelAutolinkingDependenciesPlatformAndroidJson,
106106
): String? {
107107
if (dep.cmakeListsPath != null) {
108108
return dep.cmakeListsPath
@@ -124,7 +124,7 @@ abstract class GenerateAutolinkingNewArchitecturesFileTask : DefaultTask() {
124124
}
125125

126126
internal fun generateCppFileContent(
127-
packages: List<ModelAutolinkingDependenciesPlatformAndroidJson>
127+
packages: List<ModelAutolinkingDependenciesPlatformAndroidJson>,
128128
): String {
129129
val packagesWithLibraryNames = packages.filter { android -> android.libraryName != null }
130130

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ abstract class GenerateCodegenArtifactsTask : Exec() {
8282
libraryName,
8383
"--javaPackageName",
8484
codegenJavaPackageName,
85-
)
85+
),
8686
)
8787
}
8888
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ abstract class GenerateCodegenSchemaTask : Exec() {
6767
"android",
6868
generatedSchemaFile.get().asFile.cliPath(workingDir),
6969
jsRootDir.asFile.get().cliPath(workingDir),
70-
)
70+
),
7171
)
7272
}
7373
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ abstract class GenerateEntryPointTask : DefaultTask() {
3737
3838
The file is either missing or not containing valid JSON so the build won't succeed.
3939
"""
40-
.trimIndent()
40+
.trimIndent(),
4141
)
4242

4343
val packageName =
4444
model.project?.android?.packageName
4545
?: error(
46-
"RNGP - Autolinking: Could not find project.android.packageName in react-native config output! Could not autolink packages without this field."
46+
"RNGP - Autolinking: Could not find project.android.packageName in react-native config output! Could not autolink packages without this field.",
4747
)
4848
val generatedFileContents = composeFileContent(packageName)
4949

0 commit comments

Comments
 (0)