Skip to content

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

@TaprootFreak

Description

@TaprootFreak

Motivation

The plugin works, but a few gaps make the repo less robust than it should be. Most importantly, CI never compiles the native code (Android/Kotlin, iOS/Swift) — a native-only change can pass every check and still break the consuming app's build (#26 was a Kotlin-only fix with zero CI coverage). Scoped, realistic improvements below.

High priority

1. Build native code in CIpull-request.yaml runs Dart (analyze/test) + Go (vet/test) only; neither Kotlin nor Swift is compiled.

  • Android job: build example/ (flutter build apk) or ./gradlew assembleDebug
  • iOS job: flutter build ios --no-codesign of example/

2. Remove/replace stale template tests — both are flutter create leftovers testing a getPlatformVersion the plugin doesn't implement (the Kotlin one is even in the wrong package com.cakewallet.bitbox):

  • android/src/test/kotlin/.../BitboxFlutterPluginTest.kt
  • example/ios/RunnerTests/RunnerTests.swift

3. Add a real LICENSE — currently literally TODO: Add your license here.; reflect the choice in pubspec.yaml.

Medium priority

4. Real README — currently the default Flutter template. Document what it does, supported devices/chains, the Dart <-> native <-> Go layering, and how the gomobile bindings are rebuilt (run_build_tool_android.sh, ffigen_config.yaml).

5. Fill pubspec metadatadescription is the template string; homepage/repository are empty.

Low priority (polish)

6. CHANGELOG — replace 0.0.1 - TODO: Describe initial release; history jumps 0.0.1 -> 0.0.8 while tags 0.0.2-0.0.7 exist.

7. Native error logging — the native layer logs almost nothing; e.g. InitBitBoxOperation swallows init failure in catch (Throwable) with no log. Add consistent Log.w(...) on native error paths.

Out of scope (deliberately)

  • No full native unit-test coverage needed — a compile/build gate plus the existing Go fakes cover the valuable ground.
  • Vendored gomobile artifacts (api.aar / Api.xcframework) can stay as-is.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions