Skip to content

feat: strip SO files by default, deprecate experimental option in favor of useStrippedSoFiles#326

Open
artus9033 wants to merge 2 commits into
mainfrom
feat/default-strip-so-files
Open

feat: strip SO files by default, deprecate experimental option in favor of useStrippedSoFiles#326
artus9033 wants to merge 2 commits into
mainfrom
feat/default-strip-so-files

Conversation

@artus9033
Copy link
Copy Markdown
Collaborator

Summary

This PR:

  • deprecates experimentalUseStrippedSoFiles in favor of useStrippedSoFiles
  • useStrippedSoFiles is true by default (experimentalUseStrippedSoFiles used to be false by default)

Test plan

CI green.

@artus9033 artus9033 requested review from hurali97 and krozniata May 13, 2026 18:25
@artus9033 artus9033 self-assigned this May 13, 2026
Copilot AI review requested due to automatic review settings May 13, 2026 18:25
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the React Native Brownfield Gradle plugin configuration to make using stripped native .so files the default behavior, while keeping backward compatibility by deprecating the old experimentalUseStrippedSoFiles flag in favor of useStrippedSoFiles.

Changes:

  • Introduces useStrippedSoFiles (defaulting to true) and deprecates experimentalUseStrippedSoFiles as an alias.
  • Updates JNI libs processing to read the new useStrippedSoFiles property.
  • Adds a changeset documenting the behavior change and deprecation.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
gradle-plugins/react/example-android-library/build.gradle.kts Removes a stray line from the example library Gradle build file.
gradle-plugins/react/brownfield/src/main/kotlin/com/callstack/react/brownfield/utils/Extension.kt Adds useStrippedSoFiles (default true) and deprecates experimentalUseStrippedSoFiles via delegation.
gradle-plugins/react/brownfield/src/main/kotlin/com/callstack/react/brownfield/processors/JNILibsProcessor.kt Switches the gating flag from experimentalUseStrippedSoFiles to useStrippedSoFiles.
.changeset/frank-chairs-grin.md Declares a minor release documenting the default behavior change and deprecation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 54 to 58
val jniDir = archiveLibrary.getJniDir()
processNestedLibs(jniDir.listFiles(), existingJNILibs)
if (projectExt.experimentalUseStrippedSoFiles) {
if (projectExt.useStrippedSoFiles) {
copyStrippedSoLibs(variant, existingJNILibs)
} else {
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may address this in a follow-up PR.
CC @hurali97

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add it to the bench

Copy link
Copy Markdown
Member

@hurali97 hurali97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants