Git Product home page Git Product logo

Comments (9)

MuntashirAkon avatar MuntashirAkon commented on May 20, 2024

You can use the build_libsodium.sh script from my fork: https://github.com/MuntashirAkon/lazysodium-android
It'll build the libsodium.so files and move them to the corresponding ABI directories inside jniLibs. You can edit the jni_dir inside the script to copy them anywhere you want. I've also used -j command for make which will use all the available CPUs to build the binaries which takes about 2 minutes on my device.

Usage:

./build_libsodium.sh ndk_path [api]

api is set to 21 if not given.

NB: It will only build for arm-v7a, arm-v8a, x86, x86_64 because latest NDK only supports these variants.

from lazysodium-android.

gurpreet- avatar gurpreet- commented on May 20, 2024

Hi @alexamiryan and @MuntashirAkon,

I had been contacted a few months back for a similar thing. In fact, I am increasingly seeing F-Droid mentioned. Do you know if it would be worthwhile to have a script inside Lazysodium to build sources from scratch?

from lazysodium-android.

MuntashirAkon avatar MuntashirAkon commented on May 20, 2024

I had been contacted a few months back for a similar thing. In fact, I am increasingly seeing F-Droid mentioned. Do you know if it would be worthwhile to have a script inside Lazysodium to build sources from scratch?

I've implemented it on my repo already (but modified it a bit for my own use). I can make a PR with just this modification if you're interested. It takes less than 2 minutes to build libsodium on my 7 gen i3 dual core (4 threads) processor with 8 GB RAM. On JitPack, it takes less than a minute.

from lazysodium-android.

gurpreet- avatar gurpreet- commented on May 20, 2024

Can F-Droid invoke it's own build steps? Something like ./gradlew f-droid-build?

I don't want to rebuild libsodium binaries over and over again because:

  1. I'd like to keep testing time low.
  2. It adds extra complexity.

from lazysodium-android.

MuntashirAkon avatar MuntashirAkon commented on May 20, 2024

I don't want to rebuild libsodium binaries over and over again because:

  1. I'd like to keep testing time low.

You don't have to build it over and over again. If you're using CI, you can cache the binaries and put a check in the build script (already done in my repo). Same can be done in other cases as well. F-Droid never cache anything. So, they'll simply rebuild it instead.

  1. It adds extra complexity.

No, it doesn't. You'll simply need a script (which I've already done on my end) and two tasks in the build.gradle: one for building the binaries and the other for cleaning up the binaries.

from lazysodium-android.

gurpreet- avatar gurpreet- commented on May 20, 2024

Thank you for the advice. OK, let me see if this can be integrated.

from lazysodium-android.

gurpreet- avatar gurpreet- commented on May 20, 2024

@MuntashirAkon do I have permission to use and/or modify your script here? https://github.com/MuntashirAkon/lazysodium-android/blob/master/build_libsodium.sh

from lazysodium-android.

MuntashirAkon avatar MuntashirAkon commented on May 20, 2024

do I have permission to use and/or modify your script here? https://github.com/MuntashirAkon/lazysodium-android/blob/master/build_libsodium.sh

Sure! Just add a credit line at the top of the file (should be MPL-2.0 dated 28 Oct 2020).

from lazysodium-android.

MuntashirAkon avatar MuntashirAkon commented on May 20, 2024

Is there any update? The repository still seems to be using non-free binaries/blobs. If you cannot manage the time, maybe I can help.

from lazysodium-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.