Skip to content

Commit 470aa58

Browse files
ligifirmianavan
authored andcommitted
build: Add ldflags -s -w when building aar
Smaller size on mobile is always good. Might also solve our maven central upload problem
1 parent 45de47a commit 470aa58

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

build/ci.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,7 @@ func doAndroidArchive(cmdline []string) {
731731
// Build the Android archive and Maven resources
732732
build.MustRun(goTool("get", "golang.org/x/mobile/cmd/gomobile", "golang.org/x/mobile/cmd/gobind"))
733733
build.MustRun(gomobileTool("init", "--ndk", os.Getenv("ANDROID_NDK")))
734-
build.MustRun(gomobileTool("bind", "--target", "android", "--javapkg", "org.ethereum", "-v", "github.com/ethereum/go-ethereum/mobile"))
734+
build.MustRun(gomobileTool("bind", "-ldflags", "-s -w", "--target", "android", "--javapkg", "org.ethereum", "-v", "github.com/ethereum/go-ethereum/mobile"))
735735

736736
if *local {
737737
// If we're building locally, copy bundle to build dir and skip Maven
@@ -852,7 +852,7 @@ func doXCodeFramework(cmdline []string) {
852852
// Build the iOS XCode framework
853853
build.MustRun(goTool("get", "golang.org/x/mobile/cmd/gomobile", "golang.org/x/mobile/cmd/gobind"))
854854
build.MustRun(gomobileTool("init"))
855-
bind := gomobileTool("bind", "--target", "ios", "--tags", "ios", "-v", "github.com/ethereum/go-ethereum/mobile")
855+
bind := gomobileTool("bind", "-ldflags", "-s -w", "--target", "ios", "--tags", "ios", "-v", "github.com/ethereum/go-ethereum/mobile")
856856

857857
if *local {
858858
// If we're building locally, use the build folder and stop afterwards

0 commit comments

Comments
 (0)