Skip to content

Commit

Permalink
Use CGO to build Syncthing with support for DNS (fixes #57)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zillode committed Nov 19, 2015
1 parent 093afbc commit a05fa80
Show file tree
Hide file tree
Showing 15 changed files with 9,883 additions and 100 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ proguard/
gradle/wrapper/gradle/
gradle/wrapper/gradlew*

# Go native dependencies
ext/golang/dist

# Syncthing native dependencies
ext/syncthing/pkg/
ext/syncthing/src/code.google.com/
Expand Down
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
[submodule "ext/syncthing/src/github.com/syncthing/syncthing"]
path = ext/syncthing/src/github.com/syncthing/syncthing
url = https://github.com/syncthing/syncthing.git
[submodule "ext/golang/go"]
path = ext/golang/go
url = https://github.com/golang/go.git
[submodule "ext/golang/go1.4"]
path = ext/golang/go1.4
url = https://github.com/golang/go.git
78 changes: 0 additions & 78 deletions build-syncthing.sh

This file was deleted.

22 changes: 1 addition & 21 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ dependencies {
androidTestCompile 'com.squareup.okhttp:mockwebserver:2.4.0'
}

preBuild {
dependsOn 'buildNative'
}

project.archivesBaseName = 'syncthing'

android {
Expand Down Expand Up @@ -104,24 +100,8 @@ android {

task buildNative(type: Exec) {
outputs.upToDateWhen { false }
executable = './build-syncthing.sh'
}

task copyNative(type: Copy) {
def lib_dir = "libs/"
new File(lib_dir).mkdirs()
def st_dir = "bin/";
from st_dir + 'syncthing-x86', st_dir + 'syncthing-armeabi';
into lib_dir
rename('syncthing-x86', 'x86/libsyncthing.so')
rename('syncthing-armeabi', 'armeabi/libsyncthing.so')
}
buildNative.finalizedBy copyNative

task cleanBin(type: Delete) {
delete 'bin/'
executable = './make-all.bash'
}
copyNative.finalizedBy cleanBin

task cleanNative(type: Delete) {
delete 'bin/'
Expand Down
1 change: 1 addition & 0 deletions ext/golang/go
Submodule go added at 525d4b
1 change: 1 addition & 0 deletions ext/golang/go1.4
Submodule go1.4 added at 50eb39
Loading

0 comments on commit a05fa80

Please sign in to comment.