설명 없음
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

keepUnitySymbols.gradle 1.5KB

12345678910111213141516171819202122232425262728293031323334
  1. // Keeps symbols in runtime binaries, enabling stacktrace resolving at runtime.
  2. // Don't use it for publishing, because it increases the size of deployable package.
  3. androidComponents {
  4. onVariants (selector().all(), { variant ->
  5. {
  6. // libil2cpp.usym.so is a special file produced by il2cpp, it's not an elf binary, thus ignore it
  7. // if not ignored, there will be an error in log:
  8. // llvm-strip.exe: error: '...libil2cpp.usym.so': The file was not recognized as a valid object file
  9. packaging.jniLibs.keepDebugSymbols.add("**/libil2cpp.usym.so")
  10. if (variant.name.toLowerCase().contains("release"))
  11. {
  12. println "Variant '${variant.name}', symbols will be stripped from binaries."
  13. return
  14. }
  15. def files = [
  16. 'libunity.so',
  17. 'libil2cpp.so',
  18. 'libmain.so'
  19. ]
  20. // Note: even though gradle won't strip symbols from these binaries
  21. // we later will copy symbols from unityLibrary/symbols to 'extract${configName}Native${symbolType}' task output directory
  22. // that way they will end up in final symbols package
  23. println "Variant '${variant.name}', will keep symbols in binaries for:"
  24. for (String symbolToKeep: files) {
  25. println " '${symbolToKeep}'"
  26. packaging.jniLibs.keepDebugSymbols.add("**/${symbolToKeep}")
  27. }
  28. }
  29. })
  30. }