diff --git a/.gitignore b/.gitignore index 15cc34a4..ef7ac00f 100644 --- a/.gitignore +++ b/.gitignore @@ -12,7 +12,7 @@ bin/ build/ gen/ -libs/ +src/main/jniLibs/ obj/ .gradle/ diff --git a/build.gradle b/build.gradle index 11a90b47..309bf4f5 100644 --- a/build.gradle +++ b/build.gradle @@ -45,12 +45,6 @@ android { testFunctionalTest true } - sourceSets { - main { - jniLibs.srcDir file("libs/") - } - } - // Without this parameter, all builds fail with error: // Execution failed for task ':mergeArmeabiDebugResources'. // > Some file crunching failed, see logs for details @@ -110,9 +104,7 @@ task buildNative(type: Exec) { } task cleanNative(type: Delete) { - delete 'bin/' - delete 'build/' - delete 'libs/' + delete 'src/main/jniLibs/' delete 'ext/syncthing/bin/' delete 'ext/syncthing/pkg/' } diff --git a/make-syncthing.bash b/make-syncthing.bash index f1838850..a4bcd77d 100755 --- a/make-syncthing.bash +++ b/make-syncthing.bash @@ -5,6 +5,7 @@ set -e RESET=1 MYDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +JNIDIR="/src/main/jniLibs" case "$1" in arm) @@ -12,20 +13,20 @@ case "$1" in export GOOS=linux export GOARCH=arm export GOARM=5 - export TARGETDIR=${MYDIR}/libs/armeabi + export TARGETDIR=$MYDIR$JNIDIR/armeabi ;; 386) export CGO_ENABLED=0 export GOOS=linux export GOARCH=386 export GO386=387 - export TARGETDIR=${MYDIR}/libs/x86 + export TARGETDIR=$MYDIR$JNIDIR/x86 ;; amd64) export CGO_ENABLED=0 export GOOS=linux export GOARCH=amd64 - export TARGETDIR=${MYDIR}/libs/x86_64 + export TARGETDIR=$MYDIR$JNIDIR/x86_64 ;; *) echo "Must specify either arm or 386 or amd64"