Caution
The Bitkit app repository is here: github.com/synonymdev/bitkit
This repository contains a new native Android app which is not ready for production.
Some internal libraries are distributed via GitHub Packages. Configure credentials so Gradle can resolve them.
-
Create a GitHub token with
read:packagesscope. -
Provide credentials for Gradle (choose one):
-
Environment variables
GITHUB_ACTOR(your username)GITHUB_TOKEN(token withread:packages)
-
PROJECT_ROOT/local.propertiesor~/.gradle/gradle.propertiesgpr.user=YOUR_GITHUB_USERNAMEgpr.key=YOUR_GITHUB_TOKEN
-
See also:
- For LNURL dev testing see bitkit-docker
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 issuesReports are generated in: app/build/reports/detekt/.
Commands
./gradlew testDevDebugUnitTest # run unit tests
# run android tests:
./gradlew installDevDebug # install
./gradlew connectedDevDebugAndroidTest # runTo pull the latest translations from Transifex:
-
Install Transifex CLI (if not already installed):
- Follow the installation instructions: Transifex CLI Installation
-
Authenticate with Transifex (if not already configured):
- Create a
.transifexrcfile 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
- Create a
-
Pull translations:
./scripts/pull-translations.sh
The build config supports building 3 different apps for the 3 bitcoin networks (mainnet, testnet, regtest) via the 3 build flavors:
devflavour = regtestmainnetflavour = mainnettnetflavour = testnet
Simply pass E2E=true as environment variable and build any flavor.
E2E=true ./gradlew assembleDevReleaseBy default, geoblocking checks via API are enabled. To disable at build time, use the GEO environment variable:
GEO=false E2E=true ./gradlew assembleDevReleasePrerequisites
Setup the signing config:
- Add the keystore file to root dir (i.e.
release.keystore) - Setup
keystore.propertiesfile 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 flavorsAPK 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
This project is licensed under the MIT License.
See the LICENSE file for more details.