mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-11-26 14:21:16 +00:00
Use own build script instead of relying on syncthing build target.
This commit is contained in:
parent
c78c6a51f1
commit
fd24e50511
2 changed files with 26 additions and 5 deletions
23
build-native.sh
Executable file
23
build-native.sh
Executable file
|
@ -0,0 +1,23 @@
|
|||
#!/bin/bash
|
||||
|
||||
cd "$GOPATH/src/github.com/calmh/syncthing/"
|
||||
|
||||
./build.sh test || exit 1
|
||||
./build.sh assets
|
||||
|
||||
export GOOS=linux
|
||||
|
||||
export GOARCH=386
|
||||
|
||||
./build.sh
|
||||
cp syncthing syncthing-x86
|
||||
|
||||
export GOARCH=arm
|
||||
|
||||
export GOARM=7
|
||||
./build.sh
|
||||
cp syncthing syncthing-armeabi-v7a
|
||||
|
||||
export GOARM=5
|
||||
./build.sh
|
||||
cp syncthing syncthing-armeabi
|
|
@ -95,16 +95,14 @@ def getVersionCodeFromManifest() {
|
|||
return Integer.parseInt(matcher.group(1))
|
||||
}
|
||||
|
||||
ext.st_dir = System.getenv("GOPATH") + "/src/github.com/calmh/syncthing/";
|
||||
task buildNative(type:Exec) {
|
||||
outputs.upToDateWhen { false }
|
||||
executable = st_dir + 'build.sh'
|
||||
workingDir = st_dir;
|
||||
args = ['android']
|
||||
executable = './build-native.sh'
|
||||
}
|
||||
|
||||
task copyNative(type: Copy) {
|
||||
outputs.upToDateWhen { false }
|
||||
def st_dir = System.getenv("GOPATH") + "/src/github.com/calmh/syncthing/";
|
||||
from st_dir + 'syncthing-x86', st_dir + 'syncthing-armeabi', st_dir + 'syncthing-armeabi-v7a';
|
||||
into 'libs/'
|
||||
rename('syncthing-x86', 'x86/libsyncthing.so')
|
||||
|
|
Loading…
Reference in a new issue