functionland / react-native-fula

React (JS/Native) wrapper for go-fula/mobile which creates a bridge between Fula and WNFS for React Native to enable developers create mobile native apps
MIT License
2 stars 5 forks source link

go-fula .aar package size issue #11

Open ghorbani-m opened 2 years ago

ghorbani-m commented 2 years ago

The .aar output of the go-full package is around 52Mb, which causes the app's package size to grow incredibly.

farhoud commented 2 years ago

go-fula has all architecture (arm64,x86,...) included for now so size of it is little big! for release we can use decouple arch and the size going to be around 10MB. but is need some android native knowledge, but it will not be an issue.

farhoud commented 2 years ago

With ldflag -s -w gomobile bind -ldflags='-s -w' -v -o ./out/fula.aar -target=android/arm64 github.com/functionland/go-fula/mobile generate arr file with size 8.9MB for arm64.

And we can use something like to build multiple apk:

farhoud commented 2 years ago
ghorbani-m commented 2 years ago

@farhoud You are right the main reason is multi-architecture build. Is it possible to make a .jar file instead of .aar, it seems a .jar file is a more lightweight and common way of distributing an artifact?

farhoud commented 2 years ago

@farhoud You are right the main reason is multi-architecture build. Is it possible to make a .jar file instead of .aar, it seems a .jar file is a more lightweight and common way of distributing an artifact?

No but we can have multiple aar file base on arch.