-
Notifications
You must be signed in to change notification settings - Fork 247
Building
- we use Makefile for building, internally it relies on xgo for cross building (in a nutshell, xgo is a docker image with all necessary build dependencies, for a given build target, installed)
- we are cross building for Android (
android-16/aar
) and iOS (ios-9.3/framework
, with extra variant for simulator builds) - finally, for local testing building with cgo is also exposed:
- everything is built within
build/_workspace
(we havebuild/env.sh
script that makes sure that we do not touch system-wise Go installation, and all vendored dependencies are pushed tobuild/_workspace
)
- everything is built within
Use make
or make test
(to run tests). With make executable is stored as build/bin/statusgo
. This executable runs, but does nothing impressive - just prints out build version.
Use make statusgo-android
. In order for binding to communicate up, we rely on JNI: Golang -> C -> JNI -> Java App
.
The communication code is saved in library.c
. Our patched version of xgo, allows us to distinguish between platforms:
#ifdef IOS_DEPLOYMENT
/* iOS related code */
#else
/* Android related code */
#include <jni.h>
#endif
Use either make statusgo-ios
or make statusgo-ios-simulator
(the later will build iOS library that includes simulator SDK). Again, iOS specific code in library.c
should be guarded by #ifdef IOS_DEPLOYMENT
pragma.
We build for version 9.3 of the SDKs. Once build process is done, see the build/bin
folder for artifacts.
- The xgo relies on Docker images. So, for building process to work correctly, you need to have configured Docker environment present.
- For cgo compilation, we target Golang ver 1.7.*
Project Information
Getting started
Developers
Support
Internal