Skip to content

Commit

Permalink
Use CGO to build Syncthing with support for DNS (fixes syncthing#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zillode committed Nov 15, 2015
1 parent 093afbc commit 58d6a7e
Show file tree
Hide file tree
Showing 15 changed files with 9,883 additions and 113 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.

34 changes: 0 additions & 34 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 @@ -102,33 +98,3 @@ 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/'
}
copyNative.finalizedBy cleanBin

task cleanNative(type: Delete) {
delete 'bin/'
delete 'build/'
delete 'libs/'
delete 'ext/syncthing/bin/'
delete 'ext/syncthing/pkg/'
}
clean.dependsOn cleanNative

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 58d6a7e

Please sign in to comment.