Skip to content

Commit 99d2ba0

Browse files
committed
fix: detekt
1 parent 107ffa6 commit 99d2ba0

1 file changed

Lines changed: 11 additions & 10 deletions

File tree

  • gradle-plugins/react/brownfield/src/main/kotlin/com/callstack/react/brownfield/processors

gradle-plugins/react/brownfield/src/main/kotlin/com/callstack/react/brownfield/processors/JNILibsProcessor.kt

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class JNILibsProcessor : BaseProject() {
5151
for (archiveLibrary in aarLibraries) {
5252
val jniDir = archiveLibrary.getJniDir()
5353
processNestedLibs(jniDir.listFiles(), existingJNILibs)
54-
copyStrippedSoLibs(variant, existingJNILibs)
54+
copyStrippedSoLibs(variant, existingJNILibs)
5555
}
5656
}
5757
}
@@ -65,12 +65,13 @@ class JNILibsProcessor : BaseProject() {
6565
val variantName = variant.name
6666
val capitalizedVariant = variantName.replaceFirstChar(Char::titlecase)
6767

68-
val fromDir = appBuildDir
69-
.dir("intermediates/stripped_native_libs/$variantName/strip${capitalizedVariant}DebugSymbols/out/lib")
70-
.asFile
68+
val fromDir =
69+
appBuildDir
70+
.dir("intermediates/stripped_native_libs/$variantName/strip${capitalizedVariant}DebugSymbols/out/lib")
71+
.asFile
7172

7273
val intoDir = project.rootProject.file("${project.name}/libs$capitalizedVariant")
73-
74+
7475
return Pair(fromDir, intoDir)
7576
}
7677

@@ -96,20 +97,20 @@ class JNILibsProcessor : BaseProject() {
9697

9798
private fun copyStrippedSoLibs(
9899
variant: LibraryVariant,
99-
existingJNILibs: MutableMap<String, MutableList<String>>
100+
existingJNILibs: MutableMap<String, MutableList<String>>,
100101
) {
101102
val (fromDir, intoDir) = getStrippedLibsPath(variant)
102-
103+
103104
existingJNILibs.forEach { (arch, libNames) ->
104105
val sourceArchDir = File(fromDir, arch)
105106
if (!sourceArchDir.exists()) return@forEach
106-
107+
107108
val destArchDir = File(intoDir, arch).apply { mkdirs() }
108-
109+
109110
libNames.forEach { libName ->
110111
val sourceFile = File(sourceArchDir, libName)
111112
val destFile = File(destArchDir, libName)
112-
113+
113114
if (sourceFile.exists()) {
114115
try {
115116
sourceFile.copyTo(destFile, overwrite = true)

0 commit comments

Comments
 (0)