 
     # We call build_structure mostly for Windows so new
     # assets in priv are copied to the build directory.
-    Mix.Project.build_structure()
+    Mix.Project.build_structure(config)
     results = Enum.map(compilers, &Mix.Task.run("compile.#{&1}", []))
 
     # Results are either {:ok, _} | {:error, _}, {:noop, _} or

    end
  end

  defp consolidate_protocols? do
    Mix.Project.config()[:consolidate_protocols]
  end

  defp proxy_io(fun) do

  end

  defp mix_compile({:module, Mix.Task}, compilers, apps_to_reload) do
    config = Mix.Project.config()
    path = Mix.Project.consolidation_path(config)
    purge = fn -> purge_consolidated(path) end

    purge = mix_compile_deps(Mix.Dep.cached(), apps_to_reload, compilers, purge)
    mix_compile_project(config[:app], apps_to_reload, compilers, purge)
    Code.prepend_path(path)
    :ok
  end

  defp mix_compile({:error, _reason}, _, _) do
