tasks.json 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  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. ],
  25. "presentation": {
  26. "reveal": "always",
  27. "panel": "new"
  28. }
  29. },
  30. {
  31. "label": "AF: Clean + Rebuild All (iOS)",
  32. "type": "shell",
  33. "dependsOrder": "sequence",
  34. "dependsOn": [
  35. "AF: Dart Clean",
  36. "AF: Flutter Clean",
  37. "AF: Build Appflowy Core For iOS",
  38. "AF: Flutter Pub Get",
  39. "AF: Flutter Package Get",
  40. "AF: Generate Language Files",
  41. "AF: Generate Freezed Files"
  42. ],
  43. "presentation": {
  44. "reveal": "always",
  45. "panel": "new"
  46. }
  47. },
  48. {
  49. "label": "AF: Clean + Rebuild All (iOS Simulator)",
  50. "type": "shell",
  51. "dependsOrder": "sequence",
  52. "dependsOn": [
  53. "AF: Dart Clean",
  54. "AF: Flutter Clean",
  55. "AF: Build Appflowy Core For iOS Simulator",
  56. "AF: Flutter Pub Get",
  57. "AF: Flutter Package Get",
  58. "AF: Generate Language Files",
  59. "AF: Generate Freezed Files"
  60. ],
  61. "presentation": {
  62. "reveal": "always",
  63. "panel": "new"
  64. }
  65. },
  66. {
  67. "label": "AF: Build Appflowy Core For iOS",
  68. "type": "shell",
  69. "command": "cargo make --profile development-ios-arm64 appflowy-core-dev-ios",
  70. "group": "build",
  71. "options": {
  72. "cwd": "${workspaceFolder}"
  73. }
  74. },
  75. {
  76. "label": "AF: Build Appflowy Core For iOS Simulator",
  77. "type": "shell",
  78. "command": "cargo make --profile development-ios-arm64-sim appflowy-core-dev-ios",
  79. "group": "build",
  80. "options": {
  81. "cwd": "${workspaceFolder}"
  82. }
  83. },
  84. {
  85. "label": "AF: Build Appflowy Core",
  86. "type": "shell",
  87. "windows": {
  88. "command": "cargo make --profile development-windows-x86 appflowy-core-dev"
  89. },
  90. "linux": {
  91. "command": "cargo make --profile \"development-linux-$(uname -m)\" appflowy-core-dev"
  92. },
  93. "osx": {
  94. "command": "cargo make --profile \"development-mac-$(uname -m)\" appflowy-core-dev"
  95. },
  96. "group": "build",
  97. "options": {
  98. "cwd": "${workspaceFolder}"
  99. }
  100. },
  101. {
  102. "label": "AF: Code Gen",
  103. "type": "shell",
  104. "dependsOrder": "sequence",
  105. "dependsOn": [
  106. "AF: Flutter Clean",
  107. "AF: Flutter Pub Get",
  108. "AF: Flutter Package Get",
  109. "AF: Generate Language Files",
  110. "AF: Generate Freezed Files"
  111. ],
  112. "group": {
  113. "kind": "build",
  114. "isDefault": true
  115. },
  116. "presentation": {
  117. "reveal": "always",
  118. "panel": "new"
  119. }
  120. },
  121. {
  122. "label": "AF: Flutter Clean",
  123. "type": "shell",
  124. "command": "flutter clean",
  125. "options": {
  126. "cwd": "${workspaceFolder}/appflowy_flutter"
  127. }
  128. },
  129. {
  130. "label": "AF: Flutter Pub Get",
  131. "type": "shell",
  132. "command": "flutter pub get",
  133. "options": {
  134. "cwd": "${workspaceFolder}/appflowy_flutter"
  135. }
  136. },
  137. {
  138. "label": "AF: Flutter Package Get",
  139. "type": "shell",
  140. "command": "flutter packages pub get",
  141. "options": {
  142. "cwd": "${workspaceFolder}/appflowy_flutter"
  143. }
  144. },
  145. {
  146. "label": "AF: Generate Freezed Files",
  147. "type": "shell",
  148. "command": "sh ./scripts/code_generation/freezed/generate_freezed.sh",
  149. "options": {
  150. "cwd": "${workspaceFolder}"
  151. },
  152. "group": "build",
  153. "windows": {
  154. "options": {
  155. "shell": {
  156. "executable": "cmd.exe",
  157. "args": [
  158. "/d",
  159. "/c",
  160. ".\\scripts\\code_generation\\freezed\\generate_freezed.cmd"
  161. ]
  162. }
  163. }
  164. },
  165. },
  166. {
  167. "label": "AF: Generate Language Files",
  168. "type": "shell",
  169. "command": "sh ./scripts/code_generation/language_files/generate_language_files.sh",
  170. "windows": {
  171. "options": {
  172. "shell": {
  173. "executable": "cmd.exe",
  174. "args": [
  175. "/d",
  176. "/c",
  177. ".\\scripts\\code_generation\\language_files\\generate_language_files.cmd"
  178. ]
  179. }
  180. }
  181. },
  182. "group": "build",
  183. "options": {
  184. "cwd": "${workspaceFolder}"
  185. }
  186. },
  187. {
  188. "label": "AF: Flutter Clean",
  189. "type": "shell",
  190. "command": "cargo make flutter_clean",
  191. "group": "build",
  192. "options": {
  193. "cwd": "${workspaceFolder}"
  194. }
  195. },
  196. {
  197. "label": "AF: flutter build aar",
  198. "type": "flutter",
  199. "command": "flutter",
  200. "args": [
  201. "build",
  202. "aar"
  203. ],
  204. "group": "build",
  205. "problemMatcher": [],
  206. "detail": "appflowy_flutter"
  207. },
  208. {
  209. "label": "AF: Tauri UI Dev",
  210. "type": "shell",
  211. "isBackground": true,
  212. "command": "yarn",
  213. "args": [
  214. "dev"
  215. ],
  216. "options": {
  217. "cwd": "${workspaceFolder}/appflowy_tauri"
  218. }
  219. },
  220. {
  221. "label": "AF: Tauri UI Build",
  222. "type": "shell",
  223. "command": "pnpm run build",
  224. "options": {
  225. "cwd": "${workspaceFolder}/appflowy_tauri"
  226. }
  227. },
  228. {
  229. "label": "AF: Tauri Dev",
  230. "type": "shell",
  231. "command": "npm run tauri:dev",
  232. "options": {
  233. "cwd": "${workspaceFolder}/appflowy_tauri"
  234. }
  235. },
  236. {
  237. "label": "AF: Tauri Clean",
  238. "type": "shell",
  239. "command": "cargo make tauri_clean",
  240. "options": {
  241. "cwd": "${workspaceFolder}"
  242. }
  243. },
  244. {
  245. "label": "AF: Tauri Clean + Dev",
  246. "type": "shell",
  247. "dependsOrder": "sequence",
  248. "dependsOn": [
  249. "AF: Tauri Clean",
  250. "AF: Tauri UI Dev"
  251. ],
  252. "options": {
  253. "cwd": "${workspaceFolder}"
  254. }
  255. },
  256. {
  257. "label": "AF: Tauri ESLint",
  258. "type": "shell",
  259. "command": "npx eslint --fix src",
  260. "options": {
  261. "cwd": "${workspaceFolder}/appflowy_tauri"
  262. }
  263. },
  264. {
  265. "label": "AF: Generate Env",
  266. "type": "shell",
  267. "command": "dart run build_runner clean && dart run build_runner build --delete-conflicting-outputs ",
  268. "options": {
  269. "cwd": "${workspaceFolder}/appflowy_flutter"
  270. }
  271. },
  272. ]
  273. }