| 6 | v2rayCore="$(go env GOPATH)/src/v2ray.com/core" |
| 7 |
| 8 | if [ ! -d "$v2rayCore" ]; then |
| 9 | mkdir -p "$v2rayCore" |
| 10 | git clone https://github.com/v2fly/v2ray-core.git "$v2rayCore" -b "v$V2RAY_CORE_VERSION" --depth 1 |
| 11 | cd "$v2rayCore" |
| 12 | else |
| 13 | cd "$v2rayCore" |
| 14 | git fetch origin "v$V2RAY_CORE_VERSION" && git reset "v$V2RAY_CORE_VERSION" --hard || git clone https://github.com/v2fly/v2ray-core.git "$v2rayCore" -b "v$V2RAY_CORE_VERSION" --depth 1 |
| 15 | fi |
| 16 |
| 17 | export PATH="$PATH/$(go env $GOPATH/bin)" |
| 18 | go mod download -x |
| 19 |
| 20 | cd "$PROJECT/TMessagesProj/libs" |
| 21 | go get -v golang.org/x/mobile/cmd/... |
| 22 | go get -d github.com/2dust/AndroidLibV2rayLite |
| 23 | gomobile init |
| 24 |
| 25 | gomobile bind -v -ldflags='-s -w' github.com/2dust/AndroidLibV2rayLite || exit 1 |
| 26 |
| 27 | rm *-sources.jar |