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

Updates package build #198

Merged
merged 5 commits into from
Nov 28, 2023
Merged

Updates package build #198

merged 5 commits into from
Nov 28, 2023

Conversation

ospfranco
Copy link
Collaborator

I could not build Android. I updated the package build files, configs, etc to a more recent configuration and now everything seems to be working.

@@ -83,6 +90,7 @@ android {
}

packagingOptions {
doNotStrip resolveBuildType() == 'debug' ? "**/**/*.so" : ''
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This should prevent stripping of debug symbols while not in release mode. I'm guessing it will shave disk space, but more importantly, I wonder if there is some sort of performance penalty for not stripping the symbols.

]
doNotStrip '**/*.so'
// Should prevent clashes with other libraries that use OpenSSL
pickFirst '**/x86/libcrypto.so'
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Should prevent conflicts when other libraries also generate libcrypto.so like flipper or op-sqlcipher

Copy link
Member

Choose a reason for hiding this comment

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

Yea I mean it's kinda unsafe here but that's the developers fault if he includes two libs with different major versions imo.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Transitive dependencies are a bitch

{
"prefer_split_fsevents_watcher": true
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Gets rid of the annoying re-crawled message when metro starts

Copy link
Member

Choose a reason for hiding this comment

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

That always annoyed me, lol. I wonder why that bugs tho

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Tzvetan mentioned something about macos not being their default platform, so fsevents is kinda just duck-taped in

@@ -27,7 +27,7 @@ protected List<ReactPackage> getPackages() {
List<ReactPackage> packages = new PackageList(this).getPackages();
// Packages that cannot be autolinked yet can be added manually here, for example:
// packages.add(new MyReactNativePackage());
packages.add(new QuickCryptoPackage());
// packages.add(new QuickCryptoPackage());
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't remember why we did this, it seems we were not correctly linking the dependency. This is no longer necessary

@@ -1,5 +1,6 @@
const crypto = require('crypto');
const quickCrypto = require('react-native-quick-crypto');
// const quickCrypto = require('react-native-quick-crypto');
import quickCrypto from 'react-native-quick-crypto';
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Needed so that metro correctly resolves the dependency now

@ospfranco ospfranco self-assigned this Nov 28, 2023
Copy link
Member

@mrousavy mrousavy left a comment

Choose a reason for hiding this comment

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

Hey Oscar, thanks for your PR! ❤️

This looks good, LGTM! :)

{
"prefer_split_fsevents_watcher": true
Copy link
Member

Choose a reason for hiding this comment

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

That always annoyed me, lol. I wonder why that bugs tho

]
doNotStrip '**/*.so'
// Should prevent clashes with other libraries that use OpenSSL
pickFirst '**/x86/libcrypto.so'
Copy link
Member

Choose a reason for hiding this comment

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

Yea I mean it's kinda unsafe here but that's the developers fault if he includes two libs with different major versions imo.

@mrousavy
Copy link
Member

CI is failing unfortunately. I think we can fix that in a separate PR

@mrousavy mrousavy merged commit 8d4bbcd into margelo:main Nov 28, 2023
0 of 6 checks passed
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.

2 participants