From d5e94d90d37def0e3c7c58f110cbc4badba4b04e Mon Sep 17 00:00:00 2001 From: Aniket-pd Date: Mon, 8 Dec 2025 04:27:11 +0530 Subject: [PATCH 1/2] Add justfile with common project commands Introduces a justfile containing grouped commands for repository management, submodule operations, Dart formatting, analysis, documentation, testing, and cleaning build artifacts. This provides a standardized way to perform frequent development tasks. --- justfile | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 justfile diff --git a/justfile b/justfile new file mode 100644 index 0000000..03489d5 --- /dev/null +++ b/justfile @@ -0,0 +1,58 @@ +[group("Repo")] +[doc("Default command; list all available commands.")] +@list: + just --list --unsorted + +[group("Repo")] +[doc("Open repo on GitHub in your default browser.")] +repo: + open https://github.com/bitcoindevkit/bdk-dart + +[group("Submodule")] +[doc("Initialize bdk-ffi submodule to committed hash.")] +submodule-init: + git submodule update --init + +[group("Submodule")] +[doc("Hard reset the bdk-ffi submodule to committed hash.")] +submodule-reset: + git submodule update --force + +[group("Submodule")] +[doc("Checkout the bdk-ffi submodule to the latest commit on master.")] +submodule-to-master: + cd ./bdk-ffi/ \ + && git fetch origin \ + && git checkout master \ + && git pull origin master + +[group("Dart")] +[doc("Format the Dart codebase.")] +format: + dart format . + +[group("Dart")] +[doc("Run static analysis.")] +analyze: + dart analyze + +[group("Dart")] +[doc("Generate the API documentation.")] +docs: + dart doc + +[group("Dart")] +[doc("Run all tests, optionally filtering by expression.")] +test *ARGS: + dart test {{ if ARGS == "" { "" } else { ARGS } }} + +[group("Dart")] +[doc("Remove build and tool artifacts to start fresh.")] +clean: + rm -rf .dart_tool/ + rm -rf build/ + rm -rf coverage/ + rm -rf bdk_demo/.dart_tool/ + rm -rf bdk_demo/build/ + rm -rf examples/.dart_tool/ + rm -rf examples/build/ \ No newline at end of file From fff315fd0b4db4ace42ea73cbe9edabef0f6e94e Mon Sep 17 00:00:00 2001 From: Aniket-pd Date: Thu, 11 Dec 2025 02:43:24 +0530 Subject: [PATCH 2/2] Extend clean task to remove additional target directories The clean recipe now also deletes 'target/' and 'bdk-ffi/target/' directories to ensure a more thorough cleanup of build artifacts. --- justfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/justfile b/justfile index 03489d5..f5c35a5 100644 --- a/justfile +++ b/justfile @@ -51,6 +51,8 @@ test *ARGS: clean: rm -rf .dart_tool/ rm -rf build/ + rm -rf target/ + rm -rf bdk-ffi/target/ rm -rf coverage/ rm -rf bdk_demo/.dart_tool/ rm -rf bdk_demo/build/