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

Publish stripped libraries in default AAR #123

Closed
wants to merge 4 commits into from

Conversation

Kudo
Copy link
Member

@Kudo Kudo commented Oct 2, 2019

Summary

Originally, the published libjsc.so is unstripped.
If user does not installed NDK in the host, the generated APK will take extra binary size for debug symbols.

This PR will strip symbols in libjsc.so.
To help native crash troubleshooting, the unstripped version is also available.

This PR includes two major changes:

Publish stripped libraries in default AAR.

  1. To reduce final APK size, publish stripped libjsc.so in dist/**/*.aar
  2. The unstripped version is important for troubleshooting especially crash backtrace symbolication. Will publish unstripped version in dist.unstripped/**/*.aar

Add npm publish helper tool

The helper tool extract files from CircleCI stored dist.tgz.
And publish

  • dist/ packages to jsc-android@{VERSION} with {TAG}
  • dist.unstripped/ to jsc-android@{VERSION}-unstripped with {TAG}-unstripped

Usage:
./scripts/publish.js -T {TAG} /path/to/dist.tgz [--dry-run]

E.g.
./scripts/publish.js -T next ~/Downloads/dist.tgz --dry-run
./scripts/publish.js -T latest ~/Downloads/dist.tgz

Summary:
    1. To reduce final APK size, publish stripped libjsc.so in dist/**/*.aar

    2. The unstripped version is important for troubleshooting
       especially crash backtrace symbalication.
       Will publish unstripped version in dist.unstripped/**/*.aar
Summary:
    The helper tool extract files from CircleCI stored dist.tgz.
    And publish dist/ packages to jsc-android@{VERSION} with {TAG}
                dist.unstripped/ to jsc-android@{VERSION}-unstripped with {TAG}-unstripped

    Usage:
        python scripts/publish.py -T {TAG} /path/to/dist.tgz [--dry-run]

    E.g.
        python scripts/publish.py -T next ~/Downloads/dist.tgz --dry-run
        python scripts/publish.py -T latest ~/Downloads/dist.tgz
@@ -0,0 +1,86 @@
#!/usr/bin/env python
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all scripts are in js or bash, is introducing python here really necessary?
If you don't want to deal with cmd parsing in bash you could always pass everything by env instead.

@newyankeecodeshop
Copy link

Is this going to be merged soon? I am planning on doing a custom JSC build and would love to have this to reduce the binary size.

@newyankeecodeshop
Copy link

@Kudo Is there something we in the community can do to help move along this PR and #124 ? They both look like really beneficial enhancements.

@Kudo Kudo closed this Mar 26, 2021
@Kudo Kudo deleted the strip_symbols branch March 26, 2021 01:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants