mix.exs 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. defmodule EMQX.MixProject do
  2. use Mix.Project
  3. alias EMQXUmbrella.MixProject, as: UMP
  4. def project do
  5. [
  6. app: :emqx,
  7. version: "0.1.0",
  8. build_path: "../../_build",
  9. erlc_paths: erlc_paths(),
  10. erlc_options: [
  11. {:i, "src"}
  12. | UMP.erlc_options()
  13. ],
  14. compilers: Mix.compilers() ++ [:copy_srcs],
  15. # used by our `Mix.Tasks.Compile.CopySrcs` compiler
  16. extra_dirs: extra_dirs(),
  17. deps_path: "../../deps",
  18. lockfile: "../../mix.lock",
  19. elixir: "~> 1.14",
  20. start_permanent: Mix.env() == :prod,
  21. deps: deps()
  22. ]
  23. end
  24. # Run "mix help compile.app" to learn about applications
  25. def application do
  26. [
  27. ## FIXME!!! go though emqx.app.src and add missing stuff...
  28. extra_applications: [:public_key, :ssl, :os_mon, :logger, :mnesia, :sasl] ++ UMP.extra_applications(),
  29. mod: {:emqx_app, []}
  30. ]
  31. end
  32. def deps() do
  33. ## FIXME!!! go though emqx.app.src and add missing stuff...
  34. [
  35. {:emqx_mix_utils, in_umbrella: true, runtime: false},
  36. {:emqx_utils, in_umbrella: true},
  37. {:emqx_ds_backends, in_umbrella: true},
  38. UMP.common_dep(:gproc),
  39. UMP.common_dep(:gen_rpc),
  40. UMP.common_dep(:ekka),
  41. UMP.common_dep(:esockd),
  42. UMP.common_dep(:cowboy),
  43. UMP.common_dep(:lc),
  44. UMP.common_dep(:hocon),
  45. UMP.common_dep(:ranch),
  46. UMP.common_dep(:bcrypt),
  47. UMP.common_dep(:pbkdf2),
  48. UMP.common_dep(:emqx_http_lib),
  49. ] ++ UMP.quicer_dep()
  50. end
  51. defp erlc_paths() do
  52. paths = UMP.erlc_paths()
  53. if UMP.test_env?() do
  54. ["integration_test" | paths]
  55. else
  56. paths
  57. end
  58. end
  59. defp extra_dirs() do
  60. dirs = ["src", "etc"]
  61. if UMP.test_env?() do
  62. ["test", "integration_test" | dirs]
  63. else
  64. dirs
  65. end
  66. end
  67. end