The backend services rely on Google Cloud components - Datastore and PubSub. There are emulators for Datastore and PubSub.
In order to run locally:
-
Configure Python virtualenv:
virtualenv .env --python=`which python3` source .env/bin/activate pip install -r scripts/requirements.txt
-
Start and configure the emulators (you may be prompted to install various components the first time through):
./scripts/configure-local-env.sh
The emulators can be killed via Ctrl+C.
-
Start the services:
export PUBSUB_EMULATOR_HOST=localhost:10000 export DATASTORE_EMULATOR_HOST=localhost:11000 ./gradlew run --parallel
Note: All of these require the above emulator environment variables to be set.
./scripts/create-user.py
This prints the user's ID and code.
./scripts/register-user.py -u ${USER_ID}
This prints the user's ID.
./scripts/register-user.py -u ${USER_ID}
You can also specify the number of messages to send with the -n
flag, and override the JSON message content with the
-p
flag.
The release APK is signed with a private key maintained in a keystore that's injected via a CircleCI environment
variable (along with passwords). This avoids this material being held in the same repo as the code itself. The
script in the ziggy-secrets
repo sets the following environment variables in CircleCI:
ZIGGY_KEYSTORE
ZIGGY_STORE_PASSWORD
ZIGGY_KEY_PASSWORD
Need to set the applicationId
to something sensible - it needs to be the same for the lifetime of the app.
See https://developer.android.com/studio/build/application-id.html for more info.
Note there's both versionCode
and versionName
to consider. Could use the CircleCI build # for the former, unclear
what to do for the latter. Maybe based on Git tags?
See https://developer.android.com/studio/publish/versioning.html for more info.
This project is made available under BSD License 2.0.