| 6 | #v2rayCore="$(go env GOPATH)/src/v2ray.com/core" |
| 7 | # |
| 8 | #if [ ! -f "$v2rayCore/go.mod" ]; then |
| 9 | # git clone https://github.com/v2fly/v2ray-core.git "$v2rayCore" -b "v$V2RAY_CORE_VERSION" --depth 1 |
| 10 | #fi |
| 11 | # |
| 12 | #cd "$v2rayCore" |
| 13 | #git fetch origin "v$V2RAY_CORE_VERSION" |
| 14 | #git checkout -b master |
| 15 | #git reset "v$V2RAY_CORE_VERSION" --hard |
| 16 |
| 17 | export GO111MOUDLE=on |
| 18 | export PATH="$PATH:$(go env GOPATH)/bin" |
| 19 |
| 20 | cd "$PROJECT/build" |
| 21 | [ -d "v2ray" ] || git clone https://github.com/2dust/AndroidLibV2rayLite v2ray |
| 22 | cd v2ray |
| 23 | git reset --hard && git clean -fdx |
| 24 | sed -i -e "s|go 1.14|go 1.15|g" go.mod |
| 25 | go mod download -x |
| 26 | go get -v golang.org/x/mobile/cmd/... |
| 27 | gomobile init |
| 28 | gomobile bind -v -ldflags='-s -w' . || exit 1 |
| 29 |
| 30 | /bin/cp -f libv2ray.aar "$PROJECT/TMessagesProj/libs" |
| 31 |