Output from ivy is carefully formatted to work best in terminal. Use of monospace & pre-wrap white space make table-format output look nicer. Change-Id: If11fd57c8e685c01825fb1c2dd8b6d24fe860850 Reviewed-on: https://go-review.googlesource.com/c/mobile/+/356730 Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Hajime Hoshi <hajimehoshi@gmail.com> Trust: Peter Weinberger <pjw@google.com>
Ivy Big Number Calculator (Android)
Ivy (robpike.io/ivy) is an interpreter for an APL-like language written in Go. This repository hosts a minimal Android project used for its Android version.
How to build
Requirements
- Go 1.17 or newer
- Android SDK
- Android NDK
golang.org/x/mobile/cmd/gomobile
The gomobile
command uses ANDROID_HOME
and ANDROID_NDK_HOME
environment variables.
export ANDROID_HOME=/path/to/sdk-directory
export ANDROID_NDK_HOME=/path/to/ndk-directory
Note: Both ANDROID_SDK_ROOT and ANDROID_NDK_HOME are deprecated in Android tooling, but gomobile
still uses it. In many cases, ANDROID_HOME
corresponds to the new ANDROID_SDK_ROOT
. If you installed NDK using Android Studio's SDK manager, use the $ANDROID_SDK_ROOT/ndk/<ndk-version>/
directory as ANDROID_NDK_HOME
(where <ndk-version>
is the NDK version you want to use when compiling robpike.io/ivy
for Android.
(TODO: update gomobile
to work with modern Android layout)
From this directory, run:
go install golang.org/x/mobile/cmd/gomobile@latest
go install golang.org/x/mobile/cmd/gobind@latest
# Make sure `gomobile` and `gobind` is in your `PATH`.
gomobile bind -o app/ivy.aar robpike.io/ivy/mobile
Open this directory from Android Studio, and build.
robpike.io/ivy
and golang.org/x/mobile
are required dependencies of this main module. In order to update them:
go get -d golang.org/x/mobile@latest
go get -d robpike.io/ivy/mobile
go mod tidy