1
0
Fork 0
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:
Felix Ableitner 2014-05-18 15:18:42 +02:00
parent c78c6a51f1
commit fd24e50511
2 changed files with 26 additions and 5 deletions

23
build-native.sh Executable file
View 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

View file

@ -95,16 +95,14 @@ def getVersionCodeFromManifest() {
return Integer.parseInt(matcher.group(1)) return Integer.parseInt(matcher.group(1))
} }
ext.st_dir = System.getenv("GOPATH") + "/src/github.com/calmh/syncthing/";
task buildNative(type:Exec) { task buildNative(type:Exec) {
outputs.upToDateWhen { false } outputs.upToDateWhen { false }
executable = st_dir + 'build.sh' executable = './build-native.sh'
workingDir = st_dir;
args = ['android']
} }
task copyNative(type: Copy) { task copyNative(type: Copy) {
outputs.upToDateWhen { false } 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'; from st_dir + 'syncthing-x86', st_dir + 'syncthing-armeabi', st_dir + 'syncthing-armeabi-v7a';
into 'libs/' into 'libs/'
rename('syncthing-x86', 'x86/libsyncthing.so') rename('syncthing-x86', 'x86/libsyncthing.so')
@ -116,4 +114,4 @@ buildNative.finalizedBy copyNative
task cleanNative(type: Delete) { task cleanNative(type: Delete) {
delete 'libs/' delete 'libs/'
} }