From 5f808ff36b60fb4e440bd9e00627985c5ff8a269 Mon Sep 17 00:00:00 2001 From: cyBerta <cyberta@riseup.net> Date: Sun, 16 Jun 2024 04:13:44 +0200 Subject: [PATCH] adapt README after switching to go workspace --- README.md | 34 +++++++++------------------------- 1 file changed, 9 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 3188c9b..54c0a18 100644 --- a/README.md +++ b/README.md @@ -18,38 +18,22 @@ Run the follwing command to build Bitmask Core for all Android build flavors (ru git submodule add git://<repository_url.git> <new_lib_directory> ``` -2. Most of the time the new library has its own `go.mod` and `go.sum` file. You need to copy and paste all `required` dependencies from the new libraries `go.mod` to the `go.mod` in the bitmaskcore directory. Similarly, you have also to take care about `replace` entries. - -3. delete `go.mod` and `go.sum` from the new library -``` -# you should be in bitmaskcore -cd <new_lib_directory> -rm go.mod go.sum +2. Add the new go module to the go workspace. ``` -4. create a patch from the diff +go work use <new_lib_directory> ``` -# you should be in bitmaskcore/<new_lib_directory> -git diff > ../<new_lib>.patch -git stash -cd .. -``` -4. Make sure the `bitmaskcore/golang` directory is empty. + +3. Make sure the `bitmaskcore/golang` directory is empty. ``` # you should be in bitmaskcore -rm -rf ./golang/* +sudo rm -rf ./golang/* ``` -5. And let go add any missing modules. +4. And let go add any missing modules. ``` # you should be in bitmaskcore go mod tidy ``` -6. Update [build_core.sh](build_core.sh) and add some lines of code below the exting patches section - -``` -# -------- preparing <new_lib> --------------- -showtitle "Applying patch to <new_lib>" -patch --directory=<new_lib_directory> --strip=1 < <new_lib>.patch || quit -``` - +5. extend the `gomobile bind` statements with the new module in `./build_core.sh` and `./build_core_dev.sh` +6. test the changes with running `./build_core_dev.sh` 7. `git add` your changes and commit them -8. run `./build_core.sh` and make sure it succeeds +8. run `./build_core.sh` and make sure it succeeds -- GitLab