Skip to content

Commit

Permalink
fix: update hybrid android guide to fix hash mismatch issue (#291)
Browse files Browse the repository at this point in the history
* fix: update hybrid android guide to fix hash mismatch issue

* update comment

---------

Co-authored-by: Eric Seidel <[email protected]>
  • Loading branch information
bryanoltman and eseidel authored Sep 9, 2024
1 parent cb0f4bb commit a5adcc8
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/content/docs/guides/hybrid-apps/android.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,20 @@ versions of Flutter that Shorebird supports.
In `app/build.gradle`, add the following:

```diff
buildTypes {
release {
// ...
+ // The Dart compiler builds libapp.so directly (does not use clang),and already strips
+ // symbols. However when llvm-strip is run on libapp.so, the symbols are re-sorted
+ // causing the hash of the library to change (which can confuse Shorebird tools).
+ // This line tells gradle to skip the unnecessary llvm-strip step for libapp.so
+ // thus ensuring that the libapp.so that Shorebird sees is byte-identical to the one
+ // which ends up in the APK/AAR/AAB.
+ packaging.jniLibs.keepDebugSymbols.add("**/libapp.so")
// ...
}
}

dependencies {
// ...
+ releaseImplementation 'com.example.my_flutter_module:flutter_release:1.0'
Expand Down

0 comments on commit a5adcc8

Please sign in to comment.