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
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ jobs:

- name: Build debug app
env:
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CHATWOOT_API: ${{ secrets.CHATWOOT_API }}
run: ./gradlew assembleDevDebug

Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ jobs:

- name: Build debug app
env:
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CHATWOOT_API: ${{ secrets.CHATWOOT_API }}
E2E: true
run: ./gradlew assembleDevDebug
Expand Down Expand Up @@ -123,7 +125,7 @@ jobs:
emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -camera-back none -camera-front none
script: |
# adb port forwarding for regtest
adb reverse tcp:60001 tcp:60001
adb reverse tcp:60001 tcp:60001
cd bitkit-e2e-tests && npm run e2e:android -- --mochaOpts.grep "Can start onboarding"
env:
RECORD_VIDEO: true
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/ui-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ jobs:
- name: Make gradlew executable
run: chmod +x gradlew

- name: Build for debug with gradle
- name: Build debug app
env:
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CHATWOOT_API: ${{ secrets.CHATWOOT_API }}
run: |
./gradlew assembleDevDebug assembleDevDebugAndroidTest
ls -la app/build/outputs/apk/debug/
Expand Down
25 changes: 23 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,33 @@ This repository contains a **new native Android app** which is **not ready for p

## Development

**Prerequisites**
1. Download `google-services.json` to `app/` from FCM Console.
### 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`)

- Or `~/.gradle/local.properties`
- `gpr.user=YOUR_GITHUB_USERNAME`
- `gpr.key=YOUR_GITHUB_TOKEN`

See also:
- [bitkit-core android bindings](https://github.com/synonymdev/bitkit-core/tree/master/bindings/android#installation)

### References

- For LNURL dev testing see [bitkit-docker](https://github.com/ovitrif/bitkit-docker)
- Bitkit Core Android bindings README: [synonymdev/bitkit-core — bindings/android/README.md](https://github.com/synonymdev/bitkit-core/blob/master/bindings/android/README.md)

### Linting

Expand Down
2 changes: 1 addition & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ dependencies {
// Crypto
implementation(libs.bouncycastle.provider.jdk)
implementation(libs.ldk.node.android) { exclude(group = "net.java.dev.jna", module = "jna") }
implementation(libs.bitkitcore) { exclude(group = "net.java.dev.jna", module = "jna") }
implementation(libs.bitkitcore)
// Firebase
implementation(platform(libs.firebase.bom))
implementation(libs.firebase.messaging)
Expand Down
3 changes: 1 addition & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ activity-compose = { module = "androidx.activity:activity-compose", version.ref
appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" }
barcode-scanning = { module = "com.google.mlkit:barcode-scanning", version.ref = "barcodeScanning" }
biometric = { module = "androidx.biometric:biometric", version.ref = "biometric" }
#bitkitcore = { module = "com.synonym:bitkit-core-android", version = "0.1.9" } # mavenLocal
bitkitcore = { module = "com.github.synonymdev:bitkit-core", version = "v0.1.9" } # jitpack
bitkitcore = { module = "com.synonym:bitkit-core-android", version = "0.1.10" }
bouncycastle-provider-jdk = { module = "org.bouncycastle:bcprov-jdk18on", version.ref = "bouncyCastle" }
camera-camera2 = { module = "androidx.camera:camera-camera2", version.ref = "camera" }
camera-lifecycle = { module = "androidx.camera:camera-lifecycle", version.ref = "camera" }
Expand Down
24 changes: 24 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import java.io.FileInputStream
import java.util.Properties

pluginManagement {
repositories {
google()
Expand All @@ -13,6 +16,27 @@ dependencyResolutionManagement {
google()
mavenCentral()
maven("https://jitpack.io")
maven {
url = uri("https://maven.pkg.github.com/synonymdev/bitkit-core")
credentials {

val localPropertiesFile = File(rootDir, "gradle.properties")
val localProperties = Properties()

if (localPropertiesFile.exists()) {
localProperties.load(FileInputStream(localPropertiesFile))
}

username = System.getenv("GITHUB_ACTOR")
?: localProperties.getProperty("gpr.user")
?: providers.gradleProperty("gpr.user").orNull


password = System.getenv("GITHUB_TOKEN")
?: localProperties.getProperty("gpr.key")
?: providers.gradleProperty("gpr.key").orNull
}
}
}
}
rootProject.name = "bitkit-android"
Expand Down