Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update build.gradle to not strip symbols for *.so files #13

Merged
merged 7 commits into from
Sep 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading