-
Notifications
You must be signed in to change notification settings - Fork 74
/
update_jni.sh
executable file
·44 lines (29 loc) · 1.01 KB
/
update_jni.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
rm TMessagesProj/libs/*.aar
./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 -u github.com/golang/protobuf/protoc-gen-go
go get -v golang.org/x/mobile/cmd/...
go get -v go.starlark.net/starlark
go get -v github.com/refraction-networking/utls
go get -v github.com/gorilla/websocket
go get -v -insecure v2ray.com/core
go get github.com/2dust/AndroidLibV2rayLite
gomobile init
env GO111MODULE=off gomobile bind -v -ldflags='-s -w' github.com/2dust/AndroidLibV2rayLite
rm *-sources.jar
cd ../..
./gradlew TMessagesProj:externalNativeBuildFullFoss
OUT=TMessagesProj/build/intermediates/ndkBuild/fullFoss/obj/local
DIR=TMessagesProj/src/main/libs
rm $DIR/armeabi-v7a/*
cp $OUT/armeabi-v7a/*.so $DIR/armeabi-v7a
rm $DIR/arm64-v8a/*
cp $OUT/arm64-v8a/*.so $DIR/arm64-v8a
rm $DIR/x86/*
cp $OUT/x86/*.so $DIR/x86
rm $DIR/x86_64/*
cp $OUT/x86_64/*.so $DIR/x86_64