Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
c1fa251
feat: first pigeon implementation
ElectricCookie Aug 17, 2023
40308d3
feat: all scanner parameters
ElectricCookie Aug 17, 2023
3cdd849
feat: label scanning
ElectricCookie Aug 17, 2023
3544aac
feat: scanner status
ElectricCookie Aug 17, 2023
5054e53
feat: resume, suspend, enable, disable
ElectricCookie Aug 17, 2023
9f26fbc
fix: visual adjustments to example
ElectricCookie Aug 17, 2023
d14d0b7
chore: clean up old cold
ElectricCookie Aug 17, 2023
b7914ab
chore: clean kotlin code
ElectricCookie Aug 17, 2023
77225b5
feat: register for notifications
ElectricCookie Aug 18, 2023
7390b5e
feat: soft trigger
ElectricCookie Aug 18, 2023
c6992f9
feat: soft trigger
ElectricCookie Aug 18, 2023
e591ff3
chore: cleanup, docs
ElectricCookie Aug 18, 2023
c4a8490
Bump version to 2.0.0 (#32)
felixwoestmann Aug 24, 2023
c694aa0
Add compatibility with Gradle 8.x (#27)
hohlfma Aug 24, 2023
97bfa30
Bump com.android.tools.build:gradle from 7.3.1 to 8.1.1 in /android (…
dependabot[bot] Aug 24, 2023
a361ec3
bump flutter version to current (#33)
NANASHI0X74 Aug 24, 2023
1d4b459
Bump kotlin_version from 1.7.10 to 1.9.10 in /android (#31)
dependabot[bot] Aug 24, 2023
17d9857
Bump com.android.tools.build:gradle from 8.1.1 to 8.1.2 in /android (…
dependabot[bot] Sep 29, 2023
26a1347
Bump version 2.1.0 (#35)
t-unit Sep 29, 2023
89fa385
Bump lints from 2.1.1 to 3.0.0 (#37)
dependabot[bot] Oct 20, 2023
fd9209a
Untangle profile creation and initialisation, and add functionality (…
felixwoestmann Oct 20, 2023
b24e529
fix: logging
ElectricCookie Oct 23, 2023
03cb20f
chore: bump version to 3+
ElectricCookie Oct 23, 2023
e4464bc
Bump uuid from 3.0.7 to 4.2.1 (#41)
dependabot[bot] Nov 20, 2023
cf61e30
Bump kotlin_version from 1.9.10 to 1.9.20 in /android (#39)
dependabot[bot] Nov 20, 2023
979fba5
Bump com.android.tools.build:gradle from 8.1.2 to 8.1.4 in /android (…
dependabot[bot] Nov 20, 2023
dacf024
chore: update android gradle and plugin calling
ElectricCookie Apr 5, 2024
5de7580
feat: first pigeon implementation
ElectricCookie Aug 17, 2023
3ddd34c
feat: all scanner parameters
ElectricCookie Aug 17, 2023
bfb9b97
feat: label scanning
ElectricCookie Aug 17, 2023
4229ddd
feat: scanner status
ElectricCookie Aug 17, 2023
b19492d
feat: resume, suspend, enable, disable
ElectricCookie Aug 17, 2023
90fdba0
fix: visual adjustments to example
ElectricCookie Aug 17, 2023
ccfa770
chore: clean up old cold
ElectricCookie Aug 17, 2023
8899d62
chore: clean kotlin code
ElectricCookie Aug 17, 2023
42a8ae3
feat: register for notifications
ElectricCookie Aug 18, 2023
a739355
feat: soft trigger
ElectricCookie Aug 18, 2023
440f243
feat: soft trigger
ElectricCookie Aug 18, 2023
5377d11
chore: cleanup, docs
ElectricCookie Aug 18, 2023
6f79ba8
fix: logging
ElectricCookie Oct 23, 2023
819cfb9
chore: bump version to 3+
ElectricCookie Oct 23, 2023
96b0297
chore: update android gradle and plugin calling
ElectricCookie Apr 5, 2024
35140c4
Merge branches 'main' and 'main' of github.com:ElectricCookie/flutter…
ElectricCookie Apr 5, 2024
94daf6d
fix: gradle version mismatch
ElectricCookie Apr 5, 2024
8f2e65c
fix: update example android & fix RECEIVER_EXPORTED for android o and…
ElectricCookie May 18, 2025
d9d1ca8
docs: map existing codebase
ElectricCookie Mar 21, 2026
e39e463
docs: initialize project
ElectricCookie Mar 21, 2026
37842fa
docs: complete project research
ElectricCookie Mar 21, 2026
d4118f7
docs: add CLAUDE.md project guide
ElectricCookie Mar 21, 2026
73bdee6
docs(01): create phase 1 plans (3 plans, 3 waves)
ElectricCookie Mar 21, 2026
c2d7ee7
chore(01-01): bump SDK constraints and dependency versions to latest …
ElectricCookie Mar 21, 2026
4c22d78
docs(01-01): complete pubspec dependency modernization plan
ElectricCookie Mar 21, 2026
50a90bf
feat(01-02): migrate android build.gradle to Kotlin DSL, Gradle 9.4.1…
ElectricCookie Mar 21, 2026
83f7ab9
feat(01-02): update generate.sh, regenerate Pigeon/Freezed, fix Kotli…
ElectricCookie Mar 21, 2026
a5e0929
docs(01-02): complete Android build modernization plan
ElectricCookie Mar 21, 2026
fe7f74d
test(01-03): add placeholder test file
ElectricCookie Mar 21, 2026
d8cfe31
chore(01-03): extend CI pipeline with android-build and test jobs; re…
ElectricCookie Mar 21, 2026
9c35e16
docs(01-03): complete CI pipeline plan; Phase 1 complete
ElectricCookie Mar 21, 2026
9fb98ad
docs(02): create phase 2 plans (2 plans, 2 waves)
ElectricCookie Mar 21, 2026
14b4fbf
chore(02-01): add CHANGELOG.md with Keep a Changelog header
ElectricCookie Mar 21, 2026
cd2508d
docs(02-01): complete baseline tag and changelog plan
ElectricCookie Mar 21, 2026
6d63e0b
feat(02-02): add release workflow with mtrust-api-guard semantic vers…
ElectricCookie Mar 21, 2026
7ecbfe6
chore: fix lint errors
ElectricCookie Mar 21, 2026
4fe1c09
feat: add LED feature
ElectricCookie Mar 21, 2026
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
20 changes: 0 additions & 20 deletions .github/workflows/publish-to-pub.dev.yml

This file was deleted.

47 changes: 42 additions & 5 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,18 @@ permissions:
checks: write
contents: read
env:
FLUTTER_VERSION: "3.3.10"
FLUTTER_CHANNEL: "stable"
jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Flutter Checkout
uses: actions/checkout@v4
- name: Flutter Setup
uses: subosito/flutter-action@v2
with:
cache: true
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: ${{ env.FLUTTER_CHANNEL }}
- name: Dependencies
run: flutter pub get
Expand All @@ -32,4 +30,43 @@ jobs:
fatal-warnings: true
annotate: true
- name: Check Formatting
run: flutter format --set-exit-if-changed --output none $(find lib test -name "*.dart" -not \( -name "*.*mocks.dart" \))
run: dart format --set-exit-if-changed --output none $(find lib test -name "*.dart" -not \( -name "*.freezed.dart" -o -name "*.g.dart" \))

android-build:
runs-on: ubuntu-latest
timeout-minutes: 30
needs: [lint]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Flutter Setup
uses: subosito/flutter-action@v2
with:
cache: true
channel: ${{ env.FLUTTER_CHANNEL }}
- name: Java Setup
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "17"
- name: Dependencies
run: flutter pub get
- name: Build Android Example APK
run: cd example && flutter build apk --release

test:
runs-on: ubuntu-latest
timeout-minutes: 20
needs: [lint]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Flutter Setup
uses: subosito/flutter-action@v2
with:
cache: true
channel: ${{ env.FLUTTER_CHANNEL }}
- name: Dependencies
run: flutter pub get
- name: Run Tests
run: flutter test
203 changes: 203 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,203 @@
name: Release

on:
push:
branches: [main]
paths-ignore:
- '.github/workflows/**'
- '*.md'
- 'CHANGELOG.md'
- '.gitignore'
workflow_dispatch:

permissions:
contents: write

env:
FLUTTER_CHANNEL: "stable"

jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Flutter Setup
uses: subosito/flutter-action@v2
with:
cache: true
channel: ${{ env.FLUTTER_CHANNEL }}
- name: Dependencies
run: flutter pub get
- name: Dart Analyze
run: dart analyze
- name: Check Formatting
run: dart format --set-exit-if-changed --output none $(find lib test -name "*.dart" -not \( -name "*.freezed.dart" -o -name "*.g.dart" \))

android-build:
needs: [lint]
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Flutter Setup
uses: subosito/flutter-action@v2
with:
cache: true
channel: ${{ env.FLUTTER_CHANNEL }}
- name: Java Setup
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "17"
- name: Dependencies
run: flutter pub get
- name: Build Android Example APK
run: cd example && flutter build apk --release

test:
needs: [lint]
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Flutter Setup
uses: subosito/flutter-action@v2
with:
cache: true
channel: ${{ env.FLUTTER_CHANNEL }}
- name: Dependencies
run: flutter pub get
- name: Run Tests
run: flutter test

release:
needs: [lint, android-build, test]
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Flutter Setup
uses: subosito/flutter-action@v2
with:
cache: true
channel: ${{ env.FLUTTER_CHANNEL }}

- name: Activate mtrust-api-guard
run: dart pub global activate mtrust_api_guard 6.0.4

- name: Install Dependencies
run: flutter pub get

- name: Detect API Changes
id: version
run: |
mtrust-api-guard --input pubspec.yaml --output .bump-result.json || true

if [ ! -f .bump-result.json ]; then
echo "ERROR: mtrust-api-guard did not produce output file"
exit 1
fi

echo "mtrust-api-guard output:"
cat .bump-result.json

jq empty .bump-result.json || { echo "ERROR: Invalid JSON output from mtrust-api-guard"; exit 1; }

CHANGE_TYPE=$(jq -r '.change_type // "none"' .bump-result.json)
NEW_VERSION=$(jq -r '.new_version // ""' .bump-result.json)
CHANGELOG=$(jq -r '.changelog // ""' .bump-result.json)

echo "change_type=$CHANGE_TYPE" >> $GITHUB_OUTPUT
echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT
echo "changelog<<CHANGELOG_EOF" >> $GITHUB_OUTPUT
echo "$CHANGELOG" >> $GITHUB_OUTPUT
echo "CHANGELOG_EOF" >> $GITHUB_OUTPUT

echo "Version Detection: change_type=$CHANGE_TYPE new_version=$NEW_VERSION"

- name: Skip Release (No API Changes)
if: steps.version.outputs.change_type == 'none'
run: |
echo "No API changes detected. Skipping release."
exit 0

- name: Verify No Duplicate Tag
id: check-tag
if: steps.version.outputs.change_type != 'none'
run: |
VERSION="${{ steps.version.outputs.new_version }}"
if git rev-parse "v$VERSION" >/dev/null 2>&1; then
echo "Tag v$VERSION already exists. Release is idempotent (skipping)."
echo "tag_exists=true" >> $GITHUB_OUTPUT
else
echo "Tag v$VERSION does not exist. Proceeding with release."
echo "tag_exists=false" >> $GITHUB_OUTPUT
fi

- name: Configure Git
if: steps.version.outputs.change_type != 'none' && steps.check-tag.outputs.tag_exists == 'false'
run: |
git config user.email "github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"

- name: Update pubspec.yaml Version
if: steps.version.outputs.change_type != 'none' && steps.check-tag.outputs.tag_exists == 'false'
run: |
VERSION="${{ steps.version.outputs.new_version }}"
sed -i "s/^version: .*/version: $VERSION/" pubspec.yaml
echo "Updated pubspec.yaml to version $VERSION"

- name: Update CHANGELOG.md
if: steps.version.outputs.change_type != 'none' && steps.check-tag.outputs.tag_exists == 'false'
run: |
ENTRY="${{ steps.version.outputs.changelog }}"
awk '/<!-- Entries below/{print; print ""; print "'"$ENTRY"'"; next}1' CHANGELOG.md > CHANGELOG.tmp && mv CHANGELOG.tmp CHANGELOG.md
echo "Updated CHANGELOG.md with release entry"

- name: Commit Version Bump
if: steps.version.outputs.change_type != 'none' && steps.check-tag.outputs.tag_exists == 'false'
run: |
VERSION="${{ steps.version.outputs.new_version }}"
git add pubspec.yaml CHANGELOG.md
git commit -m "chore: release $VERSION"

- name: Create Annotated Git Tag
if: steps.version.outputs.change_type != 'none' && steps.check-tag.outputs.tag_exists == 'false'
run: |
VERSION="${{ steps.version.outputs.new_version }}"
git tag -a "v$VERSION" -m "Release v$VERSION"
echo "Created annotated tag v$VERSION"

- name: Push Changes and Tags
if: steps.version.outputs.change_type != 'none' && steps.check-tag.outputs.tag_exists == 'false'
run: git push origin main --tags

- name: Create GitHub Release
if: steps.version.outputs.change_type != 'none' && steps.check-tag.outputs.tag_exists == 'false'
run: |
VERSION="${{ steps.version.outputs.new_version }}"
CHANGELOG="${{ steps.version.outputs.changelog }}"
gh release create "v$VERSION" \
--title "Release $VERSION" \
--notes "$CHANGELOG" \
--target main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Release Summary
if: always()
run: |
echo "## Release Summary"
echo "- Change Type: ${{ steps.version.outputs.change_type }}"
echo "- New Version: ${{ steps.version.outputs.new_version }}"
echo "- Tag Exists: ${{ steps.check-tag.outputs.tag_exists }}"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ Dart_packages.xml
*.idea/
pubspec.lock
doc
.planning/
89 changes: 89 additions & 0 deletions .planning/PROJECT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# flutter_datawedge Upgrade

## What This Is

A Flutter plugin for communicating with Zebra DataWedge barcode scanners via the DataWedge Intent API. This is a maintained fork consumed internally via git dependencies, now with modernized toolchains, automated CI, and semantic release automation via mtrust-api-guard.

## Core Value

The plugin must reliably bridge Flutter apps to Zebra DataWedge scanners with type-safe platform channels — all upgrades must preserve this functionality.

## Requirements

### Validated

- ✓ Scan event streaming from DataWedge to Flutter via broadcast streams — existing
- ✓ Profile creation and configuration via Intent API — existing
- ✓ Decoder management (enable/disable individual and all decoders) — existing
- ✓ Scanner status change event streaming — existing
- ✓ Type-safe Dart-Kotlin communication via Pigeon-generated platform channels — existing
- ✓ Singleton API surface via `FlutterDataWedge.instance` — existing
- ✓ Immutable data models via Freezed code generation — existing
- ✓ Custom exception hierarchy for error handling — existing
- ✓ Bump all Dart/Flutter dependencies to latest stable versions — v3.1.0
- ✓ Update Android SDK targets (compileSdk 36, Kotlin 2.3.20, Gradle 9.4.1) — v3.1.0
- ✓ Add GitHub Actions CI pipeline with lint, android-build, and test gates — v3.1.0
- ✓ Integrate mtrust-api-guard for automated semantic versioning — v3.1.0
- ✓ Add a minimal passing test as placeholder for future test coverage — v3.1.0
- ✓ Regenerate Pigeon platform channel code with updated Pigeon version — v3.1.0
- ✓ Regenerate Freezed models with updated Freezed version — v3.1.0
- ✓ Verify example app builds successfully with updated dependencies — v3.1.0

### Active

(None — next milestone requirements to be defined)

### Out of Scope

- Full test suite — deferred, placeholder test only for now
- iOS support — Android-only plugin by design
- Publishing to pub.dev — consumed via git dependencies
- Changelog automation beyond what mtrust-api-guard provides — keep it simple

## Context

- Fork of [circus-kitchens/flutter_datawedge](https://github.com/circus-kitchens/flutter_datawedge), changes never upstreamed
- Shipped v3.1.0 with Dart SDK >=3.11.0 <4.0.0, Flutter >=3.41.0
- Pigeon 26.2.3, Freezed 3.2.5, compileSdk 36, Kotlin 2.3.20, Gradle 9.4.1
- GitHub Actions CI: 3-job PR workflow (lint, android-build, test) + 4-job release workflow (mtrust-api-guard)
- Placeholder test suite (1 test)
- Consumed by internal projects via git dependency in pubspec.yaml

## Constraints

- **Platform**: Android-only — no iOS implementation exists or is planned
- **Compatibility**: Must remain compatible with Zebra DataWedge Intent API
- **Consumption**: Package installed via git URL, not pub.dev — versioning via git tags
- **Code generation**: Pigeon and Freezed upgrades require regeneration of generated files

## Key Decisions

| Decision | Rationale | Outcome |
|----------|-----------|---------|
| Use mtrust-api-guard for versioning | Automates semver based on API change detection, fits Dart/Flutter ecosystem | ✓ Shipped v3.1.0 |
| Bump to latest stable across the board | Maximize maintainability, avoid incremental upgrade pain later | ✓ Shipped v3.1.0 |
| GitHub Actions for CI | Already using GitHub for hosting, natural fit | ✓ Shipped v3.1.0 |
| Placeholder test only | No existing tests, full suite is separate effort | ✓ Shipped v3.1.0 |
| Gradle Kotlin DSL migration | Modern build config, better IDE support, aligns with Flutter template | ✓ Shipped v3.1.0 |
| v3.0.0 baseline tag on original fork | Phase 1 infrastructure captured in first automated release | ✓ Shipped v3.1.0 |
| Release on push to main + manual fallback | Fully automated releases with workflow_dispatch safety net | ✓ Shipped v3.1.0 |

## Evolution

This document evolves at phase transitions and milestone boundaries.

**After each phase transition** (via `/gsd:transition`):
1. Requirements invalidated? → Move to Out of Scope with reason
2. Requirements validated? → Move to Validated with phase reference
3. New requirements emerged? → Add to Active
4. Decisions to log? → Add to Key Decisions
5. "What This Is" still accurate? → Update if drifted

**After each milestone** (via `/gsd:complete-milestone`):
1. Full review of all sections
2. Core Value check — still the right priority?
3. Audit Out of Scope — reasons still valid?
4. Update Context with current state

---
*Last updated: 2026-03-21 after v3.1.0 milestone*
Loading