| 
									
										
										
										
											2023-01-26 15:40:23 +08:00
										 |  |  | [tasks.flutter_clean] | 
					
						
							| 
									
										
										
										
											2023-01-08 12:10:53 +08:00
										 |  |  | run_task = { name = [ | 
					
						
							| 
									
										
										
										
											2023-01-17 16:27:17 +08:00
										 |  |  |   "rust_lib_clean", | 
					
						
							| 
									
										
										
										
											2023-01-08 12:10:53 +08:00
										 |  |  |   "rm_macro_build_cache", | 
					
						
							|  |  |  |   "rm_rust_generated_files", | 
					
						
							|  |  |  |   "rm_dart_generated_files", | 
					
						
							|  |  |  | ] } | 
					
						
							| 
									
										
										
										
											2022-06-19 09:42:25 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-01-17 16:27:17 +08:00
										 |  |  | [tasks.rust_lib_clean] | 
					
						
							| 
									
										
										
										
											2023-01-08 12:10:53 +08:00
										 |  |  | script = [""" | 
					
						
							| 
									
										
										
										
											2022-05-27 20:26:33 +08:00
										 |  |  |     cd rust-lib | 
					
						
							| 
									
										
										
										
											2022-06-19 09:42:25 +08:00
										 |  |  |     cargo clean -q | 
					
						
							| 
									
										
										
										
											2022-05-27 20:26:33 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-12-31 07:29:40 +08:00
										 |  |  |     cd ./build-tool | 
					
						
							| 
									
										
										
										
											2022-06-19 09:42:25 +08:00
										 |  |  |     cargo clean -q | 
					
						
							| 
									
										
										
										
											2023-01-08 12:10:53 +08:00
										 |  |  |   """] | 
					
						
							| 
									
										
										
										
											2022-05-27 20:26:33 +08:00
										 |  |  | script_runner = "@shell" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-06-19 09:42:25 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | [tasks.rm_macro_build_cache] | 
					
						
							| 
									
										
										
										
											2023-01-08 12:10:53 +08:00
										 |  |  | script = [""" | 
					
						
							| 
									
										
										
										
											2022-12-30 11:16:47 +08:00
										 |  |  |     path = canonicalize ../frontend/rust-lib/flowy-codegen/.cache | 
					
						
							| 
									
										
										
										
											2022-06-19 09:42:25 +08:00
										 |  |  |     if is_path_exists ${path} | 
					
						
							|  |  |  |       rm -rf ${path} | 
					
						
							|  |  |  |     end | 
					
						
							| 
									
										
										
										
											2023-01-08 12:10:53 +08:00
										 |  |  |   """] | 
					
						
							| 
									
										
										
										
											2022-06-19 09:42:25 +08:00
										 |  |  | script_runner = "@duckscript" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-06-19 10:40:55 +08:00
										 |  |  | #Rust Clean | 
					
						
							|  |  |  | [tasks.rm_rust_generated_files] | 
					
						
							| 
									
										
										
										
											2023-01-08 12:10:53 +08:00
										 |  |  | run_task = { name = [ | 
					
						
							|  |  |  |   "rm_rust_lib_generated_protobuf_files", | 
					
						
							|  |  |  |   "rm_shared_lib_generated_protobuf_files", | 
					
						
							|  |  |  | ] } | 
					
						
							| 
									
										
										
										
											2022-06-19 09:42:25 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-06-19 10:40:55 +08:00
										 |  |  | [tasks.rm_rust_lib_generated_protobuf_files] | 
					
						
							|  |  |  | private = true | 
					
						
							|  |  |  | env = { "rm_proto_path" = "./rust-lib/**/resources/proto", "rm_protobuf_path" = "./rust-lib/**/protobuf" } | 
					
						
							|  |  |  | run_task = { name = "remove_files_with_pattern" } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [tasks.rm_shared_lib_generated_protobuf_files] | 
					
						
							|  |  |  | private = true | 
					
						
							| 
									
										
										
										
											2023-12-31 07:29:40 +08:00
										 |  |  | env = { "rm_proto_path" = "./rust-lib/build-tool/**/resources/proto", "rm_protobuf_path" = "./rust-lib/build-tool/**/protobuf" } | 
					
						
							| 
									
										
										
										
											2022-06-19 10:40:55 +08:00
										 |  |  | run_task = { name = "remove_files_with_pattern" } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #Dart Clean | 
					
						
							|  |  |  | [tasks.rm_dart_generated_files] | 
					
						
							| 
									
										
										
										
											2023-02-26 16:27:17 +08:00
										 |  |  | env = { "dart_flowy_sdk_path" = "./appflowy_flutter/packages/appflowy_backend/" } | 
					
						
							| 
									
										
										
										
											2023-01-08 12:10:53 +08:00
										 |  |  | run_task = { name = [ | 
					
						
							|  |  |  |   "rm_dart_generated_protobuf_files", | 
					
						
							|  |  |  |   "rm_dart_generated_event_files", | 
					
						
							|  |  |  | ] } | 
					
						
							| 
									
										
										
										
											2022-06-19 10:40:55 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | [tasks.rm_dart_generated_protobuf_files] | 
					
						
							|  |  |  | private = true | 
					
						
							| 
									
										
										
										
											2023-01-08 12:10:53 +08:00
										 |  |  | script = [""" | 
					
						
							| 
									
										
										
										
											2022-06-19 10:40:55 +08:00
										 |  |  |   protobuf_file_paths = glob_array ${dart_flowy_sdk_path}/lib/protobuf | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-06-19 10:55:14 +08:00
										 |  |  |   if not array_is_empty ${protobuf_file_paths} | 
					
						
							|  |  |  |     echo Remove generated protobuf files: | 
					
						
							|  |  |  |     for path in ${protobuf_file_paths} | 
					
						
							|  |  |  |         echo remove ${path} | 
					
						
							|  |  |  |         rm -rf ${path} | 
					
						
							|  |  |  |     end | 
					
						
							| 
									
										
										
										
											2022-06-19 10:40:55 +08:00
										 |  |  |   end | 
					
						
							| 
									
										
										
										
											2023-01-08 12:10:53 +08:00
										 |  |  |   """] | 
					
						
							| 
									
										
										
										
											2022-06-19 10:40:55 +08:00
										 |  |  | script_runner = "@duckscript" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-10-15 17:15:11 +08:00
										 |  |  | [tasks.rm_dart_generated_event_files] | 
					
						
							|  |  |  | private = true | 
					
						
							| 
									
										
										
										
											2023-01-08 12:10:53 +08:00
										 |  |  | script = [""" | 
					
						
							| 
									
										
										
										
											2022-10-15 17:15:11 +08:00
										 |  |  |   dart_event_folder = glob_array ${dart_flowy_sdk_path}/lib/dispatch/dart_event | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   if not array_is_empty ${dart_event_folder} | 
					
						
							|  |  |  |     echo Remove generated dart event files: | 
					
						
							|  |  |  |     for path in ${dart_event_folder} | 
					
						
							|  |  |  |         echo remove ${path} | 
					
						
							|  |  |  |         rm -rf ${path} | 
					
						
							|  |  |  |     end | 
					
						
							|  |  |  |   end | 
					
						
							| 
									
										
										
										
											2023-01-08 12:10:53 +08:00
										 |  |  |   """] | 
					
						
							| 
									
										
										
										
											2022-10-15 17:15:11 +08:00
										 |  |  | script_runner = "@duckscript" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-06-19 10:40:55 +08:00
										 |  |  | [tasks.remove_files_with_pattern] | 
					
						
							|  |  |  | private = true | 
					
						
							| 
									
										
										
										
											2023-01-08 12:10:53 +08:00
										 |  |  | script = [""" | 
					
						
							| 
									
										
										
										
											2022-06-19 10:40:55 +08:00
										 |  |  |   proto_file_paths = glob_array ${rm_proto_path} | 
					
						
							|  |  |  |   is_proto_file_paths_empty = array_is_empty ${proto_file_paths} | 
					
						
							| 
									
										
										
										
											2022-06-19 10:55:14 +08:00
										 |  |  |   if not ${is_proto_file_paths_empty} | 
					
						
							| 
									
										
										
										
											2022-06-19 10:40:55 +08:00
										 |  |  |     echo Remove generated proto files: | 
					
						
							|  |  |  |     for path in ${proto_file_paths} | 
					
						
							|  |  |  |       echo remove ${path} | 
					
						
							|  |  |  |       rm -rf ${path} | 
					
						
							|  |  |  |     end | 
					
						
							|  |  |  |   end | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   protobuf_file_paths = glob_array ${rm_protobuf_path} | 
					
						
							|  |  |  |   is_protobuf_file_paths_empty = array_is_empty ${protobuf_file_paths} | 
					
						
							| 
									
										
										
										
											2022-06-19 10:55:14 +08:00
										 |  |  |   if not ${is_protobuf_file_paths_empty} | 
					
						
							| 
									
										
										
										
											2022-06-19 10:40:55 +08:00
										 |  |  |     echo Remove generated protobuf files: | 
					
						
							|  |  |  |     for path in ${protobuf_file_paths} | 
					
						
							|  |  |  |       echo remove ${path} | 
					
						
							|  |  |  |       rm -rf ${path} | 
					
						
							|  |  |  |     end | 
					
						
							|  |  |  |   end | 
					
						
							| 
									
										
										
										
											2022-05-27 20:26:33 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-01-08 12:10:53 +08:00
										 |  |  |   """] | 
					
						
							|  |  |  | script_runner = "@duckscript" |