mirror of
https://github.com/dyhkwong/Exclave.git
synced 2026-06-21 10:46:06 +08:00
Refine project
This commit is contained in:
72
.github/workflows/debug.yml
vendored
72
.github/workflows/debug.yml
vendored
@@ -20,7 +20,7 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Fetch Status
|
||||
run: git submodule status 'core/*' > core_status
|
||||
run: git submodule status 'library/core/*' > core_status
|
||||
- name: Core Cache
|
||||
id: cache
|
||||
uses: actions/cache@v2
|
||||
@@ -39,7 +39,7 @@ jobs:
|
||||
run: |
|
||||
echo "sdk.dir=${ANDROID_HOME}" > local.properties
|
||||
echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties
|
||||
./run libs core
|
||||
./run lib core
|
||||
v2ray:
|
||||
name: Native Build (V2Ray)
|
||||
runs-on: ubuntu-latest
|
||||
@@ -47,14 +47,14 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Fetch Status
|
||||
run: git submodule status v2ray > v2ray_status
|
||||
run: git submodule status library/v2ray > v2ray_status
|
||||
- name: V2Ray Cache
|
||||
id: cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
app/libs/libv2ray.aar
|
||||
key: ${{ hashFiles('bin/libs/v2ray/*', 'v2ray_status') }}
|
||||
key: ${{ hashFiles('bin/lib/v2ray/*', 'v2ray_status') }}
|
||||
- name: Install Golang
|
||||
uses: actions/setup-go@v2
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
@@ -62,7 +62,7 @@ jobs:
|
||||
go-version: 1.16
|
||||
- name: Native Build
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: ./run libs v2ray
|
||||
run: ./run lib v2ray
|
||||
xtls:
|
||||
name: Native Build (XTLS)
|
||||
runs-on: ubuntu-latest
|
||||
@@ -70,14 +70,14 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Fetch Status
|
||||
run: git submodule status 'xtls-plugin/*' > xtls_status
|
||||
run: git submodule status 'plugin/xtls/*' > xtls_status
|
||||
- name: XTLS Cache
|
||||
id: cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
xtls-plugin/src/main/jniLibs
|
||||
key: ${{ hashFiles('bin/libs/xtls.sh', 'xtls_status') }}
|
||||
plugin/xtls/src/main/jniLibs
|
||||
key: ${{ hashFiles('bin/lib/xtls.sh', 'xtls_status') }}
|
||||
- name: Install Golang
|
||||
uses: actions/setup-go@v2
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
@@ -85,7 +85,7 @@ jobs:
|
||||
go-version: 1.16
|
||||
- name: Native Build
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: ./run libs xtls
|
||||
run: ./run plugin xtls
|
||||
trojan-go:
|
||||
name: Native Build (Trojan-Go)
|
||||
runs-on: ubuntu-latest
|
||||
@@ -93,14 +93,14 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Fetch Status
|
||||
run: git submodule status 'trojan-go-plugin/*' > trojan_go_status
|
||||
run: git submodule status 'plugin/trojan-go/*' > trojan_go_status
|
||||
- name: Trojan-Go Cache
|
||||
id: cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
trojan-go-plugin/src/main/jniLibs
|
||||
key: ${{ hashFiles('bin/libs/trojan_go.sh', 'trojan_go_status') }}
|
||||
plugin/trojan-go/src/main/jniLibs
|
||||
key: ${{ hashFiles('bin/lib/trojan_go.sh', 'trojan_go_status') }}
|
||||
- name: Install Golang
|
||||
uses: actions/setup-go@v2
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
@@ -108,7 +108,7 @@ jobs:
|
||||
go-version: 1.16
|
||||
- name: Native Build
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: ./run libs trojan_go
|
||||
run: ./run plugin trojan_go
|
||||
naive:
|
||||
runs-on: ubuntu-latest
|
||||
name: Native Build (NaïveProxy)
|
||||
@@ -120,19 +120,19 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Fetch Status
|
||||
run: git submodule status 'naive-plugin/*' > naive_status
|
||||
run: git submodule status 'plugin/naive/*' > naive_status
|
||||
- name: Naive Cache
|
||||
id: cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
naive-plugin/src/main/jniLibs/${{ matrix.arch }}
|
||||
key: naive-${{ matrix.arch }}-${{ hashFiles('bin/libs/naive/*', 'naive_status') }}
|
||||
plugin/naive/src/main/jniLibs/${{ matrix.arch }}
|
||||
key: naive-${{ matrix.arch }}-${{ hashFiles('bin/plugin/naive/*', 'naive_status') }}
|
||||
- name: Native Build
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
./run init action naive
|
||||
./run libs naive ${{ matrix.arch }}
|
||||
./run plugin naive ${{ matrix.arch }}
|
||||
pingtunnel:
|
||||
name: Native Build (PingTunnel)
|
||||
runs-on: ubuntu-latest
|
||||
@@ -140,14 +140,14 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Fetch Status
|
||||
run: git submodule status 'pt-plugin/*' > pt_status
|
||||
run: git submodule status 'plugin/pingtunnel/*' > pt_status
|
||||
- name: PingTunnel Cache
|
||||
id: cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
pt-plugin/src/main/jniLibs
|
||||
key: ${{ hashFiles('bin/libs/pingtunnel.sh', 'pt_status') }}
|
||||
plugin/pingtunnel/src/main/jniLibs
|
||||
key: ${{ hashFiles('bin/lib/pingtunnel.sh', 'pt_status') }}
|
||||
- name: Install Golang
|
||||
uses: actions/setup-go@v2
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
@@ -155,7 +155,7 @@ jobs:
|
||||
go-version: 1.16
|
||||
- name: Native Build
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: ./run libs pingtunnel
|
||||
run: ./run plugin pingtunnel
|
||||
relaybaton:
|
||||
name: Native Build (RelayBaton)
|
||||
runs-on: ubuntu-latest
|
||||
@@ -163,14 +163,14 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Fetch Status
|
||||
run: git submodule status 'rb-plugin/*' > rb_status
|
||||
run: git submodule status 'plugin/relaybaton/*' > rb_status
|
||||
- name: RelayBaton Cache
|
||||
id: cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
rb-plugin/src/main/jniLibs
|
||||
key: ${{ hashFiles('bin/libs/relaybaton.sh', 'rb_status') }}
|
||||
plugin/relaybaton/src/main/jniLibs
|
||||
key: ${{ hashFiles('bin/lib/relaybaton.sh', 'rb_status') }}
|
||||
- name: Install Golang
|
||||
uses: actions/setup-go@v2
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
@@ -178,7 +178,7 @@ jobs:
|
||||
go-version: 1.16
|
||||
- name: Native Build
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: ./run libs relaybaton
|
||||
run: ./run plugin relaybaton
|
||||
shadowsocks:
|
||||
name: Native Build (Shadowsocks)
|
||||
runs-on: ubuntu-latest
|
||||
@@ -186,14 +186,14 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Fetch Status
|
||||
run: git submodule status 'shadowsocks/*' > shadowsocks_status
|
||||
run: git submodule status 'library/shadowsocks/*' > shadowsocks_status
|
||||
- name: Shadowsocks Cache
|
||||
id: cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
app/libs/shadowsocks-release.aar
|
||||
key: ${{ hashFiles('shadowsocks/build.gradle.kts', 'shadowsocks_status') }}
|
||||
key: ${{ hashFiles('library/shadowsocks/build.gradle.kts', 'shadowsocks_status') }}
|
||||
- name: Install Rust
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: ./run init action shadowsocks
|
||||
@@ -208,7 +208,7 @@ jobs:
|
||||
run: |
|
||||
echo "sdk.dir=${ANDROID_HOME}" > local.properties
|
||||
echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties
|
||||
./run libs shadowsocks
|
||||
./run lib shadowsocks
|
||||
shadowsocksr:
|
||||
name: Native Build (ShadowsocksR)
|
||||
runs-on: ubuntu-latest
|
||||
@@ -216,7 +216,7 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Fetch Status
|
||||
run: git submodule status 'shadowsocksr/*' > shadowsocksr_status
|
||||
run: git submodule status 'library/shadowsocksr/*' > shadowsocksr_status
|
||||
- name: ShadowsocksR Cache
|
||||
id: cache
|
||||
uses: actions/cache@v2
|
||||
@@ -235,7 +235,7 @@ jobs:
|
||||
run: |
|
||||
echo "sdk.dir=${ANDROID_HOME}" > local.properties
|
||||
echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties
|
||||
./run libs shadowsocksr
|
||||
./run lib shadowsocksr
|
||||
build:
|
||||
name: Gradle Build
|
||||
runs-on: ubuntu-latest
|
||||
@@ -249,10 +249,10 @@ jobs:
|
||||
uses: actions/checkout@v2
|
||||
- name: Fetch Status
|
||||
run: |
|
||||
git submodule status 'core/*' > core_status
|
||||
git submodule status 'shadowsocks/*' > shadowsocks_status
|
||||
git submodule status 'shadowsocksr/*' > shadowsocksr_status
|
||||
git submodule status v2ray > v2ray_status
|
||||
git submodule status 'library/core/*' > core_status
|
||||
git submodule status 'library/shadowsocks/*' > shadowsocks_status
|
||||
git submodule status 'library/shadowsocksr/*' > shadowsocksr_status
|
||||
git submodule status library/v2ray > v2ray_status
|
||||
- name: Core Cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
@@ -264,13 +264,13 @@ jobs:
|
||||
with:
|
||||
path: |
|
||||
app/libs/libv2ray.aar
|
||||
key: ${{ hashFiles('bin/libs/v2ray/*', 'v2ray_status') }}
|
||||
key: ${{ hashFiles('bin/lib/v2ray/*', 'v2ray_status') }}
|
||||
- name: Shadowsocks Cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
app/libs/shadowsocks-release.aar
|
||||
key: ${{ hashFiles('shadowsocks/build.gradle.kts', 'shadowsocks_status') }}
|
||||
key: ${{ hashFiles('library/shadowsocks/build.gradle.kts', 'shadowsocks_status') }}
|
||||
- name: ShadowsocksR Cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
|
||||
44
.github/workflows/release.yml
vendored
44
.github/workflows/release.yml
vendored
@@ -33,7 +33,7 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Fetch Status
|
||||
run: git submodule status 'core/*' > core_status
|
||||
run: git submodule status 'library/core/*' > core_status
|
||||
- name: Core Cache
|
||||
id: cache
|
||||
uses: actions/cache@v2
|
||||
@@ -52,7 +52,7 @@ jobs:
|
||||
run: |
|
||||
echo "sdk.dir=${ANDROID_HOME}" > local.properties
|
||||
echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties
|
||||
./run libs core
|
||||
./run lib core
|
||||
v2ray:
|
||||
name: Native Build (V2Ray)
|
||||
runs-on: ubuntu-latest
|
||||
@@ -61,14 +61,14 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Fetch Status
|
||||
run: git submodule status v2ray > v2ray_status
|
||||
run: git submodule status library/v2ray > v2ray_status
|
||||
- name: V2Ray Cache
|
||||
id: cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
app/libs/libv2ray.aar
|
||||
key: ${{ hashFiles('bin/libs/v2ray/*', 'v2ray_status') }}
|
||||
key: ${{ hashFiles('bin/lib/v2ray/*', 'v2ray_status') }}
|
||||
- name: Install Golang
|
||||
uses: actions/setup-go@v2
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
@@ -85,7 +85,7 @@ jobs:
|
||||
run: |
|
||||
echo "sdk.dir=${ANDROID_HOME}" > local.properties
|
||||
echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties
|
||||
./run libs v2ray
|
||||
./run lib v2ray
|
||||
shadowsocks:
|
||||
name: Native Build (Shadowsocks)
|
||||
runs-on: ubuntu-latest
|
||||
@@ -94,14 +94,14 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Fetch Status
|
||||
run: git submodule status 'shadowsocks/*' > shadowsocks_status
|
||||
run: git submodule status 'library/shadowsocks/*' > shadowsocks_status
|
||||
- name: Shadowsocks Cache
|
||||
id: cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
app/libs/shadowsocks-release.aar
|
||||
key: ${{ hashFiles('shadowsocks/build.gradle.kts', 'shadowsocks_status') }}
|
||||
key: ${{ hashFiles('library/shadowsocks/build.gradle.kts', 'shadowsocks_status') }}
|
||||
- name: Install Rust
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: ./run init action shadowsocks
|
||||
@@ -116,7 +116,7 @@ jobs:
|
||||
run: |
|
||||
echo "sdk.dir=${ANDROID_HOME}" > local.properties
|
||||
echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties
|
||||
./run libs shadowsocks
|
||||
./run lib shadowsocks
|
||||
shadowsocksr:
|
||||
name: Native Build (ShadowsocksR)
|
||||
runs-on: ubuntu-latest
|
||||
@@ -125,7 +125,7 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Fetch Status
|
||||
run: git submodule status 'shadowsocksr/*' > shadowsocksr_status
|
||||
run: git submodule status 'library/shadowsocksr/*' > shadowsocksr_status
|
||||
- name: ShadowsocksR Cache
|
||||
id: cache
|
||||
uses: actions/cache@v2
|
||||
@@ -144,7 +144,7 @@ jobs:
|
||||
run: |
|
||||
echo "sdk.dir=${ANDROID_HOME}" > local.properties
|
||||
echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties
|
||||
./run libs shadowsocksr
|
||||
./run lib shadowsocksr
|
||||
build:
|
||||
name: Gradle Build
|
||||
runs-on: ubuntu-latest
|
||||
@@ -158,10 +158,10 @@ jobs:
|
||||
uses: actions/checkout@v2
|
||||
- name: Fetch Status
|
||||
run: |
|
||||
git submodule status 'core/*' > core_status
|
||||
git submodule status 'shadowsocks/*' > shadowsocks_status
|
||||
git submodule status 'shadowsocksr/*' > shadowsocksr_status
|
||||
git submodule status v2ray > v2ray_status
|
||||
git submodule status 'library/core/*' > core_status
|
||||
git submodule status 'library/shadowsocks/*' > shadowsocks_status
|
||||
git submodule status 'library/shadowsocksr/*' > shadowsocksr_status
|
||||
git submodule status library/v2ray > v2ray_status
|
||||
- name: Core Cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
@@ -173,13 +173,13 @@ jobs:
|
||||
with:
|
||||
path: |
|
||||
app/libs/libv2ray.aar
|
||||
key: ${{ hashFiles('bin/libs/v2ray/*', 'v2ray_status') }}
|
||||
key: ${{ hashFiles('bin/lib/v2ray/*', 'v2ray_status') }}
|
||||
- name: Shadowsocks Cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
app/libs/shadowsocks-release.aar
|
||||
key: ${{ hashFiles('shadowsocks/build.gradle.kts', 'shadowsocks_status') }}
|
||||
key: ${{ hashFiles('library/shadowsocks/build.gradle.kts', 'shadowsocks_status') }}
|
||||
- name: ShadowsocksR Cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
@@ -270,10 +270,10 @@ jobs:
|
||||
uses: actions/checkout@v2
|
||||
- name: Fetch Status
|
||||
run: |
|
||||
git submodule status 'core/*' > core_status
|
||||
git submodule status 'shadowsocks/*' > shadowsocks_status
|
||||
git submodule status 'shadowsocksr/*' > shadowsocksr_status
|
||||
git submodule status v2ray > v2ray_status
|
||||
git submodule status 'library/core/*' > core_status
|
||||
git submodule status 'library/shadowsocks/*' > shadowsocks_status
|
||||
git submodule status 'library/shadowsocksr/*' > shadowsocksr_status
|
||||
git submodule status library/v2ray > v2ray_status
|
||||
- name: Core Cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
@@ -285,13 +285,13 @@ jobs:
|
||||
with:
|
||||
path: |
|
||||
app/libs/libv2ray.aar
|
||||
key: ${{ hashFiles('bin/libs/v2ray/*', 'v2ray_status') }}
|
||||
key: ${{ hashFiles('bin/lib/v2ray/*', 'v2ray_status') }}
|
||||
- name: Shadowsocks Cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
app/libs/shadowsocks-release.aar
|
||||
key: ${{ hashFiles('shadowsocks/build.gradle.kts', 'shadowsocks_status') }}
|
||||
key: ${{ hashFiles('library/shadowsocks/build.gradle.kts', 'shadowsocks_status') }}
|
||||
- name: ShadowsocksR Cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
|
||||
34
.github/workflows/release_naive.yml
vendored
34
.github/workflows/release_naive.yml
vendored
@@ -34,14 +34,14 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Fetch Status
|
||||
run: git submodule status 'naive-plugin/*' > naive_status
|
||||
run: git submodule status 'plugin/naive/*' > naive_status
|
||||
- name: Naive Cache
|
||||
id: cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
naive-plugin/src/main/jniLibs/${{ matrix.arch }}
|
||||
key: naive-${{ matrix.arch }}-${{ hashFiles('bin/libs/naive/*', 'naive_status') }}
|
||||
plugin/naive/src/main/jniLibs/${{ matrix.arch }}
|
||||
key: naive-${{ matrix.arch }}-${{ hashFiles('bin/plugin/naive/*', 'naive_status') }}
|
||||
- name: Gradle cache
|
||||
uses: actions/cache@v2
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
@@ -54,7 +54,7 @@ jobs:
|
||||
echo "sdk.dir=${ANDROID_HOME}" > local.properties
|
||||
echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties
|
||||
./run init action naive
|
||||
./run libs naive ${{ matrix.arch }}
|
||||
./run plugin naive ${{ matrix.arch }}
|
||||
naive:
|
||||
needs: naive_libs
|
||||
name: Gradle Build (NaïveProxy)
|
||||
@@ -63,31 +63,31 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Fetch Status
|
||||
run: git submodule status 'naive-plugin/*' > naive_status
|
||||
run: git submodule status 'plugin/naive/*' > naive_status
|
||||
- name: Naive Cache (armeabi-v7a)
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
naive-plugin/src/main/jniLibs/armeabi-v7a
|
||||
key: naive-armeabi-v7a-${{ hashFiles('bin/libs/naive/*', 'naive_status') }}
|
||||
plugin/naive/src/main/jniLibs/armeabi-v7a
|
||||
key: naive-armeabi-v7a-${{ hashFiles('bin/plugin/naive/*', 'naive_status') }}
|
||||
- name: Naive Cache (arm64-v8a)
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
naive-plugin/src/main/jniLibs/arm64-v8a
|
||||
key: naive-arm64-v8a-${{ hashFiles('bin/libs/naive/*', 'naive_status') }}
|
||||
plugin/naive/src/main/jniLibs/arm64-v8a
|
||||
key: naive-arm64-v8a-${{ hashFiles('bin/plugin/naive/*', 'naive_status') }}
|
||||
- name: Naive Cache (x86)
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
naive-plugin/src/main/jniLibs/x86
|
||||
key: naive-x86-${{ hashFiles('bin/libs/naive/*', 'naive_status') }}
|
||||
plugin/naive/src/main/jniLibs/x86
|
||||
key: naive-x86-${{ hashFiles('bin/plugin/naive/*', 'naive_status') }}
|
||||
- name: Naive Cache (x86_64)
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
naive-plugin/src/main/jniLibs/x86_64
|
||||
key: naive-x86_64-${{ hashFiles('bin/libs/naive/*', 'naive_status') }}
|
||||
plugin/naive/src/main/jniLibs/x86_64
|
||||
key: naive-x86_64-${{ hashFiles('bin/plugin/naive/*', 'naive_status') }}
|
||||
- name: Gradle cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
@@ -99,7 +99,7 @@ jobs:
|
||||
echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties
|
||||
export LOCAL_PROPERTIES="${{ secrets.LOCAL_PROPERTIES }}"
|
||||
./gradlew naive-plugin:assembleRelease
|
||||
APK=$(find naive-plugin/build/outputs/apk -name '*arm64-v8a*.apk')
|
||||
APK=$(find plugin/naive/build/outputs/apk -name '*arm64-v8a*.apk')
|
||||
APK=$(dirname $APK)
|
||||
echo "APK=$APK" >> $GITHUB_ENV
|
||||
- uses: actions/upload-artifact@v2
|
||||
@@ -164,13 +164,13 @@ jobs:
|
||||
# - name: Checkout
|
||||
# uses: actions/checkout@v2
|
||||
# - name: Fetch Status
|
||||
# run: git submodule status 'xtls-plugin/*' > xtls_status
|
||||
# run: git submodule status 'plugin/xtls/*' > xtls_status
|
||||
# - name: XTLS Cache
|
||||
# uses: actions/cache@v2
|
||||
# with:
|
||||
# path: |
|
||||
# xtls-plugin/src/main/jniLibs
|
||||
# key: ${{ hashFiles('bin/libs/xtls.sh', 'xtls_status') }}
|
||||
# plugin/xtls/src/main/jniLibs
|
||||
# key: ${{ hashFiles('bin/lib/xtls.sh', 'xtls_status') }}
|
||||
# - name: Release Build
|
||||
# run: |
|
||||
# echo "sdk.dir=${ANDROID_HOME}" > local.properties
|
||||
|
||||
22
.github/workflows/release_pingtunnel.yml
vendored
22
.github/workflows/release_pingtunnel.yml
vendored
@@ -31,14 +31,14 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Fetch Status
|
||||
run: git submodule status 'pt-plugin/*' > pt_status
|
||||
run: git submodule status 'plugin/pingtunnel/*' > pt_status
|
||||
- name: PingTunnel Cache
|
||||
id: cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
pt-plugin/src/main/jniLibs
|
||||
key: ${{ hashFiles('bin/libs/pingtunnel.sh', 'pt_status') }}
|
||||
plugin/pingtunnel/src/main/jniLibs
|
||||
key: ${{ hashFiles('bin/lib/pingtunnel.sh', 'pt_status') }}
|
||||
- name: Install Golang
|
||||
uses: actions/setup-go@v2
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
@@ -46,7 +46,7 @@ jobs:
|
||||
go-version: 1.16
|
||||
- name: Native Build
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: ./run libs pingtunnel
|
||||
run: ./run plugin pingtunnel
|
||||
build:
|
||||
name: Gradle Build
|
||||
runs-on: ubuntu-latest
|
||||
@@ -56,13 +56,13 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Fetch Status
|
||||
run: git submodule status 'pt-plugin/*' > pt_status
|
||||
run: git submodule status 'plugin/pingtunnel/*' > pt_status
|
||||
- name: PingTunnel Cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
pt-plugin/src/main/jniLibs
|
||||
key: ${{ hashFiles('bin/libs/pingtunnel.sh', 'pt_status') }}
|
||||
plugin/pingtunnel/src/main/jniLibs
|
||||
key: ${{ hashFiles('bin/lib/pingtunnel.sh', 'pt_status') }}
|
||||
- name: Gradle cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
@@ -74,7 +74,7 @@ jobs:
|
||||
echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties
|
||||
export LOCAL_PROPERTIES="${{ secrets.LOCAL_PROPERTIES }}"
|
||||
./gradlew pt-plugin:assembleRelease
|
||||
APK=$(find pt-plugin/build/outputs/apk -name '*arm64-v8a*.apk')
|
||||
APK=$(find plugin/pingtunnel/build/outputs/apk -name '*arm64-v8a*.apk')
|
||||
APK=$(dirname $APK)
|
||||
echo "APK=$APK" >> $GITHUB_ENV
|
||||
- uses: actions/upload-artifact@v2
|
||||
@@ -139,13 +139,13 @@ jobs:
|
||||
# - name: Checkout
|
||||
# uses: actions/checkout@v2
|
||||
# - name: Fetch Status
|
||||
# run: git submodule status 'xtls-plugin/*' > xtls_status
|
||||
# run: git submodule status 'plugin/xtls/*' > xtls_status
|
||||
# - name: XTLS Cache
|
||||
# uses: actions/cache@v2
|
||||
# with:
|
||||
# path: |
|
||||
# xtls-plugin/src/main/jniLibs
|
||||
# key: ${{ hashFiles('bin/libs/xtls.sh', 'xtls_status') }}
|
||||
# plugin/xtls/src/main/jniLibs
|
||||
# key: ${{ hashFiles('bin/lib/xtls.sh', 'xtls_status') }}
|
||||
# - name: Release Build
|
||||
# run: |
|
||||
# echo "sdk.dir=${ANDROID_HOME}" > local.properties
|
||||
|
||||
22
.github/workflows/release_relaybaton.yml
vendored
22
.github/workflows/release_relaybaton.yml
vendored
@@ -31,14 +31,14 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Fetch Status
|
||||
run: git submodule status 'rb-plugin/*' > rb_status
|
||||
run: git submodule status 'plugin/relaybaton/*' > rb_status
|
||||
- name: RelayBaton Cache
|
||||
id: cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
rb-plugin/src/main/jniLibs
|
||||
key: ${{ hashFiles('bin/libs/relaybaton.sh', 'rb_status') }}
|
||||
plugin/relaybaton/src/main/jniLibs
|
||||
key: ${{ hashFiles('bin/lib/relaybaton.sh', 'rb_status') }}
|
||||
- name: Install Golang
|
||||
uses: actions/setup-go@v2
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
@@ -46,7 +46,7 @@ jobs:
|
||||
go-version: 1.16
|
||||
- name: Native Build
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: ./run libs relaybaton
|
||||
run: ./run plugin relaybaton
|
||||
build:
|
||||
name: Gradle Build
|
||||
runs-on: ubuntu-latest
|
||||
@@ -56,13 +56,13 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Fetch Status
|
||||
run: git submodule status 'rb-plugin/*' > rb_status
|
||||
run: git submodule status 'plugin/relaybaton/*' > rb_status
|
||||
- name: RelayBaton Cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
rb-plugin/src/main/jniLibs
|
||||
key: ${{ hashFiles('bin/libs/relaybaton.sh', 'rb_status') }}
|
||||
plugin/relaybaton/src/main/jniLibs
|
||||
key: ${{ hashFiles('bin/lib/relaybaton.sh', 'rb_status') }}
|
||||
- name: Gradle cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
@@ -74,7 +74,7 @@ jobs:
|
||||
echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties
|
||||
export LOCAL_PROPERTIES="${{ secrets.LOCAL_PROPERTIES }}"
|
||||
./gradlew rb-plugin:assembleRelease
|
||||
APK=$(find rb-plugin/build/outputs/apk -name '*arm64-v8a*.apk')
|
||||
APK=$(find plugin/relaybaton/build/outputs/apk -name '*arm64-v8a*.apk')
|
||||
APK=$(dirname $APK)
|
||||
echo "APK=$APK" >> $GITHUB_ENV
|
||||
- uses: actions/upload-artifact@v2
|
||||
@@ -139,13 +139,13 @@ jobs:
|
||||
# - name: Checkout
|
||||
# uses: actions/checkout@v2
|
||||
# - name: Fetch Status
|
||||
# run: git submodule status 'xtls-plugin/*' > xtls_status
|
||||
# run: git submodule status 'plugin/xtls/*' > xtls_status
|
||||
# - name: XTLS Cache
|
||||
# uses: actions/cache@v2
|
||||
# with:
|
||||
# path: |
|
||||
# xtls-plugin/src/main/jniLibs
|
||||
# key: ${{ hashFiles('bin/libs/xtls.sh', 'xtls_status') }}
|
||||
# plugin/xtls/src/main/jniLibs
|
||||
# key: ${{ hashFiles('bin/lib/xtls.sh', 'xtls_status') }}
|
||||
# - name: Release Build
|
||||
# run: |
|
||||
# echo "sdk.dir=${ANDROID_HOME}" > local.properties
|
||||
|
||||
22
.github/workflows/release_trojan_go.yml
vendored
22
.github/workflows/release_trojan_go.yml
vendored
@@ -31,14 +31,14 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Fetch Status
|
||||
run: git submodule status 'trojan-go-plugin/*' > trojan_go_status
|
||||
run: git submodule status 'plugin/trojan-go/*' > trojan_go_status
|
||||
- name: Trojan-Go Cache
|
||||
id: cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
trojan-go-plugin/src/main/jniLibs
|
||||
key: ${{ hashFiles('bin/libs/trojan_go.sh', 'trojan_go_status') }}
|
||||
plugin/trojan-go/src/main/jniLibs
|
||||
key: ${{ hashFiles('bin/lib/trojan_go.sh', 'trojan_go_status') }}
|
||||
- name: Install Golang
|
||||
uses: actions/setup-go@v2
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
@@ -46,7 +46,7 @@ jobs:
|
||||
go-version: 1.16
|
||||
- name: Native Build
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: ./run libs trojan_go
|
||||
run: ./run plugin trojan_go
|
||||
build:
|
||||
name: Gradle Build
|
||||
runs-on: ubuntu-latest
|
||||
@@ -56,13 +56,13 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Fetch Status
|
||||
run: git submodule status 'trojan-go-plugin/*' > trojan_go_status
|
||||
run: git submodule status 'plugin/trojan-go/*' > trojan_go_status
|
||||
- name: Trojan-Go Cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
trojan-go-plugin/src/main/jniLibs
|
||||
key: ${{ hashFiles('bin/libs/trojan_go.sh', 'trojan_go_status') }}
|
||||
plugin/trojan-go/src/main/jniLibs
|
||||
key: ${{ hashFiles('bin/lib/trojan_go.sh', 'trojan_go_status') }}
|
||||
- name: Gradle cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
@@ -74,7 +74,7 @@ jobs:
|
||||
echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties
|
||||
export LOCAL_PROPERTIES="${{ secrets.LOCAL_PROPERTIES }}"
|
||||
./gradlew trojan-go-plugin:assembleRelease
|
||||
APK=$(find trojan-go-plugin/build/outputs/apk -name '*arm64-v8a*.apk')
|
||||
APK=$(find plugin/trojan-go/build/outputs/apk -name '*arm64-v8a*.apk')
|
||||
APK=$(dirname $APK)
|
||||
echo "APK=$APK" >> $GITHUB_ENV
|
||||
- uses: actions/upload-artifact@v2
|
||||
@@ -139,13 +139,13 @@ jobs:
|
||||
# - name: Checkout
|
||||
# uses: actions/checkout@v2
|
||||
# - name: Fetch Status
|
||||
# run: git submodule status 'xtls-plugin/*' > xtls_status
|
||||
# run: git submodule status 'plugin/xtls/*' > xtls_status
|
||||
# - name: XTLS Cache
|
||||
# uses: actions/cache@v2
|
||||
# with:
|
||||
# path: |
|
||||
# xtls-plugin/src/main/jniLibs
|
||||
# key: ${{ hashFiles('bin/libs/xtls.sh', 'xtls_status') }}
|
||||
# plugin/xtls/src/main/jniLibs
|
||||
# key: ${{ hashFiles('bin/lib/xtls.sh', 'xtls_status') }}
|
||||
# - name: Release Build
|
||||
# run: |
|
||||
# echo "sdk.dir=${ANDROID_HOME}" > local.properties
|
||||
|
||||
22
.github/workflows/release_xtls.yml
vendored
22
.github/workflows/release_xtls.yml
vendored
@@ -31,14 +31,14 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Fetch Status
|
||||
run: git submodule status 'xtls-plugin/*' > xtls_status
|
||||
run: git submodule status 'plugin/xtls/*' > xtls_status
|
||||
- name: XTLS Cache
|
||||
id: cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
xtls-plugin/src/main/jniLibs
|
||||
key: ${{ hashFiles('bin/libs/xtls.sh', 'xtls_status') }}
|
||||
plugin/xtls/src/main/jniLibs
|
||||
key: ${{ hashFiles('bin/lib/xtls.sh', 'xtls_status') }}
|
||||
- name: Gradle cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
@@ -51,7 +51,7 @@ jobs:
|
||||
go-version: 1.16
|
||||
- name: Native Build
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: ./run libs xtls
|
||||
run: ./run plugin xtls
|
||||
build:
|
||||
name: Gradle Build
|
||||
runs-on: ubuntu-latest
|
||||
@@ -61,13 +61,13 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Fetch Status
|
||||
run: git submodule status 'xtls-plugin/*' > xtls_status
|
||||
run: git submodule status 'plugin/xtls/*' > xtls_status
|
||||
- name: XTLS Cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
xtls-plugin/src/main/jniLibs
|
||||
key: ${{ hashFiles('bin/libs/xtls.sh', 'xtls_status') }}
|
||||
plugin/xtls/src/main/jniLibs
|
||||
key: ${{ hashFiles('bin/lib/xtls.sh', 'xtls_status') }}
|
||||
- name: Gradle cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
@@ -79,7 +79,7 @@ jobs:
|
||||
echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties
|
||||
export LOCAL_PROPERTIES="${{ secrets.LOCAL_PROPERTIES }}"
|
||||
./gradlew xtls-plugin:assembleRelease
|
||||
APK=$(find xtls-plugin/build/outputs/apk -name '*arm64-v8a*.apk')
|
||||
APK=$(find plugin/xtls/build/outputs/apk -name '*arm64-v8a*.apk')
|
||||
APK=$(dirname $APK)
|
||||
echo "APK=$APK" >> $GITHUB_ENV
|
||||
- uses: actions/upload-artifact@v2
|
||||
@@ -144,13 +144,13 @@ jobs:
|
||||
# - name: Checkout
|
||||
# uses: actions/checkout@v2
|
||||
# - name: Fetch Status
|
||||
# run: git submodule status 'xtls-plugin/*' > xtls_status
|
||||
# run: git submodule status 'plugin/xtls/*' > xtls_status
|
||||
# - name: XTLS Cache
|
||||
# uses: actions/cache@v2
|
||||
# with:
|
||||
# path: |
|
||||
# xtls-plugin/src/main/jniLibs
|
||||
# key: ${{ hashFiles('bin/libs/xtls.sh', 'xtls_status') }}
|
||||
# plugin/xtls/src/main/jniLibs
|
||||
# key: ${{ hashFiles('bin/lib/xtls.sh', 'xtls_status') }}
|
||||
# - name: Release Build
|
||||
# run: |
|
||||
# echo "sdk.dir=${ANDROID_HOME}" > local.properties
|
||||
|
||||
62
.gitmodules
vendored
62
.gitmodules
vendored
@@ -1,48 +1,48 @@
|
||||
[submodule "core/src/main/jni/badvpn"]
|
||||
path = core/src/main/jni/badvpn
|
||||
[submodule "library/core/src/main/jni/badvpn"]
|
||||
path = library/core/src/main/jni/badvpn
|
||||
url = https://github.com/shadowsocks/badvpn
|
||||
[submodule "core/src/main/jni/libancillary"]
|
||||
path = core/src/main/jni/libancillary
|
||||
[submodule "library/core/src/main/jni/libancillary"]
|
||||
path = library/core/src/main/jni/libancillary
|
||||
url = https://github.com/shadowsocks/libancillary
|
||||
[submodule "v2ray"]
|
||||
path = v2ray
|
||||
[submodule "library/v2ray"]
|
||||
path = library/v2ray
|
||||
url = https://github.com/nekohasekai/AndroidLibV2rayLite
|
||||
[submodule "shadowsocks/src/main/rust/shadowsocks-rust"]
|
||||
path = shadowsocks/src/main/rust/shadowsocks-rust
|
||||
[submodule "library/shadowsocks/src/main/rust/shadowsocks-rust"]
|
||||
path = library/shadowsocks/src/main/rust/shadowsocks-rust
|
||||
url = https://github.com/shadowsocks/shadowsocks-rust.git
|
||||
[submodule "shadowsocksr/src/main/jni/shadowsocks-libev"]
|
||||
path = shadowsocksr/src/main/jni/shadowsocks-libev
|
||||
[submodule "library/shadowsocksr/src/main/jni/shadowsocks-libev"]
|
||||
path = library/shadowsocksr/src/main/jni/shadowsocks-libev
|
||||
url = https://github.com/shadowsocksRb/shadowsocksr-libev
|
||||
[submodule "shadowsocksr/src/main/jni/mbedtls"]
|
||||
path = shadowsocksr/src/main/jni/mbedtls
|
||||
[submodule "library/shadowsocksr/src/main/jni/mbedtls"]
|
||||
path = library/shadowsocksr/src/main/jni/mbedtls
|
||||
url = https://github.com/ARMmbed/mbedtls
|
||||
[submodule "shadowsocksr/src/main/jni/libancillary"]
|
||||
path = shadowsocksr/src/main/jni/libancillary
|
||||
[submodule "library/shadowsocksr/src/main/jni/libancillary"]
|
||||
path = library/shadowsocksr/src/main/jni/libancillary
|
||||
url = https://github.com/shadowsocks/libancillary
|
||||
[submodule "shadowsocksr/src/main/jni/pcre"]
|
||||
path = shadowsocksr/src/main/jni/pcre
|
||||
[submodule "library/shadowsocksr/src/main/jni/pcre"]
|
||||
path = library/shadowsocksr/src/main/jni/pcre
|
||||
url = https://android.googlesource.com/platform/external/pcre
|
||||
[submodule "shadowsocksr/src/main/jni/libsodium"]
|
||||
path = shadowsocksr/src/main/jni/libsodium
|
||||
[submodule "library/shadowsocksr/src/main/jni/libsodium"]
|
||||
path = library/shadowsocksr/src/main/jni/libsodium
|
||||
url = https://github.com/jedisct1/libsodium
|
||||
[submodule "shadowsocksr/src/main/jni/re2"]
|
||||
path = shadowsocksr/src/main/jni/re2
|
||||
[submodule "library/shadowsocksr/src/main/jni/re2"]
|
||||
path = library/shadowsocksr/src/main/jni/re2
|
||||
url = https://github.com/google/re2
|
||||
[submodule "xtls-plugin/src/main/go/Xray-core"]
|
||||
path = xtls-plugin/src/main/go/Xray-core
|
||||
[submodule "plugin/xtls/src/main/go/Xray-core"]
|
||||
path = plugin/xtls/src/main/go/Xray-core
|
||||
url = https://github.com/XTLS/Xray-core
|
||||
[submodule "trojan-go-plugin/src/main/go/trojan-go"]
|
||||
path = trojan-go-plugin/src/main/go/trojan-go
|
||||
[submodule "plugin/trojan-go/src/main/go/trojan-go"]
|
||||
path = plugin/trojan-go/src/main/go/trojan-go
|
||||
url = https://github.com/p4gefau1t/trojan-go
|
||||
[submodule "core/src/main/jni/proxychains-ng"]
|
||||
path = core/src/main/jni/proxychains
|
||||
path = library/core/src/main/jni/proxychains
|
||||
url = https://github.com/SagerNet/proxychains-ng
|
||||
[submodule "naive-plugin/src/main/jni/naiveproxy"]
|
||||
path = naive-plugin/src/main/jni/naiveproxy
|
||||
[submodule "plugin/naive/src/main/jni/naiveproxy"]
|
||||
path = plugin/naive/src/main/jni/naiveproxy
|
||||
url = https://github.com/klzgrad/naiveproxy
|
||||
[submodule "pt-plugin/src/main/go/pingtunnel"]
|
||||
path = pt-plugin/src/main/go/pingtunnel
|
||||
[submodule "plugin/pingtunnel/src/main/go/pingtunnel"]
|
||||
path = plugin/pingtunnel/src/main/go/pingtunnel
|
||||
url = https://github.com/esrrhs/pingtunnel
|
||||
[submodule "rb-plugin/src/main/go/relaybaton"]
|
||||
path = rb-plugin/src/main/go/relaybaton
|
||||
[submodule "plugin/relaybaton/src/main/go/relaybaton"]
|
||||
path = plugin/relaybaton/src/main/go/relaybaton
|
||||
url = https://github.com/iyouport-org/relaybaton
|
||||
|
||||
1
.idea/dictionaries/sekai.xml
generated
1
.idea/dictionaries/sekai.xml
generated
@@ -8,6 +8,7 @@
|
||||
<w>dokodemo</w>
|
||||
<w>downlink</w>
|
||||
<w>fakedns</w>
|
||||
<w>fdroid</w>
|
||||
<w>geoip</w>
|
||||
<w>geosite</w>
|
||||
<w>grpc</w>
|
||||
|
||||
34
.idea/gradle.xml
generated
34
.idea/gradle.xml
generated
@@ -4,7 +4,7 @@
|
||||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
<option name="testRunner" value="PLATFORM" />
|
||||
<option name="testRunner" value="GRADLE" />
|
||||
<option name="disableWrapperSourceDistributionNotification" value="true" />
|
||||
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
@@ -14,21 +14,25 @@
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
<option value="$PROJECT_DIR$/app" />
|
||||
<option value="$PROJECT_DIR$/colorpicker" />
|
||||
<option value="$PROJECT_DIR$/core" />
|
||||
<option value="$PROJECT_DIR$/flexbox" />
|
||||
<option value="$PROJECT_DIR$/naive-plugin" />
|
||||
<option value="$PROJECT_DIR$/buildSrc" />
|
||||
<option value="$PROJECT_DIR$/external" />
|
||||
<option value="$PROJECT_DIR$/external/colorpicker" />
|
||||
<option value="$PROJECT_DIR$/external/flexbox" />
|
||||
<option value="$PROJECT_DIR$/external/preferencex" />
|
||||
<option value="$PROJECT_DIR$/external/preferencex-colorpicker" />
|
||||
<option value="$PROJECT_DIR$/external/preferencex-ringtone" />
|
||||
<option value="$PROJECT_DIR$/external/preferencex-simplemenu" />
|
||||
<option value="$PROJECT_DIR$/library" />
|
||||
<option value="$PROJECT_DIR$/library/core" />
|
||||
<option value="$PROJECT_DIR$/library/shadowsocks" />
|
||||
<option value="$PROJECT_DIR$/library/shadowsocksr" />
|
||||
<option value="$PROJECT_DIR$/plugin" />
|
||||
<option value="$PROJECT_DIR$/preferencex" />
|
||||
<option value="$PROJECT_DIR$/preferencex-colorpicker" />
|
||||
<option value="$PROJECT_DIR$/preferencex-ringtone" />
|
||||
<option value="$PROJECT_DIR$/preferencex-simplemenu" />
|
||||
<option value="$PROJECT_DIR$/pt-plugin" />
|
||||
<option value="$PROJECT_DIR$/rb-plugin" />
|
||||
<option value="$PROJECT_DIR$/shadowsocks" />
|
||||
<option value="$PROJECT_DIR$/shadowsocksr" />
|
||||
<option value="$PROJECT_DIR$/trojan-go-plugin" />
|
||||
<option value="$PROJECT_DIR$/xtls-plugin" />
|
||||
<option value="$PROJECT_DIR$/plugin/api" />
|
||||
<option value="$PROJECT_DIR$/plugin/naive" />
|
||||
<option value="$PROJECT_DIR$/plugin/pingtunnel" />
|
||||
<option value="$PROJECT_DIR$/plugin/relaybaton" />
|
||||
<option value="$PROJECT_DIR$/plugin/trojan-go" />
|
||||
<option value="$PROJECT_DIR$/plugin/xtls" />
|
||||
</set>
|
||||
</option>
|
||||
<option name="resolveModulePerSourceSet" value="false" />
|
||||
|
||||
7
.idea/misc.xml
generated
7
.idea/misc.xml
generated
@@ -1,5 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DesignSurface">
|
||||
<option name="filePathToZoomLevelMap">
|
||||
<map>
|
||||
<entry key="naive-plugin/src/main/res/mipmap-anydpi-v26/ic_launcher.xml" value="0.20925925925925926" />
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
|
||||
10
.idea/runConfigurations.xml
generated
10
.idea/runConfigurations.xml
generated
@@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RunConfigurationProducerService">
|
||||
<option name="ignoredProducers">
|
||||
<set>
|
||||
<option value="com.android.tools.idea.compose.preview.runconfiguration.ComposePreviewRunConfigurationProducer" />
|
||||
</set>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
32
.idea/vcs.xml
generated
32
.idea/vcs.xml
generated
@@ -2,21 +2,21 @@
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/core/src/main/jni/badvpn" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/core/src/main/jni/libancillary" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/core/src/main/jni/proxychains" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/naive-plugin/src/main/jni/naiveproxy" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/pt-plugin/src/main/go/pingtunnel" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/rb-plugin/src/main/go/relaybaton" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/shadowsocks/src/main/rust/shadowsocks-rust" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/shadowsocksr/src/main/jni/libancillary" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/shadowsocksr/src/main/jni/libsodium" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/shadowsocksr/src/main/jni/mbedtls" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/shadowsocksr/src/main/jni/pcre" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/shadowsocksr/src/main/jni/re2" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/shadowsocksr/src/main/jni/shadowsocks-libev" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/trojan-go-plugin/src/main/go/trojan-go" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/v2ray" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/xtls-plugin/src/main/go/Xray-core" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/library/core/src/main/jni/badvpn" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/library/core/src/main/jni/libancillary" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/library/core/src/main/jni/proxychains" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/library/shadowsocks/src/main/rust/shadowsocks-rust" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/library/shadowsocksr/src/main/jni/libancillary" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/library/shadowsocksr/src/main/jni/libsodium" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/library/shadowsocksr/src/main/jni/mbedtls" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/library/shadowsocksr/src/main/jni/pcre" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/library/shadowsocksr/src/main/jni/re2" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/library/shadowsocksr/src/main/jni/shadowsocks-libev" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/library/v2ray" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/plugin/naive/src/main/jni/naiveproxy" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/plugin/pingtunnel/src/main/go/pingtunnel" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/plugin/relaybaton/src/main/go/relaybaton" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/plugin/trojan-go/src/main/go/trojan-go" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/plugin/xtls/src/main/go/Xray-core" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
230
app/build.gradle
230
app/build.gradle
@@ -1,230 +0,0 @@
|
||||
plugins {
|
||||
id "com.android.application"
|
||||
id "kotlin-android"
|
||||
id "kotlin-kapt"
|
||||
id "kotlin-parcelize"
|
||||
id "com.mikepenz.aboutlibraries.plugin"
|
||||
}
|
||||
|
||||
def metadata = new Properties()
|
||||
metadata.load(project.rootProject.file("sager.properties").newDataInputStream())
|
||||
|
||||
def verCode = metadata.getProperty("VERSION_CODE").toInteger()
|
||||
def verName = metadata.getProperty("VERSION_NAME")
|
||||
def packageName = metadata.getProperty("PACKAGE_NAME")
|
||||
|
||||
def keystorePwd = null
|
||||
def alias = null
|
||||
def pwd = null
|
||||
|
||||
Properties properties
|
||||
def base64 = System.getenv("LOCAL_PROPERTIES")
|
||||
if (base64 != null && !base64.isBlank()) {
|
||||
properties = new Properties()
|
||||
properties.load(new ByteArrayInputStream(Base64.decoder.decode(base64)))
|
||||
} else if (project.rootProject.file("local.properties").exists()) {
|
||||
properties = new Properties()
|
||||
properties.load(project.rootProject.file("local.properties").newDataInputStream())
|
||||
}
|
||||
|
||||
if (properties != null) {
|
||||
keystorePwd = properties.getProperty("KEYSTORE_PASS")
|
||||
alias = properties.getProperty("ALIAS_NAME")
|
||||
pwd = properties.getProperty("ALIAS_PASS")
|
||||
}
|
||||
|
||||
keystorePwd = keystorePwd ?: System.getenv("KEYSTORE_PASS")
|
||||
alias = alias ?: System.getenv("ALIAS_NAME")
|
||||
pwd = pwd ?: System.getenv("ALIAS_PASS")
|
||||
|
||||
def serviceAccountCredentialsFile = rootProject.file("service_account_credentials.json")
|
||||
def beta = verName.contains("beta")
|
||||
if (serviceAccountCredentialsFile.isFile()) {
|
||||
setupPlay(beta)
|
||||
play.serviceAccountCredentials = serviceAccountCredentialsFile
|
||||
} else if (System.getenv().containsKey("ANDROID_PUBLISHER_CREDENTIALS")) {
|
||||
setupPlay(beta)
|
||||
}
|
||||
|
||||
void setupPlay(boolean beta) {
|
||||
apply plugin: "com.github.triplet.play"
|
||||
play {
|
||||
track = "beta"
|
||||
// track = beta ? "beta" : "production"
|
||||
defaultToAppBundles = true
|
||||
}
|
||||
}
|
||||
|
||||
configurations {
|
||||
compile.exclude module: "support-v4"
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 30
|
||||
buildToolsVersion "30.0.3"
|
||||
|
||||
defaultConfig {
|
||||
applicationId packageName
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 30
|
||||
versionCode verCode
|
||||
versionName verName
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
||||
javaCompileOptions {
|
||||
annotationProcessorOptions {
|
||||
arguments += [
|
||||
"room.schemaLocation" : "$projectDir/schemas".toString(),
|
||||
"room.incremental" : "true",
|
||||
"room.expandProjection": "true"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
release {
|
||||
storeFile rootProject.file("release.keystore")
|
||||
storePassword keystorePwd
|
||||
keyAlias alias
|
||||
keyPassword pwd
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
debug {
|
||||
signingConfig keystorePwd == null ? signingConfigs.debug : signingConfigs.release
|
||||
}
|
||||
release {
|
||||
minifyEnabled true
|
||||
shrinkResources true
|
||||
proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
|
||||
signingConfig keystorePwd == null ? signingConfigs.debug : signingConfigs.release
|
||||
}
|
||||
}
|
||||
|
||||
flavorDimensions "version"
|
||||
|
||||
productFlavors {
|
||||
expert {
|
||||
// applicationIdSuffix ".expert"
|
||||
}
|
||||
oss {
|
||||
}
|
||||
play {
|
||||
versionCode verCode - 1
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
coreLibraryDesugaringEnabled true
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
disable "MissingTranslation"
|
||||
disable "ExtraTranslation"
|
||||
disable "BlockedPrivateApi"
|
||||
}
|
||||
|
||||
packagingOptions {
|
||||
exclude "/META-INF/*.version"
|
||||
exclude "/META-INF/*.kotlin_module"
|
||||
exclude "/META-INF/native-image/**"
|
||||
exclude "/META-INF/INDEX.LIST"
|
||||
exclude "DebugProbesKt.bin"
|
||||
exclude "/kotlin/**"
|
||||
|
||||
jniLibs {
|
||||
useLegacyPackaging true
|
||||
}
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
|
||||
bundle {
|
||||
language {
|
||||
enableSplit = false
|
||||
}
|
||||
}
|
||||
|
||||
splits {
|
||||
abi {
|
||||
enable true
|
||||
universalApk false
|
||||
}
|
||||
}
|
||||
|
||||
applicationVariants.all { variant ->
|
||||
variant.outputs.all { output ->
|
||||
outputFileName = outputFileName
|
||||
.replace("app", "SN-" + variant.versionName)
|
||||
.replace("-release", "")
|
||||
.replace("-oss", "")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
implementation fileTree(dir: "libs")
|
||||
implementation project(":plugin")
|
||||
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.0"
|
||||
implementation "androidx.activity:activity-ktx:1.2.3"
|
||||
implementation "androidx.fragment:fragment-ktx:1.3.3"
|
||||
implementation "androidx.browser:browser:1.3.0"
|
||||
|
||||
implementation "androidx.constraintlayout:constraintlayout:2.0.4"
|
||||
implementation "androidx.navigation:navigation-fragment-ktx:2.3.5"
|
||||
implementation "androidx.navigation:navigation-ui-ktx:2.3.5"
|
||||
implementation "androidx.preference:preference-ktx:1.1.1"
|
||||
implementation "androidx.appcompat:appcompat:1.2.0"
|
||||
implementation project(":preferencex")
|
||||
implementation project(":preferencex-simplemenu")
|
||||
implementation project(":preferencex-colorpicker")
|
||||
|
||||
implementation "com.google.android.material:material:1.3.0"
|
||||
implementation "com.squareup.okhttp3:okhttp:5.0.0-alpha.2"
|
||||
implementation "cn.hutool:hutool-core:5.6.5"
|
||||
implementation "cn.hutool:hutool-json:5.6.5"
|
||||
implementation "cn.hutool:hutool-crypto:5.6.5"
|
||||
implementation "com.google.code.gson:gson:2.8.6"
|
||||
implementation "com.google.zxing:core:3.4.1"
|
||||
implementation "com.squareup.okhttp3:okhttp:5.0.0-alpha.2"
|
||||
implementation "org.yaml:snakeyaml:1.28"
|
||||
implementation "com.github.daniel-stoneuk:material-about-library:3.2.0-rc01"
|
||||
implementation "com.mikepenz:aboutlibraries:8.8.6"
|
||||
|
||||
implementation("com.simplecityapps:recyclerview-fastscroll:2.0.1") {
|
||||
exclude group: "androidx.recyclerview"
|
||||
exclude group: "androidx.appcompat"
|
||||
}
|
||||
implementation("org.smali:dexlib2:2.5.2") {
|
||||
exclude group: "com.google.guava", module: "guava"
|
||||
}
|
||||
implementation "com.google.guava:guava:30.1.1-android"
|
||||
implementation "com.journeyapps:zxing-android-embedded:4.2.0"
|
||||
|
||||
implementation "androidx.room:room-runtime:2.3.0"
|
||||
kapt "androidx.room:room-compiler:2.3.0"
|
||||
implementation "androidx.room:room-ktx:2.3.0"
|
||||
|
||||
implementation "com.github.MatrixDev.Roomigrant:RoomigrantLib:0.3.4"
|
||||
kapt "com.github.MatrixDev.Roomigrant:RoomigrantCompiler:0.3.4"
|
||||
|
||||
implementation "com.esotericsoftware:kryo:5.1.1"
|
||||
|
||||
testImplementation "junit:junit:4.13.2"
|
||||
testImplementation "androidx.room:room-testing:2.3.0"
|
||||
androidTestImplementation "androidx.test.ext:junit:1.1.2"
|
||||
androidTestImplementation "androidx.test.espresso:espresso-core:3.3.0"
|
||||
|
||||
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:1.1.5"
|
||||
|
||||
}
|
||||
73
app/build.gradle.kts
Normal file
73
app/build.gradle.kts
Normal file
@@ -0,0 +1,73 @@
|
||||
plugins {
|
||||
id("com.android.application")
|
||||
id("kotlin-android")
|
||||
id("kotlin-kapt")
|
||||
id("kotlin-parcelize")
|
||||
id("com.mikepenz.aboutlibraries.plugin")
|
||||
}
|
||||
|
||||
setupApp()
|
||||
|
||||
android {
|
||||
compileOptions {
|
||||
isCoreLibraryDesugaringEnabled = true
|
||||
}
|
||||
kapt.arguments {
|
||||
arg("room.incremental", true)
|
||||
arg("room.schemaLocation", "$projectDir/schemas")
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
implementation(fileTree("libs"))
|
||||
implementation(project(":plugin:api"))
|
||||
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.0")
|
||||
api("androidx.core:core-ktx:1.5.0")
|
||||
implementation("androidx.activity:activity-ktx:1.2.3")
|
||||
implementation("androidx.fragment:fragment-ktx:1.3.4")
|
||||
implementation("androidx.browser:browser:1.3.0")
|
||||
|
||||
implementation("androidx.constraintlayout:constraintlayout:2.0.4")
|
||||
implementation("androidx.navigation:navigation-fragment-ktx:2.3.5")
|
||||
implementation("androidx.navigation:navigation-ui-ktx:2.3.5")
|
||||
implementation("androidx.preference:preference-ktx:1.1.1")
|
||||
implementation("androidx.appcompat:appcompat:1.3.0")
|
||||
|
||||
implementation(project(":external:preferencex"))
|
||||
implementation(project(":external:preferencex-simplemenu"))
|
||||
implementation(project(":external:preferencex-colorpicker"))
|
||||
|
||||
implementation("com.google.android.material:material:1.3.0")
|
||||
implementation("com.squareup.okhttp3:okhttp:5.0.0-alpha.2")
|
||||
implementation("cn.hutool:hutool-core:5.6.5")
|
||||
implementation("cn.hutool:hutool-json:5.6.5")
|
||||
implementation("cn.hutool:hutool-crypto:5.6.5")
|
||||
implementation("com.google.code.gson:gson:2.8.6")
|
||||
implementation("com.google.zxing:core:3.4.1")
|
||||
implementation("com.squareup.okhttp3:okhttp:5.0.0-alpha.2")
|
||||
implementation("org.yaml:snakeyaml:1.28")
|
||||
implementation("com.github.daniel-stoneuk:material-about-library:3.2.0-rc01")
|
||||
implementation("com.mikepenz:aboutlibraries:8.8.6")
|
||||
|
||||
implementation("com.simplecityapps:recyclerview-fastscroll:2.0.1") {
|
||||
exclude(group = "androidx.recyclerview")
|
||||
exclude(group = "androidx.appcompat")
|
||||
}
|
||||
implementation("org.smali:dexlib2:2.5.2") {
|
||||
exclude(group = "com.google.guava", module = "guava")
|
||||
}
|
||||
implementation("com.google.guava:guava:30.1.1-android")
|
||||
implementation("com.journeyapps:zxing-android-embedded:4.2.0")
|
||||
|
||||
implementation("androidx.room:room-runtime:2.3.0")
|
||||
kapt("androidx.room:room-compiler:2.3.0")
|
||||
implementation("androidx.room:room-ktx:2.3.0")
|
||||
|
||||
implementation("com.github.MatrixDev.Roomigrant:RoomigrantLib:0.3.4")
|
||||
kapt("com.github.MatrixDev.Roomigrant:RoomigrantCompiler:0.3.4")
|
||||
|
||||
implementation("com.esotericsoftware:kryo:5.1.1")
|
||||
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:1.1.5")
|
||||
}
|
||||
@@ -3,6 +3,6 @@
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain none -y
|
||||
echo "source \$HOME/.cargo/env" >>$HOME/.bashrc && source $HOME/.cargo/env
|
||||
|
||||
git submodule update --init shadowsocks/src/main/rust/shadowsocks-rust
|
||||
cd shadowsocks/src/main/rust/shadowsocks-rust
|
||||
git submodule update --init library/shadowsocks/src/main/rust/shadowsocks-rust
|
||||
cd library/shadowsocks/src/main/rust/shadowsocks-rust
|
||||
rustup target install armv7-linux-androideabi aarch64-linux-android i686-linux-android x86_64-linux-android
|
||||
|
||||
9
bin/lib/core.sh
Executable file
9
bin/lib/core.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "bin/init/env.sh"
|
||||
|
||||
git submodule update --init library/core/src/main/jni/*
|
||||
rm -rf library/core/build/outputs/aar
|
||||
./gradlew :library:core:assembleRelease || exit 1
|
||||
mkdir -p app/libs
|
||||
cp library/core/build/outputs/aar/* app/libs
|
||||
9
bin/lib/shadowsocks.sh
Executable file
9
bin/lib/shadowsocks.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "bin/init/env.sh"
|
||||
|
||||
git submodule update --init library/shadowsocks/src/main/rust/shadowsocks-rust
|
||||
rm -rf library/shadowsocks/build/outputs/aar
|
||||
./gradlew :library:shadowsocks:assembleRelease || exit 1
|
||||
mkdir -p app/libs
|
||||
cp library/shadowsocks/build/outputs/aar/* app/libs
|
||||
9
bin/lib/shadowsocksr.sh
Executable file
9
bin/lib/shadowsocksr.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "bin/init/env.sh"
|
||||
|
||||
git submodule update --init library/shadowsocksr/src/main/jni/*
|
||||
rm -rf library/shadowsocksr/build/outputs/aar
|
||||
./gradlew :library:shadowsocksr:assembleRelease || exit 1
|
||||
mkdir -p app/libs
|
||||
cp library/shadowsocksr/build/outputs/aar/* app/libs
|
||||
4
bin/lib/v2ray.sh
Executable file
4
bin/lib/v2ray.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
bin/lib/v2ray/init.sh
|
||||
bin/lib/v2ray/build.sh
|
||||
@@ -3,7 +3,7 @@
|
||||
source "bin/init/env.sh"
|
||||
export GO386=softfloat
|
||||
|
||||
cd "$PROJECT/v2ray"
|
||||
cd library/v2ray
|
||||
gomobile init
|
||||
gomobile bind -v -ldflags='-s -w' . || exit 1
|
||||
|
||||
@@ -4,8 +4,7 @@ source "bin/init/env.sh"
|
||||
|
||||
export PATH="$PATH:$(go env GOPATH)/bin"
|
||||
|
||||
cd $PROJECT
|
||||
[ -f v2ray/go.mod ] || git submodule update --init v2ray || exit 1
|
||||
cd v2ray
|
||||
[ -f library/v2ray/go.mod ] || git submodule update --init library/v2ray || exit 1
|
||||
cd library/v2ray
|
||||
git reset --hard && git clean -fdx
|
||||
go mod download -x && go get -v golang.org/x/mobile/cmd/... || exit 1
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "bin/init/env.sh"
|
||||
|
||||
git submodule update --init core/src/main/jni/*
|
||||
rm -rf core/build/outputs/aar
|
||||
./gradlew core:assembleRelease || exit 1
|
||||
mkdir -p app/libs
|
||||
cp core/build/outputs/aar/* app/libs
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "bin/init/env.sh"
|
||||
|
||||
git submodule update --init shadowsocks/src/main/rust/shadowsocks-rust
|
||||
rm -rf shadowsocks/build/outputs/aar
|
||||
./gradlew shadowsocks:assembleRelease || exit 1
|
||||
mkdir -p app/libs
|
||||
cp shadowsocks/build/outputs/aar/* app/libs
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "bin/init/env.sh"
|
||||
|
||||
git submodule update --init shadowsocksr/src/main/jni/*
|
||||
rm -rf shadowsocksr/build/outputs/aar
|
||||
./gradlew shadowsocksr:assembleRelease || exit 1
|
||||
mkdir -p app/libs
|
||||
cp shadowsocksr/build/outputs/aar/* app/libs
|
||||
@@ -1,34 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
source "bin/init/env.sh"
|
||||
|
||||
export CGO_ENABLED=1
|
||||
export GOOS=android
|
||||
|
||||
OUTPUT="trojan-go"
|
||||
LIB_OUTPUT="lib$OUTPUT.so"
|
||||
AAR_OUTPUT="$OUTPUT.aar"
|
||||
ROOT="$PROJECT/trojan-go-plugin/src/main/jniLibs"
|
||||
|
||||
git submodule update --init 'trojan-go-plugin/*'
|
||||
cd $PROJECT/trojan-go-plugin/src/main/go/trojan-go
|
||||
|
||||
DIR="$ROOT/armeabi-v7a"
|
||||
mkdir -p $DIR
|
||||
env CC=$ANDROID_ARM_CC GOARCH=arm GOARM=7 go build -x -o $DIR/$LIB_OUTPUT -tags "client" -trimpath -ldflags="-s -w -buildid="
|
||||
$ANDROID_ARM_STRIP $DIR/$LIB_OUTPUT
|
||||
|
||||
DIR="$ROOT/arm64-v8a"
|
||||
mkdir -p $DIR
|
||||
env CC=$ANDROID_ARM64_CC GOARCH=arm64 go build -x -o $DIR/$LIB_OUTPUT -tags "client" -trimpath -ldflags="-s -w -buildid="
|
||||
$ANDROID_ARM64_STRIP $DIR/$LIB_OUTPUT
|
||||
|
||||
DIR="$ROOT/x86"
|
||||
mkdir -p $DIR
|
||||
env CC=$ANDROID_X86_CC GOARCH=386 go build -x -o $DIR/$LIB_OUTPUT -tags "client" -trimpath -ldflags="-s -w -buildid="
|
||||
$ANDROID_X86_STRIP $DIR/$LIB_OUTPUT
|
||||
|
||||
DIR="$ROOT/x86_64"
|
||||
mkdir -p $DIR
|
||||
env CC=$ANDROID_X86_64_CC GOARCH=amd64 go build -x -o $DIR/$LIB_OUTPUT -tags "client" -trimpath -ldflags="-s -w -buildid="
|
||||
$ANDROID_X86_64_STRIP $DIR/$LIB_OUTPUT
|
||||
@@ -1,4 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
bin/libs/v2ray/init.sh
|
||||
bin/libs/v2ray/build.sh
|
||||
@@ -2,12 +2,15 @@
|
||||
|
||||
source "bin/init/env.sh"
|
||||
|
||||
ROOT="$PROJECT/naive-plugin/src/main/jniLibs"
|
||||
CURR="plugin/naive"
|
||||
CURR_PATH="$PROJECT/$CURR"
|
||||
|
||||
ROOT="$CURR_PATH/src/main/jniLibs"
|
||||
OUTPUT="naive"
|
||||
LIB_OUTPUT="lib$OUTPUT.so"
|
||||
|
||||
git submodule update --init --recursive 'naive-plugin/*'
|
||||
cd naive-plugin/src/main/jni/naiveproxy/src
|
||||
git submodule update --init --recursive "$CURR/*"
|
||||
cd $CURR_PATH/src/main/jni/naiveproxy/src
|
||||
|
||||
[ -f $NDK/BUILD.gn ] || cp ../../BUILD.gn $NDK
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "bin/init/env.sh"
|
||||
source "bin/libs/naive/build.sh"
|
||||
source "bin/plugin/naive/build.sh"
|
||||
|
||||
export EXTRA_FLAGS='target_os="android" target_cpu="arm64"'
|
||||
./get-clang.sh
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "bin/init/env.sh"
|
||||
source "bin/libs/naive/build.sh"
|
||||
source "bin/plugin/naive/build.sh"
|
||||
|
||||
export EXTRA_FLAGS='target_os="android" target_cpu="arm"'
|
||||
./get-clang.sh
|
||||
@@ -2,12 +2,15 @@
|
||||
|
||||
source "bin/init/env.sh"
|
||||
|
||||
ROOT="$PROJECT/naive-plugin/src/main/jniLibs"
|
||||
CURR="plugin/naive"
|
||||
CURR_PATH="$PROJECT/$CURR"
|
||||
|
||||
ROOT="$CURR_PATH/src/main/jniLibs"
|
||||
OUTPUT="naive"
|
||||
LIB_OUTPUT="lib$OUTPUT.so"
|
||||
|
||||
git submodule update --init --recursive 'naive-plugin/*'
|
||||
cd naive-plugin/src/main/jni/naiveproxy/src
|
||||
git submodule update --init --recursive "$CURR/*"
|
||||
cd $CURR_PATH/src/main/jni/naiveproxy/src
|
||||
|
||||
rm third_party/android_ndk
|
||||
ln -s $NDK third_party/android_ndk
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "bin/init/env.sh"
|
||||
source "bin/libs/naive/build.sh"
|
||||
source "bin/plugin/naive/build.sh"
|
||||
|
||||
export EXTRA_FLAGS='target_os="android" target_cpu="x86"'
|
||||
./get-clang.sh
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
source "bin/init/env.sh"
|
||||
source "bin/libs/naive/build.sh"
|
||||
source "bin/plugin/naive/build.sh"
|
||||
|
||||
export EXTRA_FLAGS='target_os="android" target_cpu="x64"'
|
||||
./get-clang.sh
|
||||
@@ -6,12 +6,15 @@ export GO111MODULE=off
|
||||
export CGO_ENABLED=1
|
||||
export GOOS=android
|
||||
|
||||
ROOT="$PROJECT/pt-plugin/src/main/jniLibs"
|
||||
CURR="plugin/pingtunnel"
|
||||
CURR_PATH="$PROJECT/$CURR"
|
||||
|
||||
ROOT="$CURR_PATH/src/main/jniLibs"
|
||||
OUTPUT="ptexec"
|
||||
LIB_OUTPUT="lib$OUTPUT.so"
|
||||
|
||||
git submodule update --init --recursive 'pt-plugin/*'
|
||||
cd pt-plugin/src/main/go/pingtunnel
|
||||
git submodule update --init "$CURR/*"
|
||||
cd $CURR_PATH/src/main/go/pingtunnel
|
||||
go get -v -t
|
||||
|
||||
DIR="$ROOT/armeabi-v7a"
|
||||
@@ -2,13 +2,15 @@
|
||||
|
||||
source "bin/init/env.sh"
|
||||
|
||||
CURR="plugin/relaybaton"
|
||||
CURR_PATH="$PROJECT/$CURR"
|
||||
|
||||
ROOT="$CURR_PATH/src/main/jniLibs"
|
||||
OUTPUT="relaybaton"
|
||||
LIB_OUTPUT="lib$OUTPUT.so"
|
||||
AAR_OUTPUT="$OUTPUT.aar"
|
||||
ROOT="$PROJECT/rb-plugin/src/main/jniLibs"
|
||||
|
||||
git submodule update --init 'rb-plugin/*'
|
||||
cd $PROJECT/rb-plugin/src/main/go/relaybaton
|
||||
git submodule update --init "$CURR/*"
|
||||
cd $CURR_PATH/src/main/go/relaybaton
|
||||
|
||||
export GO111MOD=on
|
||||
export CGO_ENABLED=1
|
||||
57
bin/plugin/trojan_go.sh
Executable file
57
bin/plugin/trojan_go.sh
Executable file
@@ -0,0 +1,57 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
#
|
||||
#
|
||||
# Copyright (C) 2021 by nekohasekai <sekai@neko.services>
|
||||
# Copyright (C) 2021 by Max Lv <max.c.lv@gmail.com>
|
||||
# Copyright (C) 2021 by Mygod Studio <contact-shadowsocks-android@mygod.be>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
#
|
||||
|
||||
source "bin/init/env.sh"
|
||||
|
||||
export CGO_ENABLED=1
|
||||
export GOOS=android
|
||||
|
||||
CURR="plugin/trojan-go"
|
||||
CURR_PATH="$PROJECT/$CURR"
|
||||
|
||||
ROOT="$CURR_PATH/src/main/jniLibs"
|
||||
OUTPUT="trojan-go"
|
||||
LIB_OUTPUT="lib$OUTPUT.so"
|
||||
|
||||
git submodule update --init "$CURR/*"
|
||||
cd $CURR_PATH/src/main/go/trojan-go
|
||||
|
||||
DIR="$ROOT/armeabi-v7a"
|
||||
mkdir -p $DIR
|
||||
env CC=$ANDROID_ARM_CC GOARCH=arm GOARM=7 go build -x -o $DIR/$LIB_OUTPUT -tags "client" -trimpath -ldflags="-s -w -buildid="
|
||||
$ANDROID_ARM_STRIP $DIR/$LIB_OUTPUT
|
||||
|
||||
DIR="$ROOT/arm64-v8a"
|
||||
mkdir -p $DIR
|
||||
env CC=$ANDROID_ARM64_CC GOARCH=arm64 go build -x -o $DIR/$LIB_OUTPUT -tags "client" -trimpath -ldflags="-s -w -buildid="
|
||||
$ANDROID_ARM64_STRIP $DIR/$LIB_OUTPUT
|
||||
|
||||
DIR="$ROOT/x86"
|
||||
mkdir -p $DIR
|
||||
env CC=$ANDROID_X86_CC GOARCH=386 go build -x -o $DIR/$LIB_OUTPUT -tags "client" -trimpath -ldflags="-s -w -buildid="
|
||||
$ANDROID_X86_STRIP $DIR/$LIB_OUTPUT
|
||||
|
||||
DIR="$ROOT/x86_64"
|
||||
mkdir -p $DIR
|
||||
env CC=$ANDROID_X86_64_CC GOARCH=amd64 go build -x -o $DIR/$LIB_OUTPUT -tags "client" -trimpath -ldflags="-s -w -buildid="
|
||||
$ANDROID_X86_64_STRIP $DIR/$LIB_OUTPUT
|
||||
@@ -5,13 +5,15 @@ source "bin/init/env.sh"
|
||||
export CGO_ENABLED=1
|
||||
export GOOS=android
|
||||
|
||||
CURR="plugin/xtls"
|
||||
CURR_PATH="$PROJECT/$CURR"
|
||||
|
||||
ROOT="$CURR_PATH/src/main/jniLibs"
|
||||
OUTPUT="xrayexec"
|
||||
LIB_OUTPUT="lib$OUTPUT.so"
|
||||
AAR_OUTPUT="$OUTPUT.aar"
|
||||
ROOT="$PROJECT/xtls-plugin/src/main/jniLibs"
|
||||
|
||||
git submodule update --init 'xtls-plugin/*'
|
||||
cd $PROJECT/xtls-plugin/src/main/go/Xray-core
|
||||
git submodule update --init "$CURR/*"
|
||||
cd $CURR_PATH/src/main/go/Xray-core
|
||||
|
||||
DIR="$ROOT/armeabi-v7a"
|
||||
mkdir -p $DIR
|
||||
37
build.gradle
37
build.gradle
@@ -1,37 +0,0 @@
|
||||
buildscript {
|
||||
ext {
|
||||
kotlin_version = "1.5.0"
|
||||
}
|
||||
repositories {
|
||||
mavenCentral()
|
||||
google()
|
||||
maven { url "https://plugins.gradle.org/m2/" }
|
||||
}
|
||||
dependencies {
|
||||
classpath "com.android.tools.build:gradle:4.2.1"
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
classpath "org.mozilla.rust-android-gradle:plugin:0.8.6"
|
||||
//noinspection GradleDependency
|
||||
classpath "com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin:8.8.4"
|
||||
//noinspection GradleDependency
|
||||
classpath "com.github.triplet.gradle:play-publisher:3.4.0-agp4.2"
|
||||
classpath "com.github.ben-manes:gradle-versions-plugin:0.38.0"
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id "com.github.ben-manes.versions" version "0.28.0"
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
google()
|
||||
maven { url 'https://jitpack.io' }
|
||||
}
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
||||
42
build.gradle.kts
Normal file
42
build.gradle.kts
Normal file
@@ -0,0 +1,42 @@
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
|
||||
plugins {
|
||||
id("com.github.ben-manes.versions") version "0.38.0"
|
||||
}
|
||||
|
||||
buildscript {
|
||||
apply(from = "repositories.gradle.kts")
|
||||
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
val androidPluginVersion = rootProject.extra["androidPluginVersion"].toString()
|
||||
val kotlinVersion = rootProject.extra["kotlinVersion"].toString()
|
||||
val playPublisherVersion = rootProject.extra["playPublisherVersion"].toString()
|
||||
|
||||
classpath("com.android.tools.build:gradle:$androidPluginVersion")
|
||||
classpath(kotlin("gradle-plugin", kotlinVersion))
|
||||
classpath("org.mozilla.rust-android-gradle:plugin:0.8.6")
|
||||
classpath("com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin:8.8.4")
|
||||
classpath("com.github.triplet.gradle:play-publisher:$playPublisherVersion")
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
apply(from = "${rootProject.projectDir}/repositories.gradle.kts")
|
||||
}
|
||||
|
||||
tasks.register<Delete>("clean") {
|
||||
delete(rootProject.buildDir)
|
||||
}
|
||||
|
||||
// skip uploading the mapping to Crashlytics
|
||||
subprojects {
|
||||
tasks.whenTaskAdded {
|
||||
if (name.contains("uploadCrashlyticsMappingFile")) enabled = false
|
||||
}
|
||||
}
|
||||
16
buildSrc/build.gradle.kts
Normal file
16
buildSrc/build.gradle.kts
Normal file
@@ -0,0 +1,16 @@
|
||||
plugins {
|
||||
`kotlin-dsl`
|
||||
}
|
||||
|
||||
apply(from = "../repositories.gradle.kts")
|
||||
|
||||
dependencies {
|
||||
val androidPluginVersion = rootProject.extra["androidPluginVersion"].toString()
|
||||
val kotlinVersion = rootProject.extra["kotlinVersion"].toString()
|
||||
val playPublisherVersion = rootProject.extra["playPublisherVersion"].toString()
|
||||
implementation("com.android.tools.build:gradle:$androidPluginVersion")
|
||||
implementation("com.android.tools.build:gradle-api:$androidPluginVersion")
|
||||
implementation(kotlin("gradle-plugin", kotlinVersion))
|
||||
implementation(kotlin("stdlib"))
|
||||
implementation("com.github.triplet.gradle:play-publisher:$playPublisherVersion")
|
||||
}
|
||||
346
buildSrc/src/main/kotlin/Helpers.kt
Normal file
346
buildSrc/src/main/kotlin/Helpers.kt
Normal file
@@ -0,0 +1,346 @@
|
||||
import com.android.build.gradle.AbstractAppExtension
|
||||
import com.android.build.gradle.BaseExtension
|
||||
import com.android.build.gradle.internal.api.BaseVariantOutputImpl
|
||||
import com.github.triplet.gradle.play.PlayPublisherExtension
|
||||
import org.apache.commons.codec.binary.Base64InputStream
|
||||
import org.apache.tools.ant.filters.StringInputStream
|
||||
import org.gradle.api.JavaVersion
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.plugins.ExtensionAware
|
||||
import org.gradle.kotlin.dsl.apply
|
||||
import org.gradle.kotlin.dsl.dependencies
|
||||
import org.gradle.kotlin.dsl.getByName
|
||||
import org.gradle.kotlin.dsl.kotlin
|
||||
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmOptions
|
||||
import java.util.*
|
||||
|
||||
private val Project.android get() = extensions.getByName<BaseExtension>("android")
|
||||
|
||||
private val javaVersion = JavaVersion.VERSION_1_8
|
||||
private lateinit var metadata: Properties
|
||||
private lateinit var localProperties: Properties
|
||||
|
||||
fun Project.requireMetadata(): Properties {
|
||||
if (!::metadata.isInitialized) {
|
||||
metadata = Properties().apply {
|
||||
load(rootProject.file("sager.properties").inputStream())
|
||||
}
|
||||
}
|
||||
return metadata
|
||||
}
|
||||
|
||||
fun Project.requireLocalProperties(): Properties {
|
||||
if (!::localProperties.isInitialized) {
|
||||
localProperties = Properties()
|
||||
|
||||
val base64 = System.getenv("LOCAL_PROPERTIES")
|
||||
if (!base64.isNullOrBlank()) {
|
||||
localProperties.load(Base64InputStream(StringInputStream(base64)))
|
||||
} else if (project.rootProject.file("local.properties").exists()) {
|
||||
localProperties.load(rootProject.file("local.properties").inputStream())
|
||||
}
|
||||
}
|
||||
return localProperties
|
||||
}
|
||||
|
||||
fun Project.setupCommon() {
|
||||
android.apply {
|
||||
buildToolsVersion("30.0.3")
|
||||
compileSdkVersion(30)
|
||||
defaultConfig {
|
||||
minSdkVersion(21)
|
||||
targetSdkVersion(30)
|
||||
}
|
||||
buildTypes {
|
||||
getByName("release") {
|
||||
isMinifyEnabled = true
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility = javaVersion
|
||||
targetCompatibility = javaVersion
|
||||
}
|
||||
lintOptions {
|
||||
disable("MissingTranslation")
|
||||
disable("ExtraTranslation")
|
||||
disable("BlockedPrivateApi")
|
||||
}
|
||||
packagingOptions {
|
||||
exclude("**/*.kotlin_*")
|
||||
exclude("/META-INF/*.version")
|
||||
exclude("/META-INF/native-image/**")
|
||||
exclude("/META-INF/INDEX.LIST")
|
||||
exclude("DebugProbesKt.bin")
|
||||
}
|
||||
packagingOptions {
|
||||
jniLibs.useLegacyPackaging = true
|
||||
}
|
||||
(this as? AbstractAppExtension)?.apply {
|
||||
buildTypes {
|
||||
getByName("release") {
|
||||
isShrinkResources = true
|
||||
}
|
||||
}
|
||||
applicationVariants.forEach { variant ->
|
||||
variant.outputs.forEach {
|
||||
it as BaseVariantOutputImpl
|
||||
it.outputFileName = it.outputFileName
|
||||
.replace("app", "${project.name}-" + variant.versionName)
|
||||
.replace("-release", "")
|
||||
.replace("-oss", "")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun Project.setupKotlinCommon() {
|
||||
setupCommon()
|
||||
(android as ExtensionAware).extensions.getByName<KotlinJvmOptions>("kotlinOptions").apply {
|
||||
jvmTarget = javaVersion.toString()
|
||||
}
|
||||
dependencies.apply {
|
||||
add("implementation", kotlin("stdlib-jdk8"))
|
||||
}
|
||||
}
|
||||
|
||||
fun Project.setupNdk() {
|
||||
android.ndkVersion = "21.4.7075529"
|
||||
}
|
||||
|
||||
fun Project.setupNdkLibrary() {
|
||||
setupCommon()
|
||||
setupNdk()
|
||||
android.apply {
|
||||
defaultConfig {
|
||||
externalNativeBuild.ndkBuild {
|
||||
abiFilters("armeabi-v7a", "arm64-v8a", "x86", "x86_64")
|
||||
arguments("-j${Runtime.getRuntime().availableProcessors()}")
|
||||
}
|
||||
}
|
||||
|
||||
externalNativeBuild.ndkBuild.path("src/main/jni/Android.mk")
|
||||
}
|
||||
}
|
||||
|
||||
fun Project.setupPlay(): PlayPublisherExtension {
|
||||
apply(plugin = "com.github.triplet.play")
|
||||
return (extensions.getByName("play") as PlayPublisherExtension).apply {
|
||||
track.set("beta")
|
||||
defaultToAppBundles.set(true)
|
||||
}
|
||||
}
|
||||
|
||||
fun Project.setupAppCommon() {
|
||||
setupKotlinCommon()
|
||||
|
||||
val lp = requireLocalProperties()
|
||||
val keystorePwd = lp.getProperty("KEYSTORE_PASS") ?: System.getenv("KEYSTORE_PASS")
|
||||
val alias = lp.getProperty("ALIAS_NAME") ?: System.getenv("ALIAS_NAME")
|
||||
val pwd = lp.getProperty("ALIAS_PASS") ?: System.getenv("ALIAS_PASS")
|
||||
|
||||
val serviceAccountCredentialsFile = rootProject.file("service_account_credentials.json")
|
||||
if (serviceAccountCredentialsFile.isFile) {
|
||||
setupPlay().serviceAccountCredentials.set(serviceAccountCredentialsFile)
|
||||
} else if (System.getenv().containsKey("ANDROID_PUBLISHER_CREDENTIALS")) {
|
||||
setupPlay()
|
||||
}
|
||||
|
||||
android.apply {
|
||||
if (keystorePwd != null) {
|
||||
signingConfigs {
|
||||
create("release") {
|
||||
storeFile(rootProject.file("release.keystore"))
|
||||
storePassword(keystorePwd)
|
||||
keyAlias(alias)
|
||||
keyPassword(pwd)
|
||||
}
|
||||
}
|
||||
}
|
||||
buildTypes {
|
||||
getByName("release").signingConfig = if (keystorePwd != null) {
|
||||
signingConfigs.getByName("release")
|
||||
} else {
|
||||
signingConfigs.getByName("debug")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun Project.setupPlugin(project: String) {
|
||||
val propPrefix = project.toUpperCase(Locale.ROOT)
|
||||
val verName = requireMetadata().getProperty("${propPrefix}_VERSION_NAME")
|
||||
val verCode = requireMetadata().getProperty("${propPrefix}_VERSION").toInt() * 5
|
||||
android.defaultConfig {
|
||||
applicationId = "io.nekohasekai.sagernet.plugin.${project.toLowerCase(Locale.ROOT)}"
|
||||
|
||||
versionName = verName
|
||||
versionCode = verCode
|
||||
}
|
||||
|
||||
apply(plugin = "kotlin-android")
|
||||
|
||||
setupAppCommon()
|
||||
|
||||
android.apply {
|
||||
this as AbstractAppExtension
|
||||
|
||||
buildTypes {
|
||||
getByName("release") {
|
||||
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), project(":plugin:api").file("proguard-rules.pro"))
|
||||
}
|
||||
}
|
||||
|
||||
splits.abi {
|
||||
isEnable = true
|
||||
isUniversalApk = false
|
||||
|
||||
var targetAbi = ""
|
||||
if (gradle.startParameter.taskNames.isNotEmpty()) {
|
||||
if (gradle.startParameter.taskNames.size == 1) {
|
||||
val targetTask = gradle.startParameter.taskNames[0].toLowerCase(Locale.ROOT)
|
||||
when {
|
||||
targetTask.contains("arm64") -> targetAbi = "arm64-v8a"
|
||||
targetTask.contains("arm") -> targetAbi = "armeabi-v7a"
|
||||
targetTask.contains("x64") -> targetAbi = "x86_64"
|
||||
targetTask.contains("x86") -> targetAbi = "x86"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (targetAbi.isNotBlank()) {
|
||||
reset()
|
||||
include(targetAbi)
|
||||
}
|
||||
}
|
||||
|
||||
flavorDimensions("vendor")
|
||||
productFlavors {
|
||||
create("oss")
|
||||
create("fdroidArm64") {
|
||||
versionNameSuffix = "-arm64"
|
||||
}
|
||||
create("fdroidArm") {
|
||||
versionCode = verCode - 1
|
||||
versionNameSuffix = "-arm"
|
||||
}
|
||||
create("fdroidX64") {
|
||||
versionCode = verCode - 2
|
||||
versionNameSuffix = "-x64"
|
||||
}
|
||||
create("fdroidX86") {
|
||||
versionCode = verCode - 3
|
||||
versionNameSuffix = "-x86"
|
||||
}
|
||||
create("play") {
|
||||
versionCode = verCode - 4
|
||||
}
|
||||
}
|
||||
|
||||
applicationVariants.forEach { variant ->
|
||||
variant.outputs.forEach {
|
||||
it as BaseVariantOutputImpl
|
||||
it.outputFileName = it.outputFileName
|
||||
.replace(name, "$name-plugin-" + variant.versionName)
|
||||
.replace("-release", "")
|
||||
.replace("-oss", "")
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies.add("implementation", project(":plugin:api"))
|
||||
}
|
||||
|
||||
fun Project.setupApp() {
|
||||
val pkgName = requireMetadata().getProperty("PACKAGE_NAME")
|
||||
val verName = requireMetadata().getProperty("VERSION_NAME")
|
||||
val skip = 40
|
||||
val verCode = (requireMetadata().getProperty("VERSION_CODE").toInt() - skip) * 5 + skip
|
||||
android.apply {
|
||||
defaultConfig {
|
||||
applicationId = pkgName
|
||||
versionCode = verCode
|
||||
versionName = verName
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
}
|
||||
setupAppCommon()
|
||||
|
||||
android.apply {
|
||||
this as AbstractAppExtension
|
||||
|
||||
buildTypes {
|
||||
getByName("release") {
|
||||
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), file("proguard-rules.pro"))
|
||||
}
|
||||
}
|
||||
|
||||
splits.abi {
|
||||
isEnable = true
|
||||
isUniversalApk = false
|
||||
|
||||
var targetAbi = ""
|
||||
if (gradle.startParameter.taskNames.isNotEmpty()) {
|
||||
if (gradle.startParameter.taskNames.size == 1) {
|
||||
val targetTask = gradle.startParameter.taskNames[0].toLowerCase(Locale.ROOT)
|
||||
when {
|
||||
targetTask.contains("arm64") -> targetAbi = "arm64-v8a"
|
||||
targetTask.contains("arm") -> targetAbi = "armeabi-v7a"
|
||||
targetTask.contains("x64") -> targetAbi = "x86_64"
|
||||
targetTask.contains("x86") -> targetAbi = "x86"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (targetAbi.isNotBlank()) {
|
||||
reset()
|
||||
include(targetAbi)
|
||||
}
|
||||
}
|
||||
|
||||
flavorDimensions("vendor")
|
||||
productFlavors {
|
||||
create("oss")
|
||||
create("expert")
|
||||
create("fdroidArm64") {
|
||||
versionNameSuffix = "-arm64"
|
||||
}
|
||||
create("fdroidArm") {
|
||||
versionCode = verCode - 1
|
||||
versionNameSuffix = "-arm"
|
||||
}
|
||||
create("fdroidX64") {
|
||||
versionCode = verCode - 2
|
||||
versionNameSuffix = "-x64"
|
||||
}
|
||||
create("fdroidX86") {
|
||||
versionCode = verCode - 3
|
||||
versionNameSuffix = "-x86"
|
||||
}
|
||||
create("play") {
|
||||
versionCode = verCode - 4
|
||||
}
|
||||
}
|
||||
|
||||
applicationVariants.forEach { variant ->
|
||||
variant.outputs.forEach {
|
||||
it as BaseVariantOutputImpl
|
||||
it.outputFileName = it.outputFileName
|
||||
.replace("app", "SN-" + variant.versionName)
|
||||
.replace("-release", "")
|
||||
.replace("-oss", "")
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
add("implementation", project(":plugin:api"))
|
||||
add("testImplementation", "junit:junit:4.13.2")
|
||||
add("androidTestImplementation", "androidx.test.ext:junit:1.1.2")
|
||||
add("androidTestImplementation", "androidx.test:runner:1.3.0")
|
||||
add("androidTestImplementation", "androidx.test.espresso:espresso-core:3.3.0")
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
apply plugin: 'com.android.library'
|
||||
|
||||
android {
|
||||
compileSdkVersion 30
|
||||
buildToolsVersion '30.0.3'
|
||||
defaultConfig {
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 30
|
||||
versionCode 1
|
||||
versionName "1.0.0"
|
||||
|
||||
externalNativeBuild.ndkBuild {
|
||||
abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
|
||||
arguments "-j${Runtime.getRuntime().availableProcessors()}"
|
||||
}
|
||||
}
|
||||
|
||||
externalNativeBuild.ndkBuild.path "src/main/jni/Android.mk"
|
||||
}
|
||||
@@ -17,7 +17,7 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api 'androidx.appcompat:appcompat:1.2.0'
|
||||
api 'androidx.appcompat:appcompat:1.3.0'
|
||||
api 'androidx.recyclerview:recyclerview:1.2.0'
|
||||
api project(':flexbox')
|
||||
api project(':external:flexbox')
|
||||
}
|
||||
@@ -4,13 +4,14 @@ import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import androidx.annotation.IntDef;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.ProgressBar;
|
||||
|
||||
import androidx.annotation.IntDef;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.util.Arrays;
|
||||
@@ -3,6 +3,7 @@ package com.takisoft.colorpicker;
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.StringRes;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user