gomobile: init at 2020-06-22
The Android SDK is provided by `nixpkgs`, and in case of the Status Project we build our app using that SDK in combination with gomobile since our protocol library is written in Go: https://github.com/golang/mobile This tool is quite powerful and allows you even to build entire applications in Go: https://pkg.go.dev/golang.org/x/mobile/cmd/gomobile#hdr-Compile_android_APK_and_iOS_app Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
diff --git a/cmd/gomobile/bind_androidapp.go b/cmd/gomobile/bind_androidapp.go
|
||||
index 3b01adc..76216fa 100644
|
||||
--- a/cmd/gomobile/bind_androidapp.go
|
||||
+++ b/cmd/gomobile/bind_androidapp.go
|
||||
@@ -372,6 +372,10 @@ func androidAPIPath() (string, error) {
|
||||
var apiVer int
|
||||
for _, fi := range fis {
|
||||
name := fi.Name()
|
||||
+ // Resolve symlinked directories (this is how the Nix Android SDK package is built)
|
||||
+ if fi2, err := os.Stat(filepath.Join(sdkDir.Name(), name)); err == nil {
|
||||
+ fi = fi2
|
||||
+ }
|
||||
if !fi.IsDir() || !strings.HasPrefix(name, "android-") {
|
||||
continue
|
||||
}
|
||||
Reference in New Issue
Block a user