Skip to content

chore: harden repo CI, docs, license and native logging#28

Open
joshuakrueger-dfx wants to merge 1 commit into
DFXswiss:developfrom
joshuakrueger-dfx:chore/repo-hardening
Open

chore: harden repo CI, docs, license and native logging#28
joshuakrueger-dfx wants to merge 1 commit into
DFXswiss:developfrom
joshuakrueger-dfx:chore/repo-hardening

Conversation

@joshuakrueger-dfx

Copy link
Copy Markdown

Closes #27

Repo hardening across CI, tests, docs, license and native error logging. Each item from #27 addressed; scope kept tight and consistent with the existing project conventions.

High priority

  • Build native code in CIpull-request.yaml gains two jobs alongside the existing flutter/go/yaml-lint: android (ubuntu, JDK 17, flutter build apk --debug of example/) and ios (macos-latest, flutter build ios --no-codesign of example/). A native-only change can no longer pass every check while breaking the consuming app's build.
  • Drop stale template tests — removed the flutter create leftovers that exercised a getPlatformVersion the plugin never implements: the Android Kotlin test (wrong package com.cakewallet.bitbox) and the iOS RunnerTests.swift, including a clean removal of the RunnerTests target from the Xcode project, scheme and Podfile (no dangling refs). The now-orphaned JUnit5/mockito wiring in android/build.gradle is removed too. For consistency the identical macOS template stub (test + the template getPlatformVersion handler) is removed as well.
  • Real LICENSE — MIT (consistent with the DFXswiss org); reflected via the LICENSE file (pub derives the license from it).

Medium priority

  • Real README — documents what the plugin does, supported device (BitBox02) and chains (BTC/LTC/ETH/ERC20), the Dart ↔ native ↔ Go (gomobile) layering, and how the bindings are rebuilt (run_build_tool_android.sh, ffigen_config.yaml). Every referenced API verified against source.
  • pubspec metadata — real description, plus homepage/repository/issue_tracker.

Low priority

  • CHANGELOG — real entries for 0.0.1–0.0.8 (matches the existing tags), reconstructed from git history.
  • Native error logging — the three Android operations that caught and swallowed exceptions (InitBitBoxOperation, CloseOperation, ConnectBitBoxOperation) now emit Log.w("bitbox_flutter", ...) on the error path; no behaviour change.

Out of scope per the issue: no full native unit-test coverage, vendored gomobile artifacts left as-is.

Verification (local, Flutter 3.41.6 — the CI pin)

  • dart format clean · flutter analyze --fatal-infos clean · flutter test 11/11
  • go vet + go test green
  • flutter build apk --debug (example) → built app-debug.apk
  • flutter build ios --no-codesign (example) → built Runner.app
  • flutter build macos --debug (example) → built, confirming the macOS project edits compile
  • workflow YAML parses (the repo's own yaml-lint check)

Build the native Android (example APK) and iOS (example, --no-codesign)
code in CI so native-only changes can no longer pass every check while
breaking the consuming app's build. Drop the stale flutter-create
template tests across Android, iOS and macOS (and their Xcode/Gradle
wiring) that exercised a getPlatformVersion the plugin never implemented;
remove the matching template getPlatformVersion handler from the macOS
plugin so it is consistent with the Android and iOS bridges. Add a real
MIT LICENSE, a source-accurate README and CHANGELOG (0.0.1-0.0.8), fill
pubspec metadata, and log previously swallowed native error paths.

Closes DFXswiss#27
@TaprootFreak TaprootFreak requested a review from davidleomay June 9, 2026 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Repo hardening: build native code in CI, drop template stubs, fill in docs/license

1 participant