Skip to content

Commit 80e6364

Browse files
authored
feat: strip SO files by default, deprecate experimental option in favor of useStrippedSoFiles (#326)
* feat: strip SO files by default, deprecate experimental option in favor of useStrippedSoFiles * chore: format Extension.kt
1 parent 2f945cf commit 80e6364

4 files changed

Lines changed: 24 additions & 5 deletions

File tree

.changeset/frank-chairs-grin.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'brownfield': minor
3+
'@callstack/brownfield-cli': minor
4+
'@callstack/react-native-brownfield': minor
5+
---
6+
7+
feat: strip SO files by default, deprecate experimental option in favor of useStrippedSoFiles

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class JNILibsProcessor : BaseProject() {
5353
for (archiveLibrary in aarLibraries) {
5454
val jniDir = archiveLibrary.getJniDir()
5555
processNestedLibs(jniDir.listFiles(), existingJNILibs)
56-
if (projectExt.experimentalUseStrippedSoFiles) {
56+
if (projectExt.useStrippedSoFiles) {
5757
copyStrippedSoLibs(variant, existingJNILibs)
5858
} else {
5959
if (jniDir.exists()) {

gradle-plugins/react/brownfield/src/main/kotlin/com/callstack/react/brownfield/utils/Extension.kt

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,28 @@ open class Extension {
3434
* List of dynamic libs (.so) files that you wish to bundle with
3535
* the aar.
3636
*
37-
* By default only `libappmodules.so` and `libreact_codegen_*.so` are
37+
* By default, only `libappmodules.so` and `libreact_codegen_*.so` are
3838
* bundled.
3939
*/
4040
var dynamicLibs = listOf<String>()
4141

4242
/**
4343
* Whether to use stripped .so files.
4444
*
45-
* Default value is `false`
45+
* Default is `true`.
4646
*/
47-
var experimentalUseStrippedSoFiles = false
47+
var useStrippedSoFiles = true
48+
49+
@Deprecated(
50+
message =
51+
"This property is deprecated and will be removed in a future release." +
52+
"The successor is useStrippedSoFiles, which is by default true.",
53+
replaceWith = ReplaceWith("useStrippedSoFiles"),
54+
level = DeprecationLevel.WARNING,
55+
)
56+
var experimentalUseStrippedSoFiles
57+
get() = useStrippedSoFiles
58+
set(value) {
59+
useStrippedSoFiles = value
60+
}
4861
}

gradle-plugins/react/example-android-library/build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
plugins {
32
id("com.android.library")
43
id("org.jetbrains.kotlin.android")

0 commit comments

Comments
 (0)