| 1 |
## Ivy Big Number Calculator (Android) |
| 2 |
|
| 3 |
[Ivy (robpike.io/ivy)](https://robpike.io/ivy) is an interpreter for an APL-like language written in Go. |
| 4 |
This repository hosts a minimal Android project used for its [Android version](https://play.google.com/store/apps/details?id=org.golang.ivy&hl=en_US&gl=US). |
| 5 |
|
| 6 |
### How to build |
| 7 |
|
| 8 |
Requirements |
| 9 |
- Go 1.17 or newer |
| 10 |
- Android SDK |
| 11 |
- Android NDK |
| 12 |
- `golang.org/x/mobile/cmd/gomobile` |
| 13 |
|
| 14 |
The `gomobile` command respects the `ANDROID_HOME` and `ANDROID_NDK_HOME` environment variables. If `gomobile` can't find your SDK and NDK, you can set these environment variables to specify their locations: |
| 15 |
``` |
| 16 |
export ANDROID_HOME=/path/to/sdk-directory |
| 17 |
export ANDROID_NDK_HOME=/path/to/ndk-directory |
| 18 |
``` |
| 19 |
|
| 20 |
From this directory, run: |
| 21 |
|
| 22 |
```sh |
| 23 |
go install golang.org/x/mobile/cmd/gomobile@latest |
| 24 |
go install golang.org/x/mobile/cmd/gobind@latest |
| 25 |
|
| 26 |
# Make sure `gomobile` and `gobind` is in your `PATH`. |
| 27 |
gomobile bind -o app/ivy.aar robpike.io/ivy/mobile |
| 28 |
``` |
| 29 |
|
| 30 |
Open this directory from Android Studio, and build. |
| 31 |
|
| 32 |
`robpike.io/ivy` and `golang.org/x/mobile` are required dependencies of this main module. In order to update them: |
| 33 |
|
| 34 |
``` |
| 35 |
go get -d golang.org/x/mobile@latest |
| 36 |
go get -d robpike.io/ivy/mobile |
| 37 |
go mod tidy |
| 38 |
``` |