diff --git a/apps/emqx/mix.exs b/apps/emqx/mix.exs deleted file mode 100644 index 1d67b3246..000000000 --- a/apps/emqx/mix.exs +++ /dev/null @@ -1,42 +0,0 @@ -defmodule EMQX.MixProject do - use Mix.Project - - def project do - [ - app: :emqx, - version: "5.0.0", - build_path: "../../_build", - config_path: "../../config/config.exs", - deps_path: "../../deps", - lockfile: "../../mix.lock", - elixir: "~> 1.12", - start_permanent: Mix.env() == :prod, - deps: deps(), - description: "EMQ X" - ] - end - - def application do - [ - mod: {:emqx_app, []}, - extra_applications: [:logger, :os_mon, :syntax_tools] - ] - end - - defp deps do - [ - {:gproc, "0.9.0"}, - {:recon, "2.5.2"}, - {:cowboy, github: "emqx/cowboy", tag: "2.8.2"}, - {:esockd, github: "emqx/esockd", tag: "5.8.0"}, - {:ekka, github: "emqx/ekka", tag: "0.11.1"}, - {:gen_rpc, github: "emqx/gen_rpc", tag: "2.5.1"}, - {:cuttlefish, github: "emqx/cuttlefish", tag: "v4.0.1"}, - {:hocon, github: "emqx/hocon"}, - {:pbkdf2, github: "emqx/erlang-pbkdf2", tag: "2.0.4"}, - {:snabbkaffe, github: "kafka4beam/snabbkaffe", tag: "0.14.0"}, - {:jiffy, github: "emqx/jiffy", tag: "1.0.5"}, - {:lc, github: "qzhuyan/lc", tag: "0.1.1"} - ] - end -end diff --git a/apps/emqx/rebar.config.script b/apps/emqx/rebar.config.script index 7b60d1ae0..53e2fce19 100644 --- a/apps/emqx/rebar.config.script +++ b/apps/emqx/rebar.config.script @@ -17,8 +17,8 @@ IsQuicSupp = fun() -> ) end, -Bcrypt = {bcrypt, {git, "https://github.com/emqx/erlang-bcrypt.git", {branch, "0.6.0"}}}, -Quicer = {quicer, {git, "https://github.com/emqx/quic.git", {branch, "0.0.9"}}}, +Bcrypt = {bcrypt, {git, "https://github.com/emqx/erlang-bcrypt.git", {tag, "0.6.0"}}}, +Quicer = {quicer, {git, "https://github.com/emqx/quic.git", {tag, "0.0.9"}}}, ExtraDeps = fun(C) -> {deps, Deps0} = lists:keyfind(deps, 1, C), diff --git a/apps/emqx_authn/mix.exs b/apps/emqx_authn/mix.exs2 similarity index 100% rename from apps/emqx_authn/mix.exs rename to apps/emqx_authn/mix.exs2 diff --git a/apps/emqx_authz/mix.exs b/apps/emqx_authz/mix.exs2 similarity index 100% rename from apps/emqx_authz/mix.exs rename to apps/emqx_authz/mix.exs2 diff --git a/apps/emqx_auto_subscribe/mix.exs b/apps/emqx_auto_subscribe/mix.exs2 similarity index 100% rename from apps/emqx_auto_subscribe/mix.exs rename to apps/emqx_auto_subscribe/mix.exs2 diff --git a/apps/emqx_bridge/mix.exs b/apps/emqx_bridge/mix.exs2 similarity index 100% rename from apps/emqx_bridge/mix.exs rename to apps/emqx_bridge/mix.exs2 diff --git a/apps/emqx_conf/mix.exs b/apps/emqx_conf/mix.exs2 similarity index 100% rename from apps/emqx_conf/mix.exs rename to apps/emqx_conf/mix.exs2 diff --git a/apps/emqx_connector/mix.exs b/apps/emqx_connector/mix.exs2 similarity index 100% rename from apps/emqx_connector/mix.exs rename to apps/emqx_connector/mix.exs2 diff --git a/apps/emqx_dashboard/mix.exs b/apps/emqx_dashboard/mix.exs2 similarity index 100% rename from apps/emqx_dashboard/mix.exs rename to apps/emqx_dashboard/mix.exs2 diff --git a/apps/emqx_exhook/mix.exs b/apps/emqx_exhook/mix.exs2 similarity index 100% rename from apps/emqx_exhook/mix.exs rename to apps/emqx_exhook/mix.exs2 diff --git a/apps/emqx_gateway/mix.exs b/apps/emqx_gateway/mix.exs2 similarity index 100% rename from apps/emqx_gateway/mix.exs rename to apps/emqx_gateway/mix.exs2 diff --git a/apps/emqx_gateway/src/coap/emqx_coap_channel.erl b/apps/emqx_gateway/src/coap/emqx_coap_channel.erl index e1dad1dee..14031890a 100644 --- a/apps/emqx_gateway/src/coap/emqx_coap_channel.erl +++ b/apps/emqx_gateway/src/coap/emqx_coap_channel.erl @@ -41,8 +41,9 @@ -export_type([channel/0]). +-include("emqx_coap.hrl"). -include_lib("emqx/include/logger.hrl"). --include_lib("emqx_gateway/src/coap/include/emqx_coap.hrl"). +%% -include_lib("emqx_gateway/src/coap/include/emqx_coap.hrl"). -include_lib("emqx/include/emqx_authentication.hrl"). -define(AUTHN, ?EMQX_AUTHENTICATION_CONFIG_ROOT_NAME_ATOM). diff --git a/apps/emqx_limiter/mix.exs b/apps/emqx_limiter/mix.exs2 similarity index 100% rename from apps/emqx_limiter/mix.exs rename to apps/emqx_limiter/mix.exs2 diff --git a/apps/emqx_machine/mix.exs b/apps/emqx_machine/mix.exs2 similarity index 100% rename from apps/emqx_machine/mix.exs rename to apps/emqx_machine/mix.exs2 diff --git a/apps/emqx_management/mix.exs b/apps/emqx_management/mix.exs2 similarity index 100% rename from apps/emqx_management/mix.exs rename to apps/emqx_management/mix.exs2 diff --git a/apps/emqx_modules/mix.exs b/apps/emqx_modules/mix.exs2 similarity index 100% rename from apps/emqx_modules/mix.exs rename to apps/emqx_modules/mix.exs2 diff --git a/apps/emqx_plugin_libs/mix.exs b/apps/emqx_plugin_libs/mix.exs2 similarity index 100% rename from apps/emqx_plugin_libs/mix.exs rename to apps/emqx_plugin_libs/mix.exs2 diff --git a/apps/emqx_prometheus/mix.exs b/apps/emqx_prometheus/mix.exs2 similarity index 100% rename from apps/emqx_prometheus/mix.exs rename to apps/emqx_prometheus/mix.exs2 diff --git a/apps/emqx_psk/mix.exs b/apps/emqx_psk/mix.exs2 similarity index 100% rename from apps/emqx_psk/mix.exs rename to apps/emqx_psk/mix.exs2 diff --git a/apps/emqx_release_helper/mix.exs b/apps/emqx_release_helper/mix.exs2 similarity index 100% rename from apps/emqx_release_helper/mix.exs rename to apps/emqx_release_helper/mix.exs2 diff --git a/apps/emqx_resource/mix.exs b/apps/emqx_resource/mix.exs2 similarity index 100% rename from apps/emqx_resource/mix.exs rename to apps/emqx_resource/mix.exs2 diff --git a/apps/emqx_retainer/mix.exs b/apps/emqx_retainer/mix.exs2 similarity index 100% rename from apps/emqx_retainer/mix.exs rename to apps/emqx_retainer/mix.exs2 diff --git a/apps/emqx_rule_engine/mix.exs b/apps/emqx_rule_engine/mix.exs2 similarity index 100% rename from apps/emqx_rule_engine/mix.exs rename to apps/emqx_rule_engine/mix.exs2 diff --git a/apps/emqx_statsd/mix.exs b/apps/emqx_statsd/mix.exs2 similarity index 100% rename from apps/emqx_statsd/mix.exs rename to apps/emqx_statsd/mix.exs2 diff --git a/mix.exs b/mix.exs index 6363ce7c1..0798ad486 100644 --- a/mix.exs +++ b/mix.exs @@ -4,6 +4,7 @@ defmodule EMQXUmbrella.MixProject do def project do [ apps_path: "apps", + app: :emqx, version: pkg_vsn(), start_permanent: Mix.env() == :prod, deps: deps(), @@ -36,9 +37,10 @@ defmodule EMQXUmbrella.MixProject do {:gen_rpc, github: "emqx/gen_rpc", tag: "2.5.1", override: true}, {:gen_coap, github: "emqx/gen_coap", tag: "v0.3.2", override: true}, {:snabbkaffe, github: "kafka4beam/snabbkaffe", tag: "0.14.0", override: true}, - {:emqx_http_lib, github: "emqx/emqx_http_lib", tag: "0.4.0", override: true} - | (enable_bcrypt() && [{:bcrypt, github: "emqx/erlang-bcrypt", tag: "0.6.0"}]) || [] - ] + {:emqx_http_lib, github: "emqx/emqx_http_lib", tag: "0.4.0", override: true}, + #### + {:emqx, path: "apps/emqx"}, + ] ++ ((enable_bcrypt() && [{:bcrypt, github: "emqx/erlang-bcrypt", tag: "0.6.0"}]) || []) end defp releases do diff --git a/mix.lock b/mix.lock index 48fb06f0d..5d1ad99e8 100644 --- a/mix.lock +++ b/mix.lock @@ -1,44 +1,31 @@ %{ - "bbmustache": {:hex, :bbmustache, "1.12.1", "857fbdf86bda46d07201b0e7a969820cb763a7c174c485fd0780d7e033efe9f0", [:rebar3], [], "hexpm", "f4320778c31a821a2a664db8894618abb79c1af7bbf7c03c703c8868d9bb09fe"}, "bcrypt": {:git, "https://github.com/emqx/erlang-bcrypt.git", "dc2ba66acf2332c111362d01137746eefecc5e90", [tag: "0.6.0"]}, "cowboy": {:git, "https://github.com/emqx/cowboy.git", "b89d4689a04149b1a4a3641280aa5c5643f921b2", [tag: "2.8.2"]}, - "cowboy_swagger": {:git, "https://github.com/inaka/cowboy_swagger", "f4b49a4f289a9ee9ae1ff35772c4e191b5fafbd5", [tag: "2.4.0"]}, "cowlib": {:hex, :cowlib, "2.11.0", "0b9ff9c346629256c42ebe1eeb769a83c6cb771a6ee5960bd110ab0b9b872063", [:make, :rebar3], [], "hexpm", "2b3e9da0b21c4565751a6d4901c20d1b4cc25cbb7fd50d91d2ab6dd287bc86a9"}, "cuttlefish": {:git, "https://github.com/emqx/cuttlefish.git", "6c346563e89ebbd95dbc1c29017adaf9abf85ca1", []}, - "ecpool": {:git, "https://github.com/emqx/ecpool.git", "0516d2cebd14654ef8c583c347e4a0b01363b86d", [tag: "0.5.1"]}, "eetcd": {:hex, :eetcd, "0.3.4", "27e8b4775230c53a9ef602f62a1603591302b40b2eb195d567edffb35b6cf1a2", [:rebar3], [{:gun, "1.3.3", [hex: :gun, repo: "hexpm", optional: false]}], "hexpm", "b763c0e1a9741d39a62f5a19186a342863eacbc769151c4e81db5790efecefca"}, - "ekka": {:git, "https://github.com/emqx/ekka.git", "005fd6bb94199dc2ecb4ba03284f253b408e02d9", [tag: "0.11.1"]}, - "emqtt": {:git, "https://github.com/emqx/emqtt.git", "25892ef48a979a9dfbd74d86133cb28cf11f3cf4", [tag: "1.4.3"]}, + "ekka": {:git, "https://github.com/emqx/ekka", "005fd6bb94199dc2ecb4ba03284f253b408e02d9", [tag: "0.11.1"]}, "emqx_http_lib": {:git, "https://github.com/emqx/emqx_http_lib.git", "9a1aafcbad1bb35392ebabc0cf102c7bce660432", [tag: "0.4.0"]}, - "epgsql": {:git, "https://github.com/epgsql/epgsql.git", "895c8f9d53f08d09ec6a0301c56d3d6f270929f2", [tag: "4.4.0"]}, - "esasl": {:git, "https://github.com/emqx/esasl.git", "1d4ab8d3ff7fd52018d3dddfec499933f9bb62b6", [tag: "0.1.0"]}, "esockd": {:git, "https://github.com/emqx/esockd.git", "9b959fc11a1c398a589892f335235be6c5b4a454", [tag: "5.8.0"]}, - "estatsd": {:git, "https://github.com/emqx/estatsd.git", "5184d846b7ecb83509bd4d32695c60428c0198cd", [tag: "0.1.0"]}, "gen_coap": {:git, "https://github.com/emqx/gen_coap.git", "9bf5e7f795badf68e2fb4eb226f576308f5b1bb4", [tag: "v0.3.2"]}, "gen_rpc": {:git, "https://github.com/emqx/gen_rpc.git", "fb7418dc8cf7e97d153fba073bee0fac07dce753", [tag: "2.5.1"]}, "getopt": {:git, "https://github.com/emqx/getopt.git", "215f2083408e1fe562d441aea6062bf5d9e1fb67", [tag: "v1.0.2"]}, - "gpb": {:hex, :gpb, "4.19.1", "665f59680577038508a11cf6c932fce26a4e35a19d586b912d763f292bc8e33b", [:make, :rebar3], [], "hexpm", "f6f4a7dcabd1723fdd3a3fd7c7efeea8146da02b6f575e75bfc49f15ff4db359"}, + "gpb": {:hex, :gpb, "4.19.2", "e841a1c5d5b82b6fbaddd2b6968c66ad48b34adc3b0d974e55cca653bd28ccc5", [:make, :rebar3], [], "hexpm", "3f4cb7f263e94675a598501a6dc96ec17f93ecb28c29bea3bea3a71c53a3317a"}, "gproc": {:hex, :gproc, "0.9.0", "853ccb7805e9ada25d227a157ba966f7b34508f386a3e7e21992b1b484230699", [:rebar3], [], "hexpm", "587e8af698ccd3504cf4ba8d90f893ede2b0f58cabb8a916e2bf9321de3cf10b"}, "grpc": {:git, "https://github.com/emqx/grpc-erl.git", "f8ba39eb075fb2a7f370563045d5e5d0914f2703", [tag: "0.6.2"]}, "gun": {:git, "https://github.com/emqx/gun.git", "e1b5e14139e2a936ad6561bf960f70f1e80b81e2", [tag: "1.3.4"]}, "hocon": {:git, "https://github.com/emqx/hocon.git", "2021a1b82c1f654c98181ba2dbfec5457c5c6eb7", [tag: "0.20.5"]}, "jiffy": {:git, "https://github.com/emqx/jiffy.git", "baa1f4e750ae3c5c9e54f9c2e52280b7fc24a8d9", [tag: "1.0.5"]}, - "jose": {:hex, :jose, "1.11.2", "f4c018ccf4fdce22c71e44d471f15f723cb3efab5d909ab2ba202b5bf35557b3", [:mix, :rebar3], [], "hexpm", "98143fbc48d55f3a18daba82d34fe48959d44538e9697c08f34200fa5f0947d2"}, "jsx": {:hex, :jsx, "3.1.0", "d12516baa0bb23a59bb35dccaf02a1bd08243fcbb9efe24f2d9d056ccff71268", [:rebar3], [], "hexpm", "0c5cc8fdc11b53cc25cf65ac6705ad39e54ecc56d1c22e4adb8f5a53fb9427f3"}, - "lc": {:git, "https://github.com/qzhuyan/lc.git", "6f38a748af0993bb4e440a0f9223d6aa7b90b86b", [tag: "0.1.1"]}, - "lwm2m_coap": {:git, "https://github.com/emqx/lwm2m-coap.git", "495f3c62fae153040c89f9a0ba5344789ff5acc8", [tag: "v2.0.0"]}, - "minirest": {:git, "https://github.com/emqx/minirest.git", "60c1a5a1f5df00a662cb34cf4101c7a21ffe08f9", [tag: "1.2.4"]}, + "lc": {:git, "https://github.com/qzhuyan/lc.git", "6f98d098e5aaf4fcd6afbbb2acca96855c474600", [tag: "0.1.2"]}, "mria": {:git, "https://github.com/emqx/mria", "f0efc591339f960b5126ec4e1a0fed85d1578eb5", [tag: "0.1.2"]}, - "mysql": {:git, "https://github.com/emqx/mysql-otp.git", "bdabac44cc8836a9e23897b7e1b77c7df7e04f70", [tag: "1.7.1"]}, "pbkdf2": {:git, "https://github.com/emqx/erlang-pbkdf2.git", "45d9981209ea07a83a58cf85aaf8236457da4342", [tag: "2.0.4"]}, "poolboy": {:git, "https://github.com/emqx/poolboy.git", "29be47db8c2be38b18c908e43a80ebb7b9b6116b", [tag: "1.5.2"]}, - "prometheus": {:git, "https://github.com/emqx/prometheus.erl.git", "a41488df09472448057d264ef520cf2f71d925f8", [tag: "v3.1.1"]}, - "quicer": {:git, "https://github.com/emqx/quic.git", "348c08a3f5a3b90861906fb436ff0ced453adfa2", [tag: "0.0.8"]}, + "quicer": {:git, "https://github.com/emqx/quic.git", "ef73617d0f10f0f30f3aa77eb4a2f6ae071a2e29", [tag: "0.0.9"]}, "ranch": {:hex, :ranch, "2.1.0", "2261f9ed9574dcfcc444106b9f6da155e6e540b2f82ba3d42b339b93673b72a3", [:make, :rebar3], [], "hexpm", "244ee3fa2a6175270d8e1fc59024fd9dbc76294a321057de8f803b1479e76916"}, - "recon": {:hex, :recon, "2.5.2", "cba53fa8db83ad968c9a652e09c3ed7ddcc4da434f27c3eaa9ca47ffb2b1ff03", [:mix, :rebar3], [], "hexpm", "2c7523c8dee91dff41f6b3d63cba2bd49eb6d2fe5bf1eec0df7f87eb5e230e1c"}, + "recon": {:git, "https://github.com/ferd/recon", "f7b6c08e6e9e2219db58bfb012c58c178822e01e", [tag: "2.5.1"]}, "replayq": {:git, "https://github.com/emqx/replayq", "9e5ba14d65ff1885ad85b6d33a859c01c322f273", [tag: "0.3.1"]}, "snabbkaffe": {:git, "https://github.com/kafka4beam/snabbkaffe.git", "ea1fbffddf8a3b5939bff61cc72ba45c3dceb058", [tag: "0.14.0"]}, "ssl_verify_fun": {:git, "https://github.com/deadtrickster/ssl_verify_fun.erl.git", "c5718226b0b9f3d1a38ef6ca3c3b4c75f53dda92", [tag: "1.1.4"]}, - "trails": {:hex, :trails, "2.3.0", "b09703f056705f4943e14fff077b98c711a6f48fad40f4ff0b350794074ad69c", [:rebar3], [{:cowboy, "2.8.0", [hex: :cowboy, repo: "hexpm", optional: false]}, {:ranch, "2.0.0", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "40804001eb80417aa9d02400f39b7216956c3f251539a8a6096a69b3fac0ea07"}, "typerefl": {:git, "https://github.com/k32/typerefl.git", "a751e0664752b1824206ca34377ac2d2c3ed53bc", [tag: "0.8.4"]}, }