Skip to content

Commit

Permalink
fix: update build.gradle to not strip symbols for *.so files (#13)
Browse files Browse the repository at this point in the history
* fix: update build.gradle to not strip symbols for *.so files

* Add comment

* Update doNotStrip args

* Use keepDebugSymbols

* Update add_to_app/AndroidAddToAppDemo/app/build.gradle

Co-authored-by: Eric Seidel <[email protected]>

* Update targetSdk

---------

Co-authored-by: Eric Seidel <[email protected]>
  • Loading branch information
bryanoltman and eseidel authored Sep 9, 2024
1 parent 74e0a84 commit e0c0988
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions add_to_app/AndroidAddToAppDemo/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ android {
defaultConfig {
applicationId "com.example.addtoappdemo"
minSdk 24
// This needs to be 33 or lower-Shorebird currently does not support 34+
// See https://github.com/shorebirdtech/shorebird/issues/2369
targetSdk 33
versionCode 14
targetSdk 34
versionCode 2
versionName "1.0.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand All @@ -24,6 +22,14 @@ android {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.debug

// 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")
}
}
compileOptions {
Expand Down

0 comments on commit e0c0988

Please sign in to comment.