This repository contains the native Android app for Bitkit.
Download google-services.json from the Firebase Console for each of the following build flavor groups,:
- dev/tnet/mainnetDebug: Place in
app/google-services.json - mainnetRelease: Place in
app/src/mainnetRelease/google-services.json
Note: Each flavor requires its own Firebase project configuration. The mainnet flavor will fail to build without its dedicated
google-services.jsonfile.
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 repo includes a Justfile for common Gradle and script commands.
Install just (more options):
- macOS:
brew install just - Linux:
mkdir -p ~/.local/bin && curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to ~/.local/bin - Windows:
winget install --id Casey.Just --exact - Windows shell: install Git for Windows or another
shprovider for Bash-backed recipes.
Set up local env:
just init- Uncomment only the values you need in the fresh
.envfile, such asGITHUB_ACTOR,GITHUB_TOKEN,TX_TOKEN, and E2E build settings.
Run just list to see available commands. The common ones are just init, just compile, just run, just build, just release, just test, just lint, and just translations pull. just run prefers a physical device and falls back to an emulator.
This project uses detekt with default ktlint and compose-rules for android code linting.
The following IDE plugins are recommended for development with Android Studio or IntelliJ IDEA:
Commands
just lint # run analysis + formatting check
just format # auto-fix formatting issuesReports are generated in: app/build/reports/detekt/.
The repo ships Claude Code plugins under .claude/plugins/ to give Claude domain-specific skills for local development:
- blocktank-api —
/lspskill for driving Blocktank LSP during Lightning testing.
Install or update all bundled plugins with:
./.claude/install-plugins.shCommands
just test # run unit tests
# run android tests:
just install # install
just test android # 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):
- Set the
TX_TOKENenvironment variable with your API token:export TX_TOKEN="YOUR_API_TOKEN_HERE"
- You can get your API token from Transifex account settings
- Add it to
~/.zshrcor other shell rc file to persist across sessions
- Set the
-
Pull translations:
just translations pull
When you add or modify translation keys in the EN source file, push them to Transifex:
just translations push sourceTo intentionally round-trip local source and translation files back to Transifex, use just translations push all.
- Add/modify strings in
app/src/main/res/values/strings.xml - Push to Transifex:
just translations push source - Translators work on translations in Transifex
- Pull translations:
just translations pull - Commit the updated translation files
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
Prerequisites
Setup the signing config:
- Add the keystore file to root dir (i.e.
internal.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:
just build assembleDevRelease
# just build 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
To build the mainnet flavor for release run:
just releasejust release builds both the mainnet APK and Play Store AAB. AAB is generated in app/build/outputs/bundle/mainnetRelease/.
Pass E2E=true and build any flavor. By default, E2E uses a local Electrum override.
just e2eSet E2E_BACKEND=network to use the network Electrum based on the build flavor:
# regtest (dev flavor)
just e2e network assembleDevRelease
# testnet (tnet flavor)
just e2e network assembleTnetRelease
# mainnet
just e2e network assembleMainnetReleaseBy default, geoblocking checks via API are enabled. To disable at build time, use the GEO environment variable:
just e2e no geoThis repository has Claude Code integrated for on-demand AI assistance on issues and pull requests.
Mention @claude in any PR comment, issue, or review to trigger Claude:
| Command | Description |
|---|---|
@claude review |
Request a code review of the PR |
@claude /review |
Same as above (slash command) |
@claude review focus on security |
Review with specific focus |
@claude explain this change |
Ask questions about the code |
@claude fix the null pointer issue |
Request Claude to implement a fix |
@claude /help |
Show available commands |
- Claude follows the project guidelines defined in
CLAUDE.md - Automatic reviews run on every PR open and push (updates same comment)
- On-demand assistance via
@claudementions in comments/issues - Claude can read CI results to provide context-aware feedback
- For implementation requests, Claude will create commits on your branch
@claude review
Please focus on:
- Kotlin idioms and best practices
- Potential memory leaks
- Thread safety in coroutines
To enable auto-approved permissions for Claude Code during local development:
cp .claude/settings.local.template.json .claude/settings.local.jsonThis reduces confirmation prompts for common operations (Bash, Read, Edit, Write, etc.).
Destructive operations like rm -rf, git commit, and git push still require confirmation.
Claude Code plugins provide specialized skills for development workflows. See .claude/plugins/ for available plugins.
- blocktank-api — Blocktank LSP API for LN testing on regtest
This project is licensed under the MIT License. See the LICENSE file for more details.
