Commit Graph

28 Commits

Author SHA1 Message Date
Honza 0e4d634693 Merge + changelog update
- Updated changelog
- Merged branch 'main' into 615-networking-module

* main:
  [#882] Check properties on CI
  [#874] GRPC 1.52.1
  [#892] Emulator.wtf Gradle Plugin 0.0.15
  [#888] Android Gradle Plugin 7.4
  [#851] Androidx Updates
  [#851] Kotlin 1.8
  [#779] Resolve flaky DatabaseCoordinatorTest
  [#886] Support null block heights
  [#881] Use variables for Test Lab
  [#860] Flank 23.01.0

# Conflicts:
#	CHANGELOG.md
#	gradle.properties
2023-01-30 09:56:21 +01:00
Carter Jernigan 30979e5ebf [#851] Androidx Updates
Note that the APIs for Room, Sqlite, and Compose changed slightly with these dependency updates
2023-01-18 11:23:25 -05:00
Carter Jernigan 6e89805ee1 [#851] Kotlin 1.8 2023-01-18 11:23:25 -05:00
Honza 7c3f3f24bc Merge branch 'main' into 615-networking-module
* main:
  Bump actions/cache from 3.2.2 to 3.2.3 in /.github/actions/setup (#878)
  [#861] Remove cancel spend from public API
  [#631] Improve demo app compose UI for testing
  [#866] Clipboardmanager on Android level 21 in Demo-app
  Bump actions/upload-artifact from 3.1.1 to 3.1.2 (#871)
  Bump actions/download-artifact from 3.0.1 to 3.0.2 (#870)
  Bump actions/checkout from 3.2.0 to 3.3.0 (#869)
  [#864] Duplicate Synchronizers in Demo-app

# Conflicts:
#	demo-app/src/main/java/cash/z/ecc/android/sdk/demoapp/MainActivity.kt
#	demo-app/src/main/java/cash/z/ecc/android/sdk/demoapp/SharedViewModel.kt
#	sdk-lib/src/main/java/cash/z/ecc/android/sdk/Synchronizer.kt
2023-01-10 15:36:46 +01:00
Carter Jernigan 3afe655737
[#631] Improve demo app compose UI for testing
* Add testnet faucet to Compose UI
* Show status on home view
* Add BlockHeight for fixture wallets
* Add balance screen
* Keep screen on while syncing
* Fix conversion of seed phrase to bytes
2023-01-09 10:42:38 -05:00
Honza 8e1bef361d Merge branch 'main' into 615-networking-module
* main: (108 commits)
  [#862] Disable logging with ProGuard for Demo-app
  [#704] No static field PREVIEW_SDK_INT
  [#824] rust: cargo update
  [#855] Abandoned address property
  [#854] Regular checkpoint files update
  [#850] Use new API for build step outputs
  Bump actions/cache from 3.2.0 to 3.2.2 in /.github/actions/setup
  [#631] Initial Compose scaffolding for demo app
  Bump actions/cache from 3.0.11 to 3.2.0 in /.github/actions/setup (#845)
  [#841] Ktlint 0.48.0
  [#795] Detekt 1.22.0
  [#820] Kotlin 1.7.21 + KSP 1.7.21
  rust: Lower default log level to INFO
  Initialize the Rust library atomically
  rust: Cache span names as `CString`s
  rust: Document NDK methods and expose `ATrace_isEnabled`
  rust: cargo update
  [#819] Dokka 1.7.20
  [#815] Gradle Versions Plugin 0.44.0
  [#796] Gradle 7.6
  ...

# Conflicts:
#	CHANGELOG.md
#	darkside-test-lib/src/androidTest/java/cash/z/ecc/android/sdk/darkside/test/TestWallet.kt
#	demo-app/src/androidTest/java/cash/z/wallet/sdk/sample/demoapp/SampleCodeTest.kt
#	demo-app/src/main/java/cash/z/ecc/android/sdk/demoapp/MainActivity.kt
#	demo-app/src/main/java/cash/z/ecc/android/sdk/demoapp/demos/getbalance/GetBalanceFragment.kt
#	demo-app/src/main/java/cash/z/ecc/android/sdk/demoapp/demos/listtransactions/ListTransactionsFragment.kt
#	demo-app/src/main/java/cash/z/ecc/android/sdk/demoapp/demos/listutxos/ListUtxosFragment.kt
#	demo-app/src/main/java/cash/z/ecc/android/sdk/demoapp/demos/send/SendFragment.kt
#	gradle.properties
#	sdk-lib/src/androidTest/java/cash/z/ecc/android/sdk/integration/SanityTest.kt
#	sdk-lib/src/androidTest/java/cash/z/ecc/android/sdk/integration/TestnetIntegrationTest.kt
#	sdk-lib/src/androidTest/java/cash/z/ecc/android/sdk/integration/service/ChangeServiceTest.kt
#	sdk-lib/src/androidTest/java/cash/z/ecc/android/sdk/internal/transaction/PersistentTransactionManagerTest.kt
#	sdk-lib/src/androidTest/java/cash/z/ecc/android/sdk/util/TestWallet.kt
#	sdk-lib/src/main/AndroidManifest.xml
#	sdk-lib/src/main/java/cash/z/ecc/android/sdk/Initializer.kt
#	sdk-lib/src/main/java/cash/z/ecc/android/sdk/SdkSynchronizer.kt
#	sdk-lib/src/main/java/cash/z/ecc/android/sdk/Synchronizer.kt
#	sdk-lib/src/main/java/cash/z/ecc/android/sdk/block/CompactBlockProcessor.kt
#	sdk-lib/src/main/java/cash/z/ecc/android/sdk/internal/block/CompactBlockDownloader.kt
#	sdk-lib/src/main/java/cash/z/ecc/android/sdk/internal/service/LightWalletGrpcService.kt
#	sdk-lib/src/main/java/cash/z/ecc/android/sdk/internal/transaction/PersistentTransactionManager.kt
#	settings.gradle.kts
2023-01-09 14:29:14 +01:00
Carter Jernigan a4a6b25bfb
[#631] Initial Compose scaffolding for demo app
* [#631] Initial Compose scaffolding for demo app

* Bump Compose Compiler

- To bypass Kotlin version incompatibility

* Switch ConfigureSeed from Column to Scaffold

- To unify our screens UI components
- And to have a fullscreen content, and thus avoid another background color out of column (e.g. in system dark mode)

* Split addresses to two rows

- To reduce a risk of a user overlooks other addresses scrolled out of the screen

* Additional code migrated from Secant

- Added just missing test files, fixtures and model classes
- Fix previously broken dependencies imports

* Link issue to code

Co-authored-by: Honza <rychnovsky.honza@gmail.com>
2022-12-23 11:00:37 +01:00
Honza Rychnovsky 870041a809
[#814] AndroidX Dependencies Update 2022-12-14 16:49:13 +01:00
Honza Rychnovsky 97c0628798
[#789] Benchmarking Demo-app
* [#789] Add Benchmark module to Demo-app

* Code cleanup

* Opti-in experimental coroutines api in tests

* Add Testing documentation

* Documentation update + ktlint

* Check screen on and keyguard unlocked in each test

* Introduce UiAutomator extensions

* Enhance BenchmarkTrace events definition

* Remove unnecessary mutex

* Change blocks range

* Increase sync blockchain timeout

- To always fit in the Balances screen timeout for the selected blocks range

* Remove unnecessary fun suspend modifiers

* Macrobenchmark lib bump to 1.2.0-alpha8

* Remove duplicate label attr in app/manifest

* File and link benchmark on CI task

* Add proguard keep rules

* Documentation update
2022-12-13 14:25:09 +01:00
Carter Jernigan 4c2807aefd
[#705] Roomoval
The Android and Rust code have previously managed joint custody of the derived data database.  With more complex migrations now required, we need to make the Android side read-only.  To achieve that, the Android side will remove Room and instead rely on more primitive SQLite APIs for read-only access.

As part of implementing this change, database management throughout the SDK is being refactored.

There will be multiple representations of the data:
 - Database representation (and some Entity representations in the places that Room hasn’t been removed yet).  These representations are not as type safe and don’t match Kotlin best practices in all cases.
 - Once #615 is implemented there will also be network representations
 - Type safe models, which often appear in the public API  The Database and Network representations will be converted to and from the type safe model representation.
2022-10-19 16:52:54 -04:00
Carter Jernigan b58ffec5ba [#615] Refactor lightwalletd client
This moves the lightwalletd client code to a separate Gradle module, but does not yet do much clean up the public API (e.g. hiding generated GRPC objects).  That will be a followon change via #673

I’ve prototyped a safer version of the API that would be implemented for #673 for two specific calls: obtaining the current block height and obtaining the light wallet info.  These were the easiest endpoints to update and they provide a useful exploration for the future changes needed.
2022-09-14 15:33:36 -04:00
Honza Rychnovsky 1fae5beab6
[#509] Remove OkHttp and Okio dependencies
* [#509] Remove OkHttp and Okio dependencies
- Okio -> Java NIO anf OkHttp -> HttpURLConnection in SaplingParamTool class
- Both replaced also in the test packages
- Removed dependencies to the replaced components
- Again switched a few assertions from JUnit to kotlin.test
- Created readLinesInFlow() function which is now reused in few places and runs without OkHttp
- Added subsequent TODOs to code base
- Wrapped to withContext to move it to an IO thread.
- Added use function on the stream and close() at the end of the channels use.
Co-authored-by: Carter Jernigan <git@carterjernigan.com>
2022-08-25 14:36:57 +02:00
Carter Jernigan 10d0652a8d
[#252] Replace third party publishing Gradle plugin
The third party plugin that we’ve used for publishing has introduced multiple breaking changes recently.

By migrating to more standard Gradle publishing APIs, the deployment process is more explicit for those unfamiliar with Gradle.  It also will simplify some upcoming changes to modularize this SDK project.
2022-08-16 08:53:23 -04:00
Carter Jernigan 823e8387cb
[#477] Typesafe Zatoshi APIs for amounts 2022-06-21 19:34:42 -04:00
Carter Jernigan a5a07becd8
[#548] Configure testing with emulator.wtf 2022-06-21 07:57:04 -04:00
Carter Jernigan 17c09908a8 [#421] Maven Publish 0.20.0 2022-06-16 08:11:46 -04:00
Carter Jernigan aba6800be7 [#464] Flank 22.03.0 2022-04-06 15:42:46 -04:00
Carter Jernigan 22e77134c5 [#411] Version catalog syntax update 2022-04-06 15:42:46 -04:00
Carter Jernigan 1ab79286f4 [#374] Android Gradle Plugin 7.1 2022-02-02 14:22:55 -05:00
Carter Jernigan 3c575a497c Configure build with GitHub Actions
Also configure testing with Firebase Test Lab
2022-01-26 15:19:28 -05:00
Carter Jernigan eb728fe3d8 [#330] Use KSP for annotation processing
This resolves issues with included builds
2022-01-06 06:59:40 -05:00
Carter Jernigan abac552ab5 [#284] Refactor darkside tests to separate module
Simplifies running the SDK test suite versus darkside tests (which require special environment setup).

Note that the darkside tests are still broken.  This is not a regression, as they were broken before.  This is an intermediate step towards fixing those tests.
2021-09-27 14:55:08 -04:00
Carter Jernigan 5730bec3c6 [#256] Configure Gradle Versions Plugin
This will provide reports on dependecy updates that are available.

Its outside the critical path of the build, so it can be readily disabled or replaced in the future.
2021-09-25 12:54:42 -04:00
Carter Jernigan dfe7dad834 [#256] Use Gradle Version Catalog for dependencies 2021-09-25 12:54:42 -04:00
Carter Jernigan 07d02e6cea [#285] Implement gradle build conventions
In addition to using build-conventions to make the build scripts more DRY, the following additional changes are included in this commit:

- Convert build scripts to kts
- Fix a double-build issue with the SDK
- Add configurable options for treating compiler warnings as errors (disabled for now, due to extensive warnings that need to be corrected first)
- Added detekt as an additional static analysis tool
2021-09-25 12:54:42 -04:00
Carter Jernigan 9ed80a5d4a [#274] Enable typesafe project dependencies 2021-09-13 13:42:53 -04:00
Carter Jernigan fbf4b86662 [#260] Remove repository declaration for JCenter 2021-09-12 16:51:19 -04:00
Carter Jernigan 2268f814f2 [#255] Refactor Gradle Modules
Move SDK from the root gradle project to its own Gradle module
Move the demo app to be a peer of the SDK

This will simplify integration with CI on Bitrise.
2021-08-31 14:53:25 -04:00