-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathTaskfile.yml
More file actions
97 lines (83 loc) · 2.3 KB
/
Taskfile.yml
File metadata and controls
97 lines (83 loc) · 2.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# https://taskfile.dev
version: "3"
tasks:
prerequisites:
aliases: [pre]
desc: Installs some prerequisites.
cmds:
- cargo install flutter_rust_bridge_codegen
prerequisites-ts:
aliases: [prets]
desc: Installs ts prerequisites.
dir: ./ts-types/
cmds:
- npm ci
- npm run prepare
prerequisites-dt:
aliases: [predt]
desc: Installs dart dependencies.
dir: ./cal_flutter_plugin/
cmds:
- dart pub get
generate:
desc: Generates ts types and dart bindings.
aliases: [gen]
cmds:
- task: generate-types
- task: generate-dart-bindings
generate-types:
desc: Generates the ts types for cal. Cargo needs to be installed.
aliases: [gents]
dir: ./ts-types/
cmds:
- pwsh Generate-Types.ps1
generate-dart-bindings:
desc: Generates the dart bindings. Cargo and rust need to be installed.
aliases: [gendt]
dir: ./cal_flutter_plugin/
cmds:
- flutter_rust_bridge_codegen generate --rust-preamble "use std::future::Future; use std::pin::Pin; use crypto_layer::common::config::DynFuture;"
# - flutter pub run build_runner build
test:
desc: Execute non interactive tests.
cmds:
- task: test-cal
- task: test-dart-bindings
- task: test-ts-types
test-cal:
desc: Execute unit tests for the given platform. (currently only software on desktop)
aliases: [testrs]
cmds:
- cargo test -F software
test-ts-types:
desc: Tests if the ts types still compile. Npm needs to be installed.
aliases: [testts]
dir: ./ts-types/
cmds:
- npm run build
- npm run check
test-dart-bindings:
desc: Test partially generated dart bindings.
aliases: [testdt]
dir: ./cal_flutter_plugin/rust/
cmds:
- cargo c
run-flutter-app:
desc: Builds and runs the flutter app. Flutter must be installed.
aliases: [flutter]
dir: ./flutter_app/
cmds:
- flutter run
test-flutter:
desc: Run tests for the example app, testing the rust-dart bindings
aliases: [testf]
dir: ./flutter_app/
cmds:
- flutter test integration_test/cal_test.dart
build-documentation:
desc: Build the documentation of crypto-layer
aliases: [bdoc]
env:
RUSTDOCFLAGS: --cfg docsrs
cmds:
- cargo +nightly doc