File tree Expand file tree Collapse file tree 1 file changed +0
-28
lines changed Expand file tree Collapse file tree 1 file changed +0
-28
lines changed Original file line number Diff line number Diff line change 2
2
// Copyright (c) 2023-2024 Rust Nostr Developers
3
3
// Distributed under the MIT software license
4
4
5
- use std:: process:: { Command , Stdio } ;
6
-
7
5
use lib_flutter_rust_bridge_codegen:: codegen;
8
6
use lib_flutter_rust_bridge_codegen:: codegen:: Config ;
9
7
10
8
fn main ( ) {
11
9
println ! ( "cargo:rerun-if-changed=src/api" ) ;
12
10
13
- if !is_dart_installed ( ) {
14
- panic ! ( "Warning: dart not installed." ) ;
15
- }
16
-
17
- if !is_flutter_installed ( ) {
18
- panic ! ( "Warning: flutter not installed." ) ;
19
- }
20
-
21
11
// Execute code generator with auto-detected config
22
12
codegen:: generate (
23
13
Config :: from_config_file ( "../flutter_rust_bridge.yaml" )
@@ -27,21 +17,3 @@ fn main() {
27
17
)
28
18
. unwrap ( ) ;
29
19
}
30
-
31
- fn is_dart_installed ( ) -> bool {
32
- let output = Command :: new ( "dart" )
33
- . arg ( "--version" )
34
- . stdout ( Stdio :: null ( ) )
35
- . stderr ( Stdio :: null ( ) )
36
- . status ( ) ;
37
- matches ! ( output, Ok ( status) if status. success( ) )
38
- }
39
-
40
- fn is_flutter_installed ( ) -> bool {
41
- let output = Command :: new ( "flutter" )
42
- . arg ( "--version" )
43
- . stdout ( Stdio :: null ( ) )
44
- . stderr ( Stdio :: null ( ) )
45
- . status ( ) ;
46
- matches ! ( output, Ok ( status) if status. success( ) )
47
- }
You can’t perform that action at this time.
0 commit comments