tasks.json 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298
  1. {
  2. "version": "2.0.0",
  3. // https://code.visualstudio.com/docs/editor/tasks
  4. // https://gist.github.com/deadalusai/9e13e36d61ec7fb72148
  5. // ${workspaceRoot}: the root folder of the team
  6. // ${file}: the current opened file
  7. // ${fileBasename}: the current opened file's basename
  8. // ${fileDirname}: the current opened file's dirname
  9. // ${fileExtname}: the current opened file's extension
  10. // ${cwd}: the current working directory of the spawned process
  11. "tasks": [
  12. {
  13. "label": "AF: Clean + Rebuild All",
  14. "type": "shell",
  15. "dependsOrder": "sequence",
  16. "dependsOn": [
  17. "AF: Dart Clean",
  18. "AF: Flutter Clean",
  19. "AF: Build Appflowy Core",
  20. "AF: Flutter Pub Get",
  21. "AF: Flutter Package Get",
  22. "AF: Generate Language Files",
  23. "AF: Generate Freezed Files",
  24. "AF: Generate Svg Files"
  25. ],
  26. "presentation": {
  27. "reveal": "always",
  28. "panel": "new"
  29. }
  30. },
  31. {
  32. "label": "AF: Clean + Rebuild All (iOS)",
  33. "type": "shell",
  34. "dependsOrder": "sequence",
  35. "dependsOn": [
  36. "AF: Dart Clean",
  37. "AF: Flutter Clean",
  38. "AF: Build Appflowy Core For iOS",
  39. "AF: Flutter Pub Get",
  40. "AF: Flutter Package Get",
  41. "AF: Generate Language Files",
  42. "AF: Generate Freezed Files",
  43. "AF: Generate Svg Files"
  44. ],
  45. "presentation": {
  46. "reveal": "always",
  47. "panel": "new"
  48. }
  49. },
  50. {
  51. "label": "AF: Clean + Rebuild All (iOS Simulator)",
  52. "type": "shell",
  53. "dependsOrder": "sequence",
  54. "dependsOn": [
  55. "AF: Dart Clean",
  56. "AF: Flutter Clean",
  57. "AF: Build Appflowy Core For iOS Simulator",
  58. "AF: Flutter Pub Get",
  59. "AF: Flutter Package Get",
  60. "AF: Generate Language Files",
  61. "AF: Generate Freezed Files",
  62. "AF: Generate Svg Files"
  63. ],
  64. "presentation": {
  65. "reveal": "always",
  66. "panel": "new"
  67. }
  68. },
  69. {
  70. "label": "AF: Build Appflowy Core For iOS",
  71. "type": "shell",
  72. "command": "cargo make --profile development-ios-arm64 appflowy-core-dev-ios",
  73. "group": "build",
  74. "options": {
  75. "cwd": "${workspaceFolder}"
  76. }
  77. },
  78. {
  79. "label": "AF: Build Appflowy Core For iOS Simulator",
  80. "type": "shell",
  81. "command": "cargo make --profile development-ios-arm64-sim appflowy-core-dev-ios",
  82. "group": "build",
  83. "options": {
  84. "cwd": "${workspaceFolder}"
  85. }
  86. },
  87. {
  88. "label": "AF: Build Appflowy Core",
  89. "type": "shell",
  90. "windows": {
  91. "command": "cargo make --profile development-windows-x86 appflowy-core-dev"
  92. },
  93. "linux": {
  94. "command": "cargo make --profile \"development-linux-$(uname -m)\" appflowy-core-dev"
  95. },
  96. "osx": {
  97. "command": "cargo make --profile \"development-mac-$(uname -m)\" appflowy-core-dev"
  98. },
  99. "group": "build",
  100. "options": {
  101. "cwd": "${workspaceFolder}"
  102. }
  103. },
  104. {
  105. "label": "AF: Code Gen",
  106. "type": "shell",
  107. "dependsOrder": "sequence",
  108. "dependsOn": [
  109. "AF: Flutter Clean",
  110. "AF: Flutter Pub Get",
  111. "AF: Flutter Package Get",
  112. "AF: Generate Language Files",
  113. "AF: Generate Freezed Files",
  114. "AF: Generate Svg Files"
  115. ],
  116. "group": {
  117. "kind": "build",
  118. "isDefault": true
  119. },
  120. "presentation": {
  121. "reveal": "always",
  122. "panel": "new"
  123. }
  124. },
  125. {
  126. "label": "AF: Flutter Clean",
  127. "type": "shell",
  128. "command": "flutter clean",
  129. "options": {
  130. "cwd": "${workspaceFolder}/appflowy_flutter"
  131. }
  132. },
  133. {
  134. "label": "AF: Flutter Pub Get",
  135. "type": "shell",
  136. "command": "flutter pub get",
  137. "options": {
  138. "cwd": "${workspaceFolder}/appflowy_flutter"
  139. }
  140. },
  141. {
  142. "label": "AF: Flutter Package Get",
  143. "type": "shell",
  144. "command": "flutter packages pub get",
  145. "options": {
  146. "cwd": "${workspaceFolder}/appflowy_flutter"
  147. }
  148. },
  149. {
  150. "label": "AF: Generate Freezed Files",
  151. "type": "shell",
  152. "command": "sh ./scripts/code_generation/freezed/generate_freezed.sh",
  153. "options": {
  154. "cwd": "${workspaceFolder}"
  155. },
  156. "group": "build",
  157. "windows": {
  158. "options": {
  159. "shell": {
  160. "executable": "cmd.exe",
  161. "args": [
  162. "/d",
  163. "/c",
  164. ".\\scripts\\code_generation\\freezed\\generate_freezed.cmd"
  165. ]
  166. }
  167. }
  168. }
  169. },
  170. {
  171. "label": "AF: Generate Language Files",
  172. "type": "shell",
  173. "command": "sh ./scripts/code_generation/language_files/generate_language_files.sh",
  174. "windows": {
  175. "options": {
  176. "shell": {
  177. "executable": "cmd.exe",
  178. "args": [
  179. "/d",
  180. "/c",
  181. ".\\scripts\\code_generation\\language_files\\generate_language_files.cmd"
  182. ]
  183. }
  184. }
  185. },
  186. "group": "build",
  187. "options": {
  188. "cwd": "${workspaceFolder}"
  189. }
  190. },
  191. {
  192. "label": "AF: Generate Svg Files",
  193. "type": "shell",
  194. "command": "sh ./scripts/code_generation/flowy_icons/generate_flowy_icons.sh",
  195. "windows": {
  196. "options": {
  197. "shell": {
  198. "executable": "cmd.exe",
  199. "args": [
  200. "/d",
  201. "/c",
  202. ".\\scripts\\code_generation\\flowy_icons\\generate_flowy_icons.cmd"
  203. ]
  204. }
  205. }
  206. },
  207. "group": "build",
  208. "options": {
  209. "cwd": "${workspaceFolder}"
  210. }
  211. },
  212. {
  213. "label": "AF: Flutter Clean",
  214. "type": "shell",
  215. "command": "cargo make flutter_clean",
  216. "group": "build",
  217. "options": {
  218. "cwd": "${workspaceFolder}"
  219. }
  220. },
  221. {
  222. "label": "AF: flutter build aar",
  223. "type": "flutter",
  224. "command": "flutter",
  225. "args": ["build", "aar"],
  226. "group": "build",
  227. "problemMatcher": [],
  228. "detail": "appflowy_flutter"
  229. },
  230. {
  231. "label": "AF: Tauri UI Dev",
  232. "type": "shell",
  233. "isBackground": true,
  234. "command": "yarn",
  235. "args": ["dev"],
  236. "options": {
  237. "cwd": "${workspaceFolder}/appflowy_tauri"
  238. }
  239. },
  240. {
  241. "label": "AF: Tauri UI Build",
  242. "type": "shell",
  243. "command": "pnpm run build",
  244. "options": {
  245. "cwd": "${workspaceFolder}/appflowy_tauri"
  246. }
  247. },
  248. {
  249. "label": "AF: Tauri Dev",
  250. "type": "shell",
  251. "command": "npm run tauri:dev",
  252. "options": {
  253. "cwd": "${workspaceFolder}/appflowy_tauri"
  254. }
  255. },
  256. {
  257. "label": "AF: Tauri Clean",
  258. "type": "shell",
  259. "command": "cargo make tauri_clean",
  260. "options": {
  261. "cwd": "${workspaceFolder}"
  262. }
  263. },
  264. {
  265. "label": "AF: Tauri Clean + Dev",
  266. "type": "shell",
  267. "dependsOrder": "sequence",
  268. "dependsOn": ["AF: Tauri Clean", "AF: Tauri UI Dev"],
  269. "options": {
  270. "cwd": "${workspaceFolder}"
  271. }
  272. },
  273. {
  274. "label": "AF: Tauri ESLint",
  275. "type": "shell",
  276. "command": "npx eslint --fix src",
  277. "options": {
  278. "cwd": "${workspaceFolder}/appflowy_tauri"
  279. }
  280. },
  281. {
  282. "label": "AF: Generate Env File",
  283. "type": "shell",
  284. "command": "dart run build_runner clean && dart run build_runner build --delete-conflicting-outputs ",
  285. "options": {
  286. "cwd": "${workspaceFolder}/appflowy_flutter"
  287. }
  288. },
  289. {
  290. "label": "AF: Generate AppFlowyEnv",
  291. "type": "shell",
  292. "command": "dart run build_runner build --delete-conflicting-outputs",
  293. "options": {
  294. "cwd": "${workspaceFolder}/appflowy_flutter/packages/appflowy_backend"
  295. }
  296. }
  297. ]
  298. }