File tree Expand file tree Collapse file tree 2 files changed +16
-29
lines changed Expand file tree Collapse file tree 2 files changed +16
-29
lines changed Original file line number Diff line number Diff line change 31
31
- name : Install NDK
32
32
run : |
33
33
echo "y" | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager \
34
- --channel=3 \
35
- --install "ndk;29.0.13113456"
36
- echo "NDK_HOME=$ANDROID_HOME/ndk/29.0.13113456" >> $GITHUB_ENV
37
- sed -i '10i\
38
- \
39
- ndkVersion = "29.0.13113456"' ${{ github.workspace }}/V2rayNG/app/build.gradle.kts
40
-
41
- - name : Restore cached libtun2socks
42
- id : cache-libtun2socks-restore
43
- uses : actions/cache/restore@v4
44
- with :
45
- path : ${{ github.workspace }}/libs
46
- key : libtun2socks-${{ runner.os }}-${{ env.NDK_HOME }}-${{ hashFiles('.git/modules/badvpn/HEAD') }}-${{ hashFiles('.git/modules/libancillary/HEAD') }}
47
-
48
- - name : Build libtun2socks
49
- if : steps.cache-libtun2socks-restore.outputs.cache-hit != 'true'
50
- run : |
51
- bash compile-tun2socks.sh
52
-
53
- - name : Save libtun2socks
54
- if : steps.cache-libtun2socks-restore.outputs.cache-hit != 'true'
55
- uses : actions/cache/save@v4
56
- with :
57
- path : ${{ github.workspace }}/libs
58
- key : libtun2socks-${{ runner.os }}-${{ env.NDK_HOME }}-${{ hashFiles('.git/modules/badvpn/HEAD') }}-${{ hashFiles('.git/modules/libancillary/HEAD') }}
59
-
60
- - name : Copy libtun2socks
61
- run : |
62
- cp -r ${{ github.workspace }}/libs ${{ github.workspace }}/V2rayNG/app
34
+ --channel=0 \
35
+ --install "ndk;28.2.13676358"
36
+ echo "NDK_HOME=$ANDROID_HOME/ndk/28.2.13676358" >> $GITHUB_ENV
63
37
64
38
- name : Fetch AndroidLibXrayLite tag
65
39
run : |
Original file line number Diff line number Diff line change @@ -35,8 +35,21 @@ android {
35
35
}
36
36
}
37
37
38
+ externalNativeBuild {
39
+ ndkVersion = " 28.2.13676358"
40
+ ndkBuild {
41
+ arguments(" APP_CFLAGS+=-DPKGNAME=com/v2ray/ang/service -DCLSNAME=Tun2SocksService -ffile-prefix-map=${rootDir} =." ) \
42
+ }
43
+ }
44
+
38
45
testInstrumentationRunner = " androidx.test.runner.AndroidJUnitRunner"
39
46
}
47
+
48
+ externalNativeBuild {
49
+ ndkBuild {
50
+ path = file(" src/main/jni/Android.mk" )
51
+ }
52
+ }
40
53
41
54
buildTypes {
42
55
release {
You can’t perform that action at this time.
0 commit comments