Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!-- Closes | Fixes | Resolves #ISSUE_ID -->
<!-- Brief summary of the PR changes, linking to the related resources (issue/design/bug/etc) if applicable. -->

### Description

<!-- Extended summary of the changes, can be a list. -->

### Preview

<!-- Insert relevant screenshot / recording -->

### QA Notes

<!-- Add testing instructions for the PR reviewer to validate the changes. -->
<!-- List the tests you ran, including regression tests if applicable. -->
47 changes: 28 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
# Bitkit Android
# Bitkit Android (Native)

Bitkit Android Native app.
> [!CAUTION]
> ⚠️This **NOT** the repository of the Bitkit app from the app stores!
> The Bitkit app repository is here: **[github.com/synonymdev/bitkit](https://github.com/synonymdev/bitkit)**

---

## About

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

## Prerequisites

1. Download `google-services.json` to `./app` from FCM Console
2. Run Polar with the default initial network

## Dev Tips
## Development

- To communicate from host to emulator use:
`127.0.0.1` and setup port forwarding via ADB, eg. `adb forward tcp:9777 tcp:9777`
- To communicate from emulator to host use:
`10.0.2.2` instead of `localhost`
### References

- For LNURL dev testing see [bitkit-docker](https://github.com/ovitrif/bitkit-docker)

### Linting

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

Recommended Android Studio plugins:
- EditorConfig
Expand All @@ -28,29 +34,32 @@ Recommended Android Studio plugins:
./gradlew detekt # run analysis + formatting check
./gradlew detekt --auto-correct # auto-fix formatting issues
```
Lint reports are generated in: `app/build/reports/detekt/`.
Reports are generated in: `app/build/reports/detekt/`.

## Localization
See repo: https://github.com/synonymdev/bitkit-transifex-sync

## Bitcoin Networks
## 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
- `dev` flavour = regtest
- `mainnet` flavour = mainnet
- `tnet` flavour = testnet

## Build for Release
### Build for Release

**Prerequisite**: setup the signing config:
- Add the keystore file to root, eg. `./release.keystore`
- Add `keystore.properties` to root of the project (see `keystore.properties.template`)
- 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:

### Routine:
Increment `versionCode` and `versionName` in `app/build.gradle.kts`, then run:
```sh
./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').
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`
5 changes: 2 additions & 3 deletions app/src/main/java/to/bitkit/env/Env.kt
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@ internal object Env {

val vssServerUrl
get() = when (network) {
Network.REGTEST -> "https://bitkit.stag0.blocktank.to/vss"
Network.TESTNET -> "https://bitkit.stag0.blocktank.to/vss"
else -> TODO("${network.name} network not implemented")
Network.BITCOIN -> TODO("VSS not implemented for mainnet")
else -> "https://bitkit.stag0.blocktank.to/vss_rs/"
}

val vssStoreId
Expand Down
Loading