Skip to content

synonymdev/bitkit-android

Repository files navigation

Bitkit Android (Native)

Caution

⚠️This is NOT the repository of the Bitkit app from the app stores!
⚠️Work-in-progress
The Bitkit app repository is here: github.com/synonymdev/bitkit


About

This repository contains a new native Android app which is not ready for production.

Development

Prerequisites

1. Download google-services.json to app/ from FCM Console.

2. GitHub Packages setup

Some internal libraries are distributed via GitHub Packages. Configure credentials so Gradle can resolve them.

  1. Create a GitHub token with read:packages scope.

  2. Provide credentials for Gradle (choose one):

    • Environment variables

      • GITHUB_ACTOR (your username)
      • GITHUB_TOKEN (token with read:packages)
    • PROJECT_ROOT/local.properties or ~/.gradle/gradle.properties

      • gpr.user=YOUR_GITHUB_USERNAME
      • gpr.key=YOUR_GITHUB_TOKEN

See also:

References

Lint

This project uses detekt with default ktlint and compose-rules for android code linting.

Recommended Android Studio plugins:

  • EditorConfig
  • Detekt

Commands

./gradlew detekt # run analysis + formatting check
./gradlew detekt --auto-correct # auto-fix formatting issues

Reports are generated in: app/build/reports/detekt/.

Test

Commands

./gradlew testDevDebugUnitTest # run unit tests

# run android tests:
./gradlew installDevDebug # install
./gradlew connectedDevDebugAndroidTest # run

Localization

Pulling Translations

To pull the latest translations from Transifex:

  1. Install Transifex CLI (if not already installed):

  2. Authenticate with Transifex (if not already configured):

    • Create a .transifexrc file in your home directory (~/.transifexrc) with your API token:
      [https://www.transifex.com]
      rest_hostname = https://rest.api.transifex.com
      token         = YOUR_API_TOKEN_HERE
    • You can get your API token from your Transifex account settings
    • The CLI will prompt you for an API token if one is not configured
  3. Pull translations:

    ./scripts/pull-translations.sh

Build

Bitcoin Networks

The build config supports building 3 different apps for the 3 bitcoin networks (mainnet, testnet, regtest) via the 3 build flavors:

  • dev flavour = regtest
  • mainnet flavour = mainnet
  • tnet flavour = testnet

Build for E2E Testing

Simply pass E2E=true as environment variable and build any flavor.

E2E=true ./gradlew assembleDevRelease

Disable Geoblocking Checks

By default, geoblocking checks via API are enabled. To disable at build time, use the GEO environment variable:

GEO=false E2E=true ./gradlew assembleDevRelease

Build for Release

Prerequisites
Setup the signing config:

  • Add the keystore file to root dir (i.e. release.keystore)
  • Setup keystore.properties file in root dir (cp keystore.properties.template keystore.properties)

Routine

Increment versionCode and versionName in app/build.gradle.kts, then run:

./gradlew assembleDevRelease
# ./gradlew assembleRelease # for all flavors

APK is generated in app/build/outputs/apk/_flavor_/release. (_flavor_ can be any of 'dev', 'mainnet', 'tnet'). Example for dev: app/build/outputs/apk/dev/release

License

This project is licensed under the MIT License.
See the LICENSE file for more details.

About

⚠️ Not the Bitkit app source code. New Android app, not ready for production.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages