diff --git a/cmd/gomobile/build_androidapp.go b/cmd/gomobile/build_androidapp.go index c489381..1f6a230 100644 --- a/cmd/gomobile/build_androidapp.go +++ b/cmd/gomobile/build_androidapp.go @@ -179,6 +179,11 @@ func goAndroidBuild(pkg *build.Package) (map[string]bool, error) { assetsDirExists = fi.IsDir() } if assetsDirExists { + // if assets is a symlink, follow the symlink. + assetsDir, err = filepath.EvalSymlinks(assetsDir) + if err != nil { + return nil, err + } err = filepath.Walk(assetsDir, func(path string, info os.FileInfo, err error) error { if err != nil { return err diff --git a/cmd/gomobile/build_iosapp.go b/cmd/gomobile/build_iosapp.go index 48bb19d..9c78a02 100644 --- a/cmd/gomobile/build_iosapp.go +++ b/cmd/gomobile/build_iosapp.go @@ -140,7 +140,11 @@ func iosCopyAssets(pkg *build.Package, xcodeProjDir string) error { // skip walking through to deep copy. return nil } - + // if assets is a symlink, follow the symlink. + srcAssets, err = filepath.EvalSymlinks(srcAssets) + if err != nil { + return err + } return filepath.Walk(srcAssets, func(path string, info os.FileInfo, err error) error { if err != nil { return err