build(gradle): keep debug symbols in debug variant

Debug ZIPs now ship unstripped native libs sourced from
merged_native_libs instead of stripped_native_libs. Gives
meaningful stack traces for crash debugging on-device.
This commit is contained in:
Enginex0
2026-03-11 00:45:00 +01:00
parent 0280bcf189
commit 9896df93de
+7 -6
View File
@@ -121,8 +121,8 @@ androidComponents {
dependsOn("package${capitalized}") dependsOn("package${capitalized}")
} else { } else {
dependsOn("minify${capitalized}WithR8") dependsOn("minify${capitalized}WithR8")
}
dependsOn("strip${capitalized}DebugSymbols") dependsOn("strip${capitalized}DebugSymbols")
}
dependsOn(buildRustCertgen) dependsOn(buildRustCertgen)
if (isDebug) { if (isDebug) {
@@ -140,12 +140,13 @@ androidComponents {
} }
} }
from( val nativeLibsDir = if (isDebug) {
project.layout.buildDirectory.dir( "intermediates/merged_native_libs/${variant.name}/merge${capitalized}NativeLibs/out/lib"
} else {
"intermediates/stripped_native_libs/${variant.name}/strip${capitalized}DebugSymbols/out/lib" "intermediates/stripped_native_libs/${variant.name}/strip${capitalized}DebugSymbols/out/lib"
) }
) { from(project.layout.buildDirectory.dir(nativeLibsDir)) {
into("lib") // Place them in the 'lib' subfolder of the staging directory. into("lib")
include("**/libinject.so", "**/libTEESimulator.so", "**/libsupervisor.so", "**/libcertgen.so") include("**/libinject.so", "**/libTEESimulator.so", "**/libsupervisor.so", "**/libcertgen.so")
} }