Nagram/bin/fdroid/prebuild.sh

36 lines
968 B
Bash
Raw Normal View History

2021-02-28 16:06:24 +00:00
#!/usr/bin/env bash
2021-03-05 15:09:24 +00:00
source "bin/init/env.sh"
echo "sdk.dir=$ANDROID_HOME" >>local.properties
echo "ndk.dir=$ANDROID_NDK_HOME" >>local.properties
2021-02-28 16:06:24 +00:00
2021-05-26 23:42:42 +00:00
# Install Golang
curl -o golang.tar.gz https://storage.googleapis.com/golang/go1.16.linux-amd64.tar.gz
mkdir "$HOME/.go"
tar -C "$HOME/.go" --strip-components=1 -xzf golang.tar.gz
rm golang.tar.gz
export PATH="$PATH:$HOME/.go/bin"
go version || exit 1
bin/libs/v2ray/init.sh
2021-02-28 16:06:24 +00:00
## Remove unused non-free dependencies
pushd TMessagesProj
sed -i -e /play:core/d build.gradle
sed -i -e /firebase/d build.gradle
2021-02-28 18:40:50 +00:00
sed -i -e /gms/d build.gradle
2021-03-26 02:01:53 +00:00
rm -rf jni/boringssl/fuzz
2021-02-28 18:40:50 +00:00
rm jni/libwebp/swig/libwebp.jar
rm jni/libwebp/gradle/wrapper/gradle-wrapper.jar
rm jni/boringssl/util/ar/testdata/mac/libsample.a
rm jni/boringssl/util/ar/testdata/linux/libsample.a
popd
2021-03-26 02:01:53 +00:00
rm -rf ssr-libev/src/main/jni/pcre/dist/testdata
rm -rf ssr-libev/src/main/jni/mbedtls/programs/fuzz/corpuses
rm -rf ssr-libev/src/main/jni/mbedtls/tests/data_files