mirror of https://github.com/NekoX-Dev/NekoX.git
Add scripts for reusable f-droid build
This commit is contained in:
parent
82b789b78b
commit
8be6130ffe
|
@ -0,0 +1,11 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
source $HOME/.bashrc
|
||||
|
||||
env
|
||||
|
||||
source "bin/init/env.sh"
|
||||
|
||||
bin/init/libs/ffmpeg.sh
|
||||
bin/init/libs/boringssl.sh
|
||||
bin/libs/v2ray.sh
|
|
@ -0,0 +1,33 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
env
|
||||
|
||||
## Install Go 1.15+
|
||||
wget -q -O - https://raw.githubusercontent.com/canha/golang-tools-install-script/master/goinstall.sh | bash -s -- --version 1.15.8
|
||||
|
||||
## Install rust
|
||||
source $HOME/.cargo/env
|
||||
pushd ss-rust/src/main/rust/shadowsocks-rust
|
||||
rustup target install armv7-linux-androideabi aarch64-linux-android i686-linux-android x86_64-linux-android
|
||||
popd
|
||||
|
||||
echo "rust.rustcCommand=$HOME/.cargo/bin/rustc" >> local.properties
|
||||
echo "rust.cargoCommand=$HOME/.cargo/bin/cargo" >> local.properties
|
||||
echo "rust.pythonCommand=/usr/bin/python3" >> local.properties
|
||||
|
||||
_NDK="$ANDROID_HOME/ndk/21.3.6528147"
|
||||
[ -f "$_NDK/source.properties" ] || _NDK="$ANDROID_NDK_HOME"
|
||||
[ -f "$_NDK/source.properties" ] || _NDK="$ANDROID_HOME/ndk-bundle"
|
||||
[ -f "$_NDK/source.properties" ] || echo "Error: NDK Not found"
|
||||
ANDROID_NDK_HOME=$_NDK
|
||||
|
||||
echo "NDK Found: $_NDK"
|
||||
echo "sdk.dir=$ANDROID_HOME" >> local.properties
|
||||
echo "ndk.dir=$ANDROID_NDK_HOME" >> local.properties
|
||||
|
||||
## Remove unused non-free dependencies
|
||||
pushd TMessagesProj
|
||||
|
||||
sed -i -e /play:core/d build.gradle
|
||||
sed -i -e /firebase/d build.gradle
|
||||
sed -i -e /gms/d build.gradle
|
Loading…
Reference in New Issue