Nagram/bin/binary_libs.sh

48 lines
1.0 KiB
Bash
Raw Normal View History

2020-06-24 16:15:30 +00:00
#!/bin/bash
2020-06-25 16:44:36 +00:00
rm -f TMessagesProj/libs/*.aar
2020-06-24 16:15:30 +00:00
./gradlew ss-rust:assembleRelease
cp ss-rust/build/outputs/aar/* TMessagesProj/libs
./gradlew ssr-libev:assembleRelease
cp ssr-libev/build/outputs/aar/* TMessagesProj/libs
cd TMessagesProj/libs
go get -v golang.org/x/mobile/cmd/...
2020-07-08 04:00:22 +00:00
v2rayCore="$(go env GOPATH)/src/v2ray.com/core"
rm -rf "$v2rayCore"
mkdir -p "$v2rayCore"
git clone https://github.com/v2fly/v2ray-core.git "$v2rayCore"
go get -d github.com/2dust/AndroidLibV2rayLite
2020-06-24 16:15:30 +00:00
gomobile init
2020-07-08 04:00:22 +00:00
gomobile bind -v -ldflags='-s -w' github.com/2dust/AndroidLibV2rayLite
2020-06-24 16:15:30 +00:00
rm *-sources.jar
cd ../..
./gradlew TMessagesProj:externalNativeBuildFullFoss
OUT=TMessagesProj/build/intermediates/ndkBuild/fullFoss/obj/local
DIR=TMessagesProj/src/main/libs
2020-06-26 04:54:48 +00:00
rm -rf $DIR/armeabi-v7a
2020-06-25 16:44:36 +00:00
mkdir -p $DIR/armeabi-v7a
2020-06-24 16:15:30 +00:00
cp $OUT/armeabi-v7a/*.so $DIR/armeabi-v7a
2020-06-26 04:54:48 +00:00
rm -rf $DIR/arm64-v8a
2020-06-25 16:44:36 +00:00
mkdir -p $DIR/arm64-v8a
2020-06-24 16:15:30 +00:00
cp $OUT/arm64-v8a/*.so $DIR/arm64-v8a
2020-06-26 04:54:48 +00:00
rm -rf $DIR/x86
2020-06-25 16:44:36 +00:00
mkdir -p $DIR/x86
2020-06-24 16:15:30 +00:00
cp $OUT/x86/*.so $DIR/x86
2020-06-26 04:54:48 +00:00
rm -rf $DIR/x86_64
2020-06-25 16:44:36 +00:00
mkdir -p $DIR/x86_64
2020-06-24 16:15:30 +00:00
cp $OUT/x86_64/*.so $DIR/x86_64