mirror of
https://github.com/MGislv/NekoX.git
synced 2024-06-30 10:14:04 +00:00
Split v2ray build
This commit is contained in:
parent
b8728ea742
commit
cee746ad11
4
.github/workflows/debug.yml
vendored
4
.github/workflows/debug.yml
vendored
|
@ -138,7 +138,7 @@ jobs:
|
|||
with:
|
||||
path: |
|
||||
TMessagesProj/libs/libv2ray.aar
|
||||
key: ${{ hashFiles('bin/libs/v2ray.sh') }}
|
||||
key: ${{ hashFiles('bin/libs/v2ray/*') }}
|
||||
- name: Setup Android SDK Tools
|
||||
uses: android-actions/setup-android@v2
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
|
@ -255,7 +255,7 @@ jobs:
|
|||
with:
|
||||
path: |
|
||||
TMessagesProj/libs/libv2ray.aar
|
||||
key: ${{ hashFiles('bin/libs/v2ray.sh') }}
|
||||
key: ${{ hashFiles('bin/libs/v2ray/*') }}
|
||||
- name: Shadowsocks Cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
|
|
12
.github/workflows/release.yml
vendored
12
.github/workflows/release.yml
vendored
|
@ -140,7 +140,7 @@ jobs:
|
|||
run: |
|
||||
./run libs native
|
||||
v2ray:
|
||||
name: Native Build (V2ray)
|
||||
name: Native Build ( V2ray )
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
@ -151,7 +151,7 @@ jobs:
|
|||
with:
|
||||
path: |
|
||||
TMessagesProj/libs/libv2ray.aar
|
||||
key: ${{ hashFiles('bin/libs/v2ray.sh') }}
|
||||
key: ${{ hashFiles('bin/libs/v2ray/*') }}
|
||||
- name: Setup Android SDK Tools
|
||||
uses: android-actions/setup-android@v2
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
|
@ -170,7 +170,7 @@ jobs:
|
|||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: ./run libs v2ray
|
||||
shadowsocks:
|
||||
name: Native Build (Shadowsocks)
|
||||
name: Native Build ( Shadowsocks )
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
@ -200,7 +200,7 @@ jobs:
|
|||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: ./run libs shadowsocks
|
||||
shadowsocksr:
|
||||
name: Native Build (ShadowsocksR)
|
||||
name: Native Build ( ShadowsocksR )
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
@ -267,7 +267,7 @@ jobs:
|
|||
with:
|
||||
path: |
|
||||
TMessagesProj/libs/libv2ray.aar
|
||||
key: ${{ hashFiles('bin/libs/v2ray.sh') }}
|
||||
key: ${{ hashFiles('bin/libs/v2ray/*') }}
|
||||
- name: Shadowsocks Cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
|
@ -383,7 +383,7 @@ jobs:
|
|||
with:
|
||||
path: |
|
||||
TMessagesProj/libs/libv2ray.aar
|
||||
key: ${{ hashFiles('bin/libs/v2ray.sh') }}
|
||||
key: ${{ hashFiles('bin/libs/v2ray/*') }}
|
||||
- name: Shadowsocks Cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
|
|
|
@ -12,4 +12,4 @@ bin/init/libs/ffmpeg.sh
|
|||
bin/init/libs/boringssl.sh
|
||||
|
||||
# Build v2ray-core
|
||||
bin/libs/v2ray.sh
|
||||
bin/libs/v2ray/build.sh
|
|
@ -29,6 +29,8 @@ echo "NDK Found: $_NDK"
|
|||
echo "sdk.dir=$ANDROID_HOME" >> local.properties
|
||||
echo "ndk.dir=$ANDROID_NDK_HOME" >> local.properties
|
||||
|
||||
bin/libs/v2ray/init.sh
|
||||
|
||||
## Remove unused non-free dependencies
|
||||
pushd TMessagesProj
|
||||
|
||||
|
|
|
@ -1,22 +1,4 @@
|
|||
#!/bin/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 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/...
|
||||
gomobile init
|
||||
gomobile bind -v -ldflags='-s -w' . || exit 1
|
||||
|
||||
/bin/cp -f libv2ray.aar "$PROJECT/TMessagesProj/libs"
|
||||
bin/libs/v2ray/init.sh
|
||||
bin/libs/v2ray/build.sh
|
11
bin/libs/v2ray/build.sh
Executable file
11
bin/libs/v2ray/build.sh
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
source "bin/init/env.sh"
|
||||
export GO111MOUDLE=on
|
||||
export PATH="$PATH:$(go env GOPATH)/bin"
|
||||
|
||||
cd "$PROJECT/build/v2ray"
|
||||
gomobile init
|
||||
gomobile bind -v -ldflags='-s -w' . || exit 1
|
||||
|
||||
/bin/cp -f libv2ray.aar "$PROJECT/TMessagesProj/libs"
|
18
bin/libs/v2ray/init.sh
Executable file
18
bin/libs/v2ray/init.sh
Executable file
|
@ -0,0 +1,18 @@
|
|||
#!/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 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/...
|
Loading…
Reference in New Issue
Block a user