My project has 3 different buildTypes and I need only one of them to keep the debug info of its native libraries. I'm using com.android.tools.build:gradle:3.1.4
.
I tried the following
buildTypes {
debug {
...
}
release {
...
}
unstripped {
...
packagingOptions {
doNotStrip '**/*.so'
}
}
}
but that makes all buildTypes to keep unstripped versions of the libraries.
I also tried changing the doNotStrip
pattern to something like '**/unstripped/*.so'
but that does not seem to help me, since the docs say that the path is related to the APK's root dir.