husk_sdk 0.2.0
husk_sdk: ^0.2.0 copied to clipboard
Build Flutter plugins with or without a closed-source native SDK. A Dart CLI that generates SwiftPM, CocoaPods and Gradle wiring that links a vendor xcframework and AAR when present and a stub otherwise.
Changelog #
0.2.0 #
doctorandcheckaccept--json. It prints the same report as JSON (schemaVersion1,sections, findings withlevel,messageanddetail, and the exit codecheckwould use). Process exit codes are unchanged.- Native mode for plain iOS and Android apps without Flutter:
mode: nativeinhusk.yaml(orinit --native) makesgeneratewrite a standalone Swift package and ahusk.gradlefor the app module, which link the vendor binary when it is found and a stub otherwise.linkandunlinkwork unchanged;doctorandcheckskip the plugin-only checks. - Internal simplification: less code, no change in behaviour.
- The README snippet and the example plugin report a missing vendor SDK
with the error code
vendor_sdk_missing(wassdk_unavailable). The generated code is unchanged; plugins that copied the old code keep working.
0.1.0 #
First release.
husk.yamlspec with defaults derived from the SDK name and the plugin (pubspec name, Gradle namespace); unknown keys and values that would need escaping in generated code are rejected.initwrites a commented starter spec.generatewrites, idempotently:- a block in
Package.swiftthat adds the vendorbinaryTargetand a<Sdk>Huskshim target when the xcframework is found, and the shim alone otherwise; - a block in the podspec that sets
vendored_frameworkswhen the xcframework is inhusk_vendor/; android/husk.gradle, applied from the module's build file, that links the AAR (file or private Maven repository) or compiles a stub source set;- Swift and Kotlin method channel handlers and a Dart class with
isAvailable(); .gitignore(and.pubignore, when present) entries for the vendor drop folders.
- a block in
link/unlinkcopy the vendor binaries into git-ignoredhusk_vendor/folders, keeping symbolic links and permission bits;--clear-swiftpm-cachedeletes Swift Package Manager's manifest cache so the next build notices the change.doctorreports what was found: xcframework slices, architectures, version and static or dynamic linkage; AAR package, version, minSdk and ABIs; generated file state; plugin wiring; vendor files tracked by git.checkfor CI: exit 0 when fine, 1 on problems, 2 on usage or spec errors;--require-sdk ios|androidfor builds that must link the SDK.