public function allAppAndPluginTasks() {
		if ($this->tasks !== null) {
			return $this->tasks;
		}

		$paths = App::path('Shell/Task');
		$this->tasks = [];

		foreach ($paths as $path) {
			$Folder = new Folder($path);
			$this->tasks = $this->getAppPaths($Folder);
		}
		$plugins = Plugin::loaded();
		foreach ($plugins as $plugin) {
			$pluginPaths = App::path('Shell/Task', $plugin);
			foreach ($pluginPaths as $pluginPath) {
				$Folder = new Folder($pluginPath);
				$pluginTasks = $this->getPluginPaths($Folder, $plugin);
				$this->tasks = array_merge($this->tasks, $pluginTasks);
			}
		}

		return $this->tasks;
	}