diff --git a/.github/workflows/debug.yml b/.github/workflows/debug.yml index ef3411dfd..e3c8643b3 100644 --- a/.github/workflows/debug.yml +++ b/.github/workflows/debug.yml @@ -268,10 +268,11 @@ jobs: path: | TMessagesProj/libs/ssr-libev-release.aar key: ${{ hashFiles('shadowsocksr_status') }} - - name: Fix Gradle Memoery + - name: Configure Gradle run: | sed -i -e "s/16384/6144/g" gradle.properties - echo "ndk.dir=${ANDROID_HOME}/ndk-bundle" > local.properties + echo "sdk.dir=${ANDROID_HOME}" >> local.properties + echo "ndk.dir=${ANDROID_HOME}/ndk-bundle" >> local.properties - name: Gradle cache uses: actions/cache@v2 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 588d743cb..866171638 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,10 +25,10 @@ jobs: permission: "write" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - ffmpeg: name: Native Build ( FFmpeg ) runs-on: ubuntu-latest + needs: check steps: - name: Checkout uses: actions/checkout@v2 @@ -57,6 +57,7 @@ jobs: boringssl: name: Native Build ( BoringSSL ) runs-on: ubuntu-latest + needs: check steps: - name: Checkout uses: actions/checkout@v2 @@ -142,6 +143,7 @@ jobs: v2ray: name: Native Build ( V2ray ) runs-on: ubuntu-latest + needs: check steps: - name: Checkout uses: actions/checkout@v2 @@ -172,6 +174,7 @@ jobs: shadowsocks: name: Native Build ( Shadowsocks ) runs-on: ubuntu-latest + needs: check steps: - name: Checkout uses: actions/checkout@v2 @@ -202,6 +205,7 @@ jobs: shadowsocksr: name: Native Build ( ShadowsocksR ) runs-on: ubuntu-latest + needs: check steps: - name: Checkout uses: actions/checkout@v2 @@ -396,10 +400,11 @@ jobs: path: | TMessagesProj/libs/ssr-libev-release.aar key: ${{ hashFiles('shadowsocksr_status') }} - - name: Fix Gradle Memoery + - name: Configure Gradle run: | sed -i -e "s/16384/6144/g" gradle.properties - echo "ndk.dir=${ANDROID_HOME}/ndk-bundle" > local.properties + echo "sdk.dir=${ANDROID_HOME}" >> local.properties + echo "ndk.dir=${ANDROID_HOME}/ndk-bundle" >> local.properties - name: Gradle cache uses: actions/cache@v2 with: diff --git a/.gitmodules b/.gitmodules index f14f4e971..cdee6baff 100644 --- a/.gitmodules +++ b/.gitmodules @@ -32,4 +32,7 @@ branch = stable [submodule "ssr-libev/src/main/jni/re2"] path = ssr-libev/src/main/jni/re2 - url = https://github.com/google/re2.git \ No newline at end of file + url = https://github.com/google/re2.git +[submodule "v2ray"] + path = v2ray + url = https://github.com/nekohasekai/AndroidLibV2rayLite diff --git a/bin/libs/v2ray/build.sh b/bin/libs/v2ray/build.sh index ecb5ebe6f..0bec05b81 100755 --- a/bin/libs/v2ray/build.sh +++ b/bin/libs/v2ray/build.sh @@ -4,8 +4,8 @@ source "bin/init/env.sh" export GO111MOUDLE=on export PATH="$PATH:$(go env GOPATH)/bin" -cd "$PROJECT/build/v2ray" +cd "$PROJECT/v2ray" gomobile init gomobile bind -v -ldflags='-s -w' . || exit 1 -/bin/cp -f libv2ray.aar "$PROJECT/TMessagesProj/libs" \ No newline at end of file +/bin/cp -f libv2ray.aar "$PROJECT/TMessagesProj/libs" diff --git a/bin/libs/v2ray/init.sh b/bin/libs/v2ray/init.sh index 1452f8970..2f37ac04a 100755 --- a/bin/libs/v2ray/init.sh +++ b/bin/libs/v2ray/init.sh @@ -1,18 +1,11 @@ #!/usr/bin/env bash -# v4.34.0 -V2RAY_CORE_VERSION="a6efb4d60b86789a68ed8ac8d52cfcec2d80229a" - source "bin/init/env.sh" export GO111MOUDLE=on export PATH="$PATH:$(go env GOPATH)/bin" -mkdir -p "$PROJECT/build" -cd "$PROJECT/build" -[ -d "v2ray" ] || git clone https://github.com/2dust/AndroidLibV2rayLite v2ray || exit 1 +cd $PROJECT +[ -f v2ray/go.mod ] || git submodule update --init v2ray cd v2ray git reset --hard && git clean -fdx -sed -i -e "s|go 1.14|go 1.16|g" go.mod -sed -i -e "s|core master|core $V2RAY_CORE_VERSION|g" go.mod -go mod download -x || exit 1 -go get -v golang.org/x/mobile/cmd/... \ No newline at end of file +go mod download -x && go get -v golang.org/x/mobile/cmd/... || exit 1 diff --git a/v2ray b/v2ray new file mode 160000 index 000000000..51c769d45 --- /dev/null +++ b/v2ray @@ -0,0 +1 @@ +Subproject commit 51c769d4581866192e146b90dda6652c1f922f82