diff --git a/.gitignore b/.gitignore index b8febc73..d7740bcb 100644 --- a/.gitignore +++ b/.gitignore @@ -24,4 +24,4 @@ ebin env # hex_core artifact -src/vendored/r3_safe_erl_term.erl +apps/rebar/src/vendored/r3_safe_erl_term.erl diff --git a/priv/shell-completion/bash/rebar3 b/apps/rebar/priv/shell-completion/bash/rebar3 similarity index 100% rename from priv/shell-completion/bash/rebar3 rename to apps/rebar/priv/shell-completion/bash/rebar3 diff --git a/priv/shell-completion/fish/rebar3.fish b/apps/rebar/priv/shell-completion/fish/rebar3.fish similarity index 100% rename from priv/shell-completion/fish/rebar3.fish rename to apps/rebar/priv/shell-completion/fish/rebar3.fish diff --git a/priv/shell-completion/zsh/_rebar3 b/apps/rebar/priv/shell-completion/zsh/_rebar3 similarity index 100% rename from priv/shell-completion/zsh/_rebar3 rename to apps/rebar/priv/shell-completion/zsh/_rebar3 diff --git a/priv/templates/LICENSE b/apps/rebar/priv/templates/LICENSE similarity index 100% rename from priv/templates/LICENSE rename to apps/rebar/priv/templates/LICENSE diff --git a/priv/templates/Makefile b/apps/rebar/priv/templates/Makefile similarity index 100% rename from priv/templates/Makefile rename to apps/rebar/priv/templates/Makefile diff --git a/priv/templates/README.md b/apps/rebar/priv/templates/README.md similarity index 100% rename from priv/templates/README.md rename to apps/rebar/priv/templates/README.md diff --git a/priv/templates/app.erl b/apps/rebar/priv/templates/app.erl similarity index 100% rename from priv/templates/app.erl rename to apps/rebar/priv/templates/app.erl diff --git a/priv/templates/app.template b/apps/rebar/priv/templates/app.template similarity index 100% rename from priv/templates/app.template rename to apps/rebar/priv/templates/app.template diff --git a/priv/templates/app_rebar.config b/apps/rebar/priv/templates/app_rebar.config similarity index 100% rename from priv/templates/app_rebar.config rename to apps/rebar/priv/templates/app_rebar.config diff --git a/priv/templates/cmake.template b/apps/rebar/priv/templates/cmake.template similarity index 100% rename from priv/templates/cmake.template rename to apps/rebar/priv/templates/cmake.template diff --git a/priv/templates/escript.template b/apps/rebar/priv/templates/escript.template similarity index 100% rename from priv/templates/escript.template rename to apps/rebar/priv/templates/escript.template diff --git a/priv/templates/escript_README.md b/apps/rebar/priv/templates/escript_README.md similarity index 100% rename from priv/templates/escript_README.md rename to apps/rebar/priv/templates/escript_README.md diff --git a/priv/templates/escript_mod.erl b/apps/rebar/priv/templates/escript_mod.erl similarity index 100% rename from priv/templates/escript_mod.erl rename to apps/rebar/priv/templates/escript_mod.erl diff --git a/priv/templates/escript_rebar.config b/apps/rebar/priv/templates/escript_rebar.config similarity index 100% rename from priv/templates/escript_rebar.config rename to apps/rebar/priv/templates/escript_rebar.config diff --git a/priv/templates/gitignore b/apps/rebar/priv/templates/gitignore similarity index 100% rename from priv/templates/gitignore rename to apps/rebar/priv/templates/gitignore diff --git a/priv/templates/lib.template b/apps/rebar/priv/templates/lib.template similarity index 100% rename from priv/templates/lib.template rename to apps/rebar/priv/templates/lib.template diff --git a/priv/templates/mod.erl b/apps/rebar/priv/templates/mod.erl similarity index 100% rename from priv/templates/mod.erl rename to apps/rebar/priv/templates/mod.erl diff --git a/priv/templates/otp_app.app.src b/apps/rebar/priv/templates/otp_app.app.src similarity index 100% rename from priv/templates/otp_app.app.src rename to apps/rebar/priv/templates/otp_app.app.src diff --git a/priv/templates/otp_lib.app.src b/apps/rebar/priv/templates/otp_lib.app.src similarity index 100% rename from priv/templates/otp_lib.app.src rename to apps/rebar/priv/templates/otp_lib.app.src diff --git a/priv/templates/plugin.erl b/apps/rebar/priv/templates/plugin.erl similarity index 100% rename from priv/templates/plugin.erl rename to apps/rebar/priv/templates/plugin.erl diff --git a/priv/templates/plugin.template b/apps/rebar/priv/templates/plugin.template similarity index 100% rename from priv/templates/plugin.template rename to apps/rebar/priv/templates/plugin.template diff --git a/priv/templates/plugin_README.md b/apps/rebar/priv/templates/plugin_README.md similarity index 100% rename from priv/templates/plugin_README.md rename to apps/rebar/priv/templates/plugin_README.md diff --git a/priv/templates/provider.erl b/apps/rebar/priv/templates/provider.erl similarity index 100% rename from priv/templates/provider.erl rename to apps/rebar/priv/templates/provider.erl diff --git a/priv/templates/rebar.config b/apps/rebar/priv/templates/rebar.config similarity index 100% rename from priv/templates/rebar.config rename to apps/rebar/priv/templates/rebar.config diff --git a/priv/templates/release.template b/apps/rebar/priv/templates/release.template similarity index 100% rename from priv/templates/release.template rename to apps/rebar/priv/templates/release.template diff --git a/priv/templates/relx_rebar.config b/apps/rebar/priv/templates/relx_rebar.config similarity index 100% rename from priv/templates/relx_rebar.config rename to apps/rebar/priv/templates/relx_rebar.config diff --git a/priv/templates/sup.erl b/apps/rebar/priv/templates/sup.erl similarity index 100% rename from priv/templates/sup.erl rename to apps/rebar/priv/templates/sup.erl diff --git a/priv/templates/sys.config b/apps/rebar/priv/templates/sys.config similarity index 100% rename from priv/templates/sys.config rename to apps/rebar/priv/templates/sys.config diff --git a/priv/templates/umbrella.template b/apps/rebar/priv/templates/umbrella.template similarity index 100% rename from priv/templates/umbrella.template rename to apps/rebar/priv/templates/umbrella.template diff --git a/priv/templates/vm.args b/apps/rebar/priv/templates/vm.args similarity index 100% rename from priv/templates/vm.args rename to apps/rebar/priv/templates/vm.args diff --git a/apps/rebar/rebar.config b/apps/rebar/rebar.config new file mode 100644 index 00000000..da9eb47d --- /dev/null +++ b/apps/rebar/rebar.config @@ -0,0 +1,90 @@ +%% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*- +%% ex: ts=4 sw=4 ft=erlang et + +{deps, [{erlware_commons, "1.5.0"}, + {ssl_verify_fun, "1.1.6"}, + {certifi, "2.9.0"}, + {providers, "1.9.0"}, + {getopt, "1.0.1"}, + {bbmustache, "1.12.2"}, + {relx, "4.7.0"}, + {cf, "0.3.1"}, + {cth_readable, "1.5.1"}, + {eunit_formatters, "0.5.0"}]}. + +{post_hooks, [{"(linux|darwin|solaris|freebsd|netbsd|openbsd)", + escriptize, + "cp \"$REBAR_BUILD_DIR/bin/rebar3\" ./rebar3"}, + {"win32", + escriptize, + "robocopy \"%REBAR_BUILD_DIR%/bin/\" ./ rebar3* " + "/njs /njh /nfl /ndl & exit /b 0"} % silence things + ]}. + +{escript_name, rebar3}. +{escript_wrappers_windows, ["cmd", "powershell"]}. +{escript_comment, "%%Rebar3 3.19.0\n"}. +{escript_emu_args, "%%! +sbtu +A1\n"}. +%% escript_incl_priv is for internal rebar-private use only. +%% Do not use outside rebar. Config interface is not stable. +{escript_incl_priv, [{relx, "templates/*"}, + {rebar, "templates/*"}]}. + +{overrides, [{add, relx, [{erl_opts, [{d, 'RLX_LOG', rebar_log}]}]}]}. + +{erl_opts, [warnings_as_errors, + {platform_define, "^(2[1-9])|(20\\\\.3)", filelib_find_source}, + {platform_define, "^(1|(20))", no_customize_hostname_check}, + {platform_define, "^(20)", fun_stacktrace} + ]}. + +{edoc_opts, [preprocess]}. + +%% Use OTP 23+ when dialyzing rebar3 +{dialyzer, [ + {warnings, [unknown]}, + {plt_extra_apps, [parsetools, public_key]} +]}. + +%% Keep only the logs of the last 5 runs +{ct_opts, [{keep_logs, 5}]}. + +%% Profiles +{profiles, [{test, [ + {deps, [{meck, "0.8.13"}]}, + {erl_opts, [debug_info, nowarn_export_all]} + ] + }, + + {dialyzer, [ + {erl_opts, [debug_info, nowarn_export_all]} + ]}, + + {bootstrap, []}, + + {prod, [ + {erl_opts, [no_debug_info]}, + {overrides, [ + {override, erlware_commons, [ + {erl_opts, [{platform_define, "^[0-9]+", namespaced_types}, + {platform_define, "^R1[4|5]", deprecated_crypto}, + {platform_define, "^((1[8|9])|2)", rand_module}, + {platform_define, "^2", unicode_str}, + {platform_define, "^(R|1|20)", fun_stacktrace}, + no_debug_info, + warnings_as_errors]}, + {deps, []}, {plugins, []}]}, + {add, ssl_verify_hostname, [{erl_opts, [no_debug_info]}]}, + {add, certifi, [{erl_opts, [no_debug_info]}]}, + {add, cf, [{erl_opts, [no_debug_info]}]}, + {add, cth_readable, [{erl_opts, [no_debug_info]}]}, + {add, eunit_formatters, [{erl_opts, [no_debug_info]}]}, + {override, bbmustache, [ + {erl_opts, [no_debug_info, {platform_define, "^[0-9]+", namespaced_types}]}, + {deps, []}, {plugins, []}]}, + {add, getopt, [{erl_opts, [no_debug_info]}]}, + {add, providers, [{erl_opts, [no_debug_info]}]}, + {add, relx, [{erl_opts, [no_debug_info]}]}]} + ]} + ]}. + diff --git a/src/cth_fail_fast.erl b/apps/rebar/src/cth_fail_fast.erl similarity index 100% rename from src/cth_fail_fast.erl rename to apps/rebar/src/cth_fail_fast.erl diff --git a/src/cth_retry.erl b/apps/rebar/src/cth_retry.erl similarity index 100% rename from src/cth_retry.erl rename to apps/rebar/src/cth_retry.erl diff --git a/src/r3.erl b/apps/rebar/src/r3.erl similarity index 100% rename from src/r3.erl rename to apps/rebar/src/r3.erl diff --git a/src/rebar.app.src.script b/apps/rebar/src/rebar.app.src.script similarity index 100% rename from src/rebar.app.src.script rename to apps/rebar/src/rebar.app.src.script diff --git a/src/rebar.hrl b/apps/rebar/src/rebar.hrl similarity index 100% rename from src/rebar.hrl rename to apps/rebar/src/rebar.hrl diff --git a/src/rebar3.erl b/apps/rebar/src/rebar3.erl similarity index 100% rename from src/rebar3.erl rename to apps/rebar/src/rebar3.erl diff --git a/src/rebar_agent.erl b/apps/rebar/src/rebar_agent.erl similarity index 100% rename from src/rebar_agent.erl rename to apps/rebar/src/rebar_agent.erl diff --git a/src/rebar_api.erl b/apps/rebar/src/rebar_api.erl similarity index 100% rename from src/rebar_api.erl rename to apps/rebar/src/rebar_api.erl diff --git a/src/rebar_app_discover.erl b/apps/rebar/src/rebar_app_discover.erl similarity index 100% rename from src/rebar_app_discover.erl rename to apps/rebar/src/rebar_app_discover.erl diff --git a/src/rebar_app_info.erl b/apps/rebar/src/rebar_app_info.erl similarity index 100% rename from src/rebar_app_info.erl rename to apps/rebar/src/rebar_app_info.erl diff --git a/src/rebar_app_utils.erl b/apps/rebar/src/rebar_app_utils.erl similarity index 100% rename from src/rebar_app_utils.erl rename to apps/rebar/src/rebar_app_utils.erl diff --git a/src/rebar_base_compiler.erl b/apps/rebar/src/rebar_base_compiler.erl similarity index 100% rename from src/rebar_base_compiler.erl rename to apps/rebar/src/rebar_base_compiler.erl diff --git a/src/rebar_compiler.erl b/apps/rebar/src/rebar_compiler.erl similarity index 100% rename from src/rebar_compiler.erl rename to apps/rebar/src/rebar_compiler.erl diff --git a/src/rebar_compiler_dag.erl b/apps/rebar/src/rebar_compiler_dag.erl similarity index 100% rename from src/rebar_compiler_dag.erl rename to apps/rebar/src/rebar_compiler_dag.erl diff --git a/src/rebar_compiler_epp.erl b/apps/rebar/src/rebar_compiler_epp.erl similarity index 100% rename from src/rebar_compiler_epp.erl rename to apps/rebar/src/rebar_compiler_epp.erl diff --git a/src/rebar_compiler_erl.erl b/apps/rebar/src/rebar_compiler_erl.erl similarity index 100% rename from src/rebar_compiler_erl.erl rename to apps/rebar/src/rebar_compiler_erl.erl diff --git a/src/rebar_compiler_mib.erl b/apps/rebar/src/rebar_compiler_mib.erl similarity index 100% rename from src/rebar_compiler_mib.erl rename to apps/rebar/src/rebar_compiler_mib.erl diff --git a/src/rebar_compiler_xrl.erl b/apps/rebar/src/rebar_compiler_xrl.erl similarity index 100% rename from src/rebar_compiler_xrl.erl rename to apps/rebar/src/rebar_compiler_xrl.erl diff --git a/src/rebar_compiler_yrl.erl b/apps/rebar/src/rebar_compiler_yrl.erl similarity index 100% rename from src/rebar_compiler_yrl.erl rename to apps/rebar/src/rebar_compiler_yrl.erl diff --git a/src/rebar_config.erl b/apps/rebar/src/rebar_config.erl similarity index 100% rename from src/rebar_config.erl rename to apps/rebar/src/rebar_config.erl diff --git a/src/rebar_core.erl b/apps/rebar/src/rebar_core.erl similarity index 100% rename from src/rebar_core.erl rename to apps/rebar/src/rebar_core.erl diff --git a/src/rebar_dialyzer_format.erl b/apps/rebar/src/rebar_dialyzer_format.erl similarity index 100% rename from src/rebar_dialyzer_format.erl rename to apps/rebar/src/rebar_dialyzer_format.erl diff --git a/src/rebar_digraph.erl b/apps/rebar/src/rebar_digraph.erl similarity index 100% rename from src/rebar_digraph.erl rename to apps/rebar/src/rebar_digraph.erl diff --git a/src/rebar_dir.erl b/apps/rebar/src/rebar_dir.erl similarity index 100% rename from src/rebar_dir.erl rename to apps/rebar/src/rebar_dir.erl diff --git a/src/rebar_dist_utils.erl b/apps/rebar/src/rebar_dist_utils.erl similarity index 100% rename from src/rebar_dist_utils.erl rename to apps/rebar/src/rebar_dist_utils.erl diff --git a/src/rebar_env.erl b/apps/rebar/src/rebar_env.erl similarity index 100% rename from src/rebar_env.erl rename to apps/rebar/src/rebar_env.erl diff --git a/src/rebar_erlc_compiler.erl b/apps/rebar/src/rebar_erlc_compiler.erl similarity index 100% rename from src/rebar_erlc_compiler.erl rename to apps/rebar/src/rebar_erlc_compiler.erl diff --git a/src/rebar_fetch.erl b/apps/rebar/src/rebar_fetch.erl similarity index 100% rename from src/rebar_fetch.erl rename to apps/rebar/src/rebar_fetch.erl diff --git a/src/rebar_file_utils.erl b/apps/rebar/src/rebar_file_utils.erl similarity index 100% rename from src/rebar_file_utils.erl rename to apps/rebar/src/rebar_file_utils.erl diff --git a/src/rebar_git_resource.erl b/apps/rebar/src/rebar_git_resource.erl similarity index 100% rename from src/rebar_git_resource.erl rename to apps/rebar/src/rebar_git_resource.erl diff --git a/src/rebar_git_subdir_resource.erl b/apps/rebar/src/rebar_git_subdir_resource.erl similarity index 100% rename from src/rebar_git_subdir_resource.erl rename to apps/rebar/src/rebar_git_subdir_resource.erl diff --git a/src/rebar_hex_repos.erl b/apps/rebar/src/rebar_hex_repos.erl similarity index 100% rename from src/rebar_hex_repos.erl rename to apps/rebar/src/rebar_hex_repos.erl diff --git a/src/rebar_hg_resource.erl b/apps/rebar/src/rebar_hg_resource.erl similarity index 100% rename from src/rebar_hg_resource.erl rename to apps/rebar/src/rebar_hg_resource.erl diff --git a/src/rebar_hooks.erl b/apps/rebar/src/rebar_hooks.erl similarity index 100% rename from src/rebar_hooks.erl rename to apps/rebar/src/rebar_hooks.erl diff --git a/src/rebar_httpc_adapter.erl b/apps/rebar/src/rebar_httpc_adapter.erl similarity index 100% rename from src/rebar_httpc_adapter.erl rename to apps/rebar/src/rebar_httpc_adapter.erl diff --git a/src/rebar_log.erl b/apps/rebar/src/rebar_log.erl similarity index 100% rename from src/rebar_log.erl rename to apps/rebar/src/rebar_log.erl diff --git a/src/rebar_opts.erl b/apps/rebar/src/rebar_opts.erl similarity index 100% rename from src/rebar_opts.erl rename to apps/rebar/src/rebar_opts.erl diff --git a/src/rebar_otp_app.erl b/apps/rebar/src/rebar_otp_app.erl similarity index 100% rename from src/rebar_otp_app.erl rename to apps/rebar/src/rebar_otp_app.erl diff --git a/src/rebar_packages.erl b/apps/rebar/src/rebar_packages.erl similarity index 100% rename from src/rebar_packages.erl rename to apps/rebar/src/rebar_packages.erl diff --git a/src/rebar_parallel.erl b/apps/rebar/src/rebar_parallel.erl similarity index 100% rename from src/rebar_parallel.erl rename to apps/rebar/src/rebar_parallel.erl diff --git a/src/rebar_paths.erl b/apps/rebar/src/rebar_paths.erl similarity index 100% rename from src/rebar_paths.erl rename to apps/rebar/src/rebar_paths.erl diff --git a/src/rebar_pkg_resource.erl b/apps/rebar/src/rebar_pkg_resource.erl similarity index 100% rename from src/rebar_pkg_resource.erl rename to apps/rebar/src/rebar_pkg_resource.erl diff --git a/src/rebar_plugins.erl b/apps/rebar/src/rebar_plugins.erl similarity index 100% rename from src/rebar_plugins.erl rename to apps/rebar/src/rebar_plugins.erl diff --git a/src/rebar_prv_alias.erl b/apps/rebar/src/rebar_prv_alias.erl similarity index 100% rename from src/rebar_prv_alias.erl rename to apps/rebar/src/rebar_prv_alias.erl diff --git a/src/rebar_prv_app_discovery.erl b/apps/rebar/src/rebar_prv_app_discovery.erl similarity index 100% rename from src/rebar_prv_app_discovery.erl rename to apps/rebar/src/rebar_prv_app_discovery.erl diff --git a/src/rebar_prv_as.erl b/apps/rebar/src/rebar_prv_as.erl similarity index 100% rename from src/rebar_prv_as.erl rename to apps/rebar/src/rebar_prv_as.erl diff --git a/src/rebar_prv_bare_compile.erl b/apps/rebar/src/rebar_prv_bare_compile.erl similarity index 100% rename from src/rebar_prv_bare_compile.erl rename to apps/rebar/src/rebar_prv_bare_compile.erl diff --git a/src/rebar_prv_clean.erl b/apps/rebar/src/rebar_prv_clean.erl similarity index 100% rename from src/rebar_prv_clean.erl rename to apps/rebar/src/rebar_prv_clean.erl diff --git a/src/rebar_prv_common_test.erl b/apps/rebar/src/rebar_prv_common_test.erl similarity index 100% rename from src/rebar_prv_common_test.erl rename to apps/rebar/src/rebar_prv_common_test.erl diff --git a/src/rebar_prv_compile.erl b/apps/rebar/src/rebar_prv_compile.erl similarity index 100% rename from src/rebar_prv_compile.erl rename to apps/rebar/src/rebar_prv_compile.erl diff --git a/src/rebar_prv_cover.erl b/apps/rebar/src/rebar_prv_cover.erl similarity index 100% rename from src/rebar_prv_cover.erl rename to apps/rebar/src/rebar_prv_cover.erl diff --git a/src/rebar_prv_deps.erl b/apps/rebar/src/rebar_prv_deps.erl similarity index 100% rename from src/rebar_prv_deps.erl rename to apps/rebar/src/rebar_prv_deps.erl diff --git a/src/rebar_prv_deps_tree.erl b/apps/rebar/src/rebar_prv_deps_tree.erl similarity index 100% rename from src/rebar_prv_deps_tree.erl rename to apps/rebar/src/rebar_prv_deps_tree.erl diff --git a/src/rebar_prv_dialyzer.erl b/apps/rebar/src/rebar_prv_dialyzer.erl similarity index 100% rename from src/rebar_prv_dialyzer.erl rename to apps/rebar/src/rebar_prv_dialyzer.erl diff --git a/src/rebar_prv_do.erl b/apps/rebar/src/rebar_prv_do.erl similarity index 100% rename from src/rebar_prv_do.erl rename to apps/rebar/src/rebar_prv_do.erl diff --git a/src/rebar_prv_edoc.erl b/apps/rebar/src/rebar_prv_edoc.erl similarity index 100% rename from src/rebar_prv_edoc.erl rename to apps/rebar/src/rebar_prv_edoc.erl diff --git a/src/rebar_prv_escriptize.erl b/apps/rebar/src/rebar_prv_escriptize.erl similarity index 100% rename from src/rebar_prv_escriptize.erl rename to apps/rebar/src/rebar_prv_escriptize.erl diff --git a/src/rebar_prv_eunit.erl b/apps/rebar/src/rebar_prv_eunit.erl similarity index 100% rename from src/rebar_prv_eunit.erl rename to apps/rebar/src/rebar_prv_eunit.erl diff --git a/src/rebar_prv_get_deps.erl b/apps/rebar/src/rebar_prv_get_deps.erl similarity index 100% rename from src/rebar_prv_get_deps.erl rename to apps/rebar/src/rebar_prv_get_deps.erl diff --git a/src/rebar_prv_help.erl b/apps/rebar/src/rebar_prv_help.erl similarity index 100% rename from src/rebar_prv_help.erl rename to apps/rebar/src/rebar_prv_help.erl diff --git a/src/rebar_prv_install_deps.erl b/apps/rebar/src/rebar_prv_install_deps.erl similarity index 100% rename from src/rebar_prv_install_deps.erl rename to apps/rebar/src/rebar_prv_install_deps.erl diff --git a/src/rebar_prv_local_install.erl b/apps/rebar/src/rebar_prv_local_install.erl similarity index 100% rename from src/rebar_prv_local_install.erl rename to apps/rebar/src/rebar_prv_local_install.erl diff --git a/src/rebar_prv_local_upgrade.erl b/apps/rebar/src/rebar_prv_local_upgrade.erl similarity index 100% rename from src/rebar_prv_local_upgrade.erl rename to apps/rebar/src/rebar_prv_local_upgrade.erl diff --git a/src/rebar_prv_lock.erl b/apps/rebar/src/rebar_prv_lock.erl similarity index 100% rename from src/rebar_prv_lock.erl rename to apps/rebar/src/rebar_prv_lock.erl diff --git a/src/rebar_prv_new.erl b/apps/rebar/src/rebar_prv_new.erl similarity index 100% rename from src/rebar_prv_new.erl rename to apps/rebar/src/rebar_prv_new.erl diff --git a/src/rebar_prv_packages.erl b/apps/rebar/src/rebar_prv_packages.erl similarity index 100% rename from src/rebar_prv_packages.erl rename to apps/rebar/src/rebar_prv_packages.erl diff --git a/src/rebar_prv_path.erl b/apps/rebar/src/rebar_prv_path.erl similarity index 100% rename from src/rebar_prv_path.erl rename to apps/rebar/src/rebar_prv_path.erl diff --git a/src/rebar_prv_plugins.erl b/apps/rebar/src/rebar_prv_plugins.erl similarity index 100% rename from src/rebar_prv_plugins.erl rename to apps/rebar/src/rebar_prv_plugins.erl diff --git a/src/rebar_prv_plugins_upgrade.erl b/apps/rebar/src/rebar_prv_plugins_upgrade.erl similarity index 100% rename from src/rebar_prv_plugins_upgrade.erl rename to apps/rebar/src/rebar_prv_plugins_upgrade.erl diff --git a/src/rebar_prv_release.erl b/apps/rebar/src/rebar_prv_release.erl similarity index 100% rename from src/rebar_prv_release.erl rename to apps/rebar/src/rebar_prv_release.erl diff --git a/src/rebar_prv_relup.erl b/apps/rebar/src/rebar_prv_relup.erl similarity index 100% rename from src/rebar_prv_relup.erl rename to apps/rebar/src/rebar_prv_relup.erl diff --git a/src/rebar_prv_report.erl b/apps/rebar/src/rebar_prv_report.erl similarity index 100% rename from src/rebar_prv_report.erl rename to apps/rebar/src/rebar_prv_report.erl diff --git a/src/rebar_prv_repos.erl b/apps/rebar/src/rebar_prv_repos.erl similarity index 100% rename from src/rebar_prv_repos.erl rename to apps/rebar/src/rebar_prv_repos.erl diff --git a/src/rebar_prv_shell.erl b/apps/rebar/src/rebar_prv_shell.erl similarity index 100% rename from src/rebar_prv_shell.erl rename to apps/rebar/src/rebar_prv_shell.erl diff --git a/src/rebar_prv_state.erl b/apps/rebar/src/rebar_prv_state.erl similarity index 100% rename from src/rebar_prv_state.erl rename to apps/rebar/src/rebar_prv_state.erl diff --git a/src/rebar_prv_tar.erl b/apps/rebar/src/rebar_prv_tar.erl similarity index 100% rename from src/rebar_prv_tar.erl rename to apps/rebar/src/rebar_prv_tar.erl diff --git a/src/rebar_prv_unlock.erl b/apps/rebar/src/rebar_prv_unlock.erl similarity index 100% rename from src/rebar_prv_unlock.erl rename to apps/rebar/src/rebar_prv_unlock.erl diff --git a/src/rebar_prv_update.erl b/apps/rebar/src/rebar_prv_update.erl similarity index 100% rename from src/rebar_prv_update.erl rename to apps/rebar/src/rebar_prv_update.erl diff --git a/src/rebar_prv_upgrade.erl b/apps/rebar/src/rebar_prv_upgrade.erl similarity index 100% rename from src/rebar_prv_upgrade.erl rename to apps/rebar/src/rebar_prv_upgrade.erl diff --git a/src/rebar_prv_vendor.erl b/apps/rebar/src/rebar_prv_vendor.erl similarity index 100% rename from src/rebar_prv_vendor.erl rename to apps/rebar/src/rebar_prv_vendor.erl diff --git a/src/rebar_prv_version.erl b/apps/rebar/src/rebar_prv_version.erl similarity index 100% rename from src/rebar_prv_version.erl rename to apps/rebar/src/rebar_prv_version.erl diff --git a/src/rebar_prv_xref.erl b/apps/rebar/src/rebar_prv_xref.erl similarity index 100% rename from src/rebar_prv_xref.erl rename to apps/rebar/src/rebar_prv_xref.erl diff --git a/src/rebar_relx.erl b/apps/rebar/src/rebar_relx.erl similarity index 100% rename from src/rebar_relx.erl rename to apps/rebar/src/rebar_relx.erl diff --git a/src/rebar_resource.erl b/apps/rebar/src/rebar_resource.erl similarity index 100% rename from src/rebar_resource.erl rename to apps/rebar/src/rebar_resource.erl diff --git a/src/rebar_resource_v2.erl b/apps/rebar/src/rebar_resource_v2.erl similarity index 100% rename from src/rebar_resource_v2.erl rename to apps/rebar/src/rebar_resource_v2.erl diff --git a/src/rebar_state.erl b/apps/rebar/src/rebar_state.erl similarity index 100% rename from src/rebar_state.erl rename to apps/rebar/src/rebar_state.erl diff --git a/src/rebar_string.erl b/apps/rebar/src/rebar_string.erl similarity index 100% rename from src/rebar_string.erl rename to apps/rebar/src/rebar_string.erl diff --git a/src/rebar_templater.erl b/apps/rebar/src/rebar_templater.erl similarity index 100% rename from src/rebar_templater.erl rename to apps/rebar/src/rebar_templater.erl diff --git a/src/rebar_uri.erl b/apps/rebar/src/rebar_uri.erl similarity index 100% rename from src/rebar_uri.erl rename to apps/rebar/src/rebar_uri.erl diff --git a/src/rebar_user.erl b/apps/rebar/src/rebar_user.erl similarity index 100% rename from src/rebar_user.erl rename to apps/rebar/src/rebar_user.erl diff --git a/src/rebar_utils.erl b/apps/rebar/src/rebar_utils.erl similarity index 100% rename from src/rebar_utils.erl rename to apps/rebar/src/rebar_utils.erl diff --git a/src/vendored/r3_hex_api.erl b/apps/rebar/src/vendored/r3_hex_api.erl similarity index 100% rename from src/vendored/r3_hex_api.erl rename to apps/rebar/src/vendored/r3_hex_api.erl diff --git a/src/vendored/r3_hex_api_key.erl b/apps/rebar/src/vendored/r3_hex_api_key.erl similarity index 100% rename from src/vendored/r3_hex_api_key.erl rename to apps/rebar/src/vendored/r3_hex_api_key.erl diff --git a/src/vendored/r3_hex_api_package.erl b/apps/rebar/src/vendored/r3_hex_api_package.erl similarity index 100% rename from src/vendored/r3_hex_api_package.erl rename to apps/rebar/src/vendored/r3_hex_api_package.erl diff --git a/src/vendored/r3_hex_api_package_owner.erl b/apps/rebar/src/vendored/r3_hex_api_package_owner.erl similarity index 100% rename from src/vendored/r3_hex_api_package_owner.erl rename to apps/rebar/src/vendored/r3_hex_api_package_owner.erl diff --git a/src/vendored/r3_hex_api_release.erl b/apps/rebar/src/vendored/r3_hex_api_release.erl similarity index 100% rename from src/vendored/r3_hex_api_release.erl rename to apps/rebar/src/vendored/r3_hex_api_release.erl diff --git a/src/vendored/r3_hex_api_user.erl b/apps/rebar/src/vendored/r3_hex_api_user.erl similarity index 100% rename from src/vendored/r3_hex_api_user.erl rename to apps/rebar/src/vendored/r3_hex_api_user.erl diff --git a/src/vendored/r3_hex_core.erl b/apps/rebar/src/vendored/r3_hex_core.erl similarity index 100% rename from src/vendored/r3_hex_core.erl rename to apps/rebar/src/vendored/r3_hex_core.erl diff --git a/src/vendored/r3_hex_core.hrl b/apps/rebar/src/vendored/r3_hex_core.hrl similarity index 100% rename from src/vendored/r3_hex_core.hrl rename to apps/rebar/src/vendored/r3_hex_core.hrl diff --git a/src/vendored/r3_hex_erl_tar.erl b/apps/rebar/src/vendored/r3_hex_erl_tar.erl similarity index 100% rename from src/vendored/r3_hex_erl_tar.erl rename to apps/rebar/src/vendored/r3_hex_erl_tar.erl diff --git a/src/vendored/r3_hex_erl_tar.hrl b/apps/rebar/src/vendored/r3_hex_erl_tar.hrl similarity index 100% rename from src/vendored/r3_hex_erl_tar.hrl rename to apps/rebar/src/vendored/r3_hex_erl_tar.hrl diff --git a/src/vendored/r3_hex_filename.erl b/apps/rebar/src/vendored/r3_hex_filename.erl similarity index 100% rename from src/vendored/r3_hex_filename.erl rename to apps/rebar/src/vendored/r3_hex_filename.erl diff --git a/src/vendored/r3_hex_http.erl b/apps/rebar/src/vendored/r3_hex_http.erl similarity index 100% rename from src/vendored/r3_hex_http.erl rename to apps/rebar/src/vendored/r3_hex_http.erl diff --git a/src/vendored/r3_hex_http_httpc.erl b/apps/rebar/src/vendored/r3_hex_http_httpc.erl similarity index 100% rename from src/vendored/r3_hex_http_httpc.erl rename to apps/rebar/src/vendored/r3_hex_http_httpc.erl diff --git a/src/vendored/r3_hex_pb_names.erl b/apps/rebar/src/vendored/r3_hex_pb_names.erl similarity index 100% rename from src/vendored/r3_hex_pb_names.erl rename to apps/rebar/src/vendored/r3_hex_pb_names.erl diff --git a/src/vendored/r3_hex_pb_package.erl b/apps/rebar/src/vendored/r3_hex_pb_package.erl similarity index 100% rename from src/vendored/r3_hex_pb_package.erl rename to apps/rebar/src/vendored/r3_hex_pb_package.erl diff --git a/src/vendored/r3_hex_pb_signed.erl b/apps/rebar/src/vendored/r3_hex_pb_signed.erl similarity index 100% rename from src/vendored/r3_hex_pb_signed.erl rename to apps/rebar/src/vendored/r3_hex_pb_signed.erl diff --git a/src/vendored/r3_hex_pb_versions.erl b/apps/rebar/src/vendored/r3_hex_pb_versions.erl similarity index 100% rename from src/vendored/r3_hex_pb_versions.erl rename to apps/rebar/src/vendored/r3_hex_pb_versions.erl diff --git a/src/vendored/r3_hex_registry.erl b/apps/rebar/src/vendored/r3_hex_registry.erl similarity index 100% rename from src/vendored/r3_hex_registry.erl rename to apps/rebar/src/vendored/r3_hex_registry.erl diff --git a/src/vendored/r3_hex_repo.erl b/apps/rebar/src/vendored/r3_hex_repo.erl similarity index 100% rename from src/vendored/r3_hex_repo.erl rename to apps/rebar/src/vendored/r3_hex_repo.erl diff --git a/src/vendored/r3_hex_tarball.erl b/apps/rebar/src/vendored/r3_hex_tarball.erl similarity index 100% rename from src/vendored/r3_hex_tarball.erl rename to apps/rebar/src/vendored/r3_hex_tarball.erl diff --git a/src/vendored/r3_safe_erl_term.xrl b/apps/rebar/src/vendored/r3_safe_erl_term.xrl similarity index 100% rename from src/vendored/r3_safe_erl_term.xrl rename to apps/rebar/src/vendored/r3_safe_erl_term.xrl diff --git a/test/mock_git_resource.erl b/apps/rebar/test/mock_git_resource.erl similarity index 100% rename from test/mock_git_resource.erl rename to apps/rebar/test/mock_git_resource.erl diff --git a/test/mock_git_subdir_resource.erl b/apps/rebar/test/mock_git_subdir_resource.erl similarity index 100% rename from test/mock_git_subdir_resource.erl rename to apps/rebar/test/mock_git_subdir_resource.erl diff --git a/test/mock_pkg_resource.erl b/apps/rebar/test/mock_pkg_resource.erl similarity index 100% rename from test/mock_pkg_resource.erl rename to apps/rebar/test/mock_pkg_resource.erl diff --git a/test/rebar_alias_SUITE.erl b/apps/rebar/test/rebar_alias_SUITE.erl similarity index 100% rename from test/rebar_alias_SUITE.erl rename to apps/rebar/test/rebar_alias_SUITE.erl diff --git a/test/rebar_as_SUITE.erl b/apps/rebar/test/rebar_as_SUITE.erl similarity index 100% rename from test/rebar_as_SUITE.erl rename to apps/rebar/test/rebar_as_SUITE.erl diff --git a/test/rebar_compile_SUITE.erl b/apps/rebar/test/rebar_compile_SUITE.erl similarity index 100% rename from test/rebar_compile_SUITE.erl rename to apps/rebar/test/rebar_compile_SUITE.erl diff --git a/test/rebar_compiler_dag_SUITE.erl b/apps/rebar/test/rebar_compiler_dag_SUITE.erl similarity index 100% rename from test/rebar_compiler_dag_SUITE.erl rename to apps/rebar/test/rebar_compiler_dag_SUITE.erl diff --git a/test/rebar_compiler_epp_SUITE.erl b/apps/rebar/test/rebar_compiler_epp_SUITE.erl similarity index 100% rename from test/rebar_compiler_epp_SUITE.erl rename to apps/rebar/test/rebar_compiler_epp_SUITE.erl diff --git a/test/rebar_cover_SUITE.erl b/apps/rebar/test/rebar_cover_SUITE.erl similarity index 100% rename from test/rebar_cover_SUITE.erl rename to apps/rebar/test/rebar_cover_SUITE.erl diff --git a/test/rebar_ct_SUITE.erl b/apps/rebar/test/rebar_ct_SUITE.erl similarity index 100% rename from test/rebar_ct_SUITE.erl rename to apps/rebar/test/rebar_ct_SUITE.erl diff --git a/test/rebar_deps_SUITE.erl b/apps/rebar/test/rebar_deps_SUITE.erl similarity index 100% rename from test/rebar_deps_SUITE.erl rename to apps/rebar/test/rebar_deps_SUITE.erl diff --git a/test/rebar_dialyzer_SUITE.erl b/apps/rebar/test/rebar_dialyzer_SUITE.erl similarity index 100% rename from test/rebar_dialyzer_SUITE.erl rename to apps/rebar/test/rebar_dialyzer_SUITE.erl diff --git a/test/rebar_dir_SUITE.erl b/apps/rebar/test/rebar_dir_SUITE.erl similarity index 100% rename from test/rebar_dir_SUITE.erl rename to apps/rebar/test/rebar_dir_SUITE.erl diff --git a/test/rebar_disable_app_SUITE.erl b/apps/rebar/test/rebar_disable_app_SUITE.erl similarity index 100% rename from test/rebar_disable_app_SUITE.erl rename to apps/rebar/test/rebar_disable_app_SUITE.erl diff --git a/test/rebar_discover_SUITE.erl b/apps/rebar/test/rebar_discover_SUITE.erl similarity index 100% rename from test/rebar_discover_SUITE.erl rename to apps/rebar/test/rebar_discover_SUITE.erl diff --git a/test/rebar_dist_utils_SUITE.erl b/apps/rebar/test/rebar_dist_utils_SUITE.erl similarity index 100% rename from test/rebar_dist_utils_SUITE.erl rename to apps/rebar/test/rebar_dist_utils_SUITE.erl diff --git a/test/rebar_edoc_SUITE.erl b/apps/rebar/test/rebar_edoc_SUITE.erl similarity index 100% rename from test/rebar_edoc_SUITE.erl rename to apps/rebar/test/rebar_edoc_SUITE.erl diff --git a/test/rebar_edoc_SUITE_data/bad/apps/bad_bar1/src/bad_bar1.app.src b/apps/rebar/test/rebar_edoc_SUITE_data/bad/apps/bad_bar1/src/bad_bar1.app.src similarity index 100% rename from test/rebar_edoc_SUITE_data/bad/apps/bad_bar1/src/bad_bar1.app.src rename to apps/rebar/test/rebar_edoc_SUITE_data/bad/apps/bad_bar1/src/bad_bar1.app.src diff --git a/test/rebar_edoc_SUITE_data/bad/apps/bad_bar1/src/bad_bar1.erl b/apps/rebar/test/rebar_edoc_SUITE_data/bad/apps/bad_bar1/src/bad_bar1.erl similarity index 100% rename from test/rebar_edoc_SUITE_data/bad/apps/bad_bar1/src/bad_bar1.erl rename to apps/rebar/test/rebar_edoc_SUITE_data/bad/apps/bad_bar1/src/bad_bar1.erl diff --git a/test/rebar_edoc_SUITE_data/bad/apps/bad_bar1/src/bad_bar1_app.erl b/apps/rebar/test/rebar_edoc_SUITE_data/bad/apps/bad_bar1/src/bad_bar1_app.erl similarity index 100% rename from test/rebar_edoc_SUITE_data/bad/apps/bad_bar1/src/bad_bar1_app.erl rename to apps/rebar/test/rebar_edoc_SUITE_data/bad/apps/bad_bar1/src/bad_bar1_app.erl diff --git a/test/rebar_edoc_SUITE_data/bad/apps/bad_bar1/src/bad_bar1_sup.erl b/apps/rebar/test/rebar_edoc_SUITE_data/bad/apps/bad_bar1/src/bad_bar1_sup.erl similarity index 100% rename from test/rebar_edoc_SUITE_data/bad/apps/bad_bar1/src/bad_bar1_sup.erl rename to apps/rebar/test/rebar_edoc_SUITE_data/bad/apps/bad_bar1/src/bad_bar1_sup.erl diff --git a/test/rebar_edoc_SUITE_data/bad/apps/bad_bar2/src/bad_bar2.app.src b/apps/rebar/test/rebar_edoc_SUITE_data/bad/apps/bad_bar2/src/bad_bar2.app.src similarity index 100% rename from test/rebar_edoc_SUITE_data/bad/apps/bad_bar2/src/bad_bar2.app.src rename to apps/rebar/test/rebar_edoc_SUITE_data/bad/apps/bad_bar2/src/bad_bar2.app.src diff --git a/test/rebar_edoc_SUITE_data/bad/apps/bad_bar2/src/bad_bar2.erl b/apps/rebar/test/rebar_edoc_SUITE_data/bad/apps/bad_bar2/src/bad_bar2.erl similarity index 100% rename from test/rebar_edoc_SUITE_data/bad/apps/bad_bar2/src/bad_bar2.erl rename to apps/rebar/test/rebar_edoc_SUITE_data/bad/apps/bad_bar2/src/bad_bar2.erl diff --git a/test/rebar_edoc_SUITE_data/bad/apps/bad_bar2/src/bad_bar2_app.erl b/apps/rebar/test/rebar_edoc_SUITE_data/bad/apps/bad_bar2/src/bad_bar2_app.erl similarity index 100% rename from test/rebar_edoc_SUITE_data/bad/apps/bad_bar2/src/bad_bar2_app.erl rename to apps/rebar/test/rebar_edoc_SUITE_data/bad/apps/bad_bar2/src/bad_bar2_app.erl diff --git a/test/rebar_edoc_SUITE_data/bad/apps/bad_bar2/src/bad_bar2_sup.erl b/apps/rebar/test/rebar_edoc_SUITE_data/bad/apps/bad_bar2/src/bad_bar2_sup.erl similarity index 100% rename from test/rebar_edoc_SUITE_data/bad/apps/bad_bar2/src/bad_bar2_sup.erl rename to apps/rebar/test/rebar_edoc_SUITE_data/bad/apps/bad_bar2/src/bad_bar2_sup.erl diff --git a/test/rebar_edoc_SUITE_data/bad/apps/bad_foo/src/bad_foo.app.src b/apps/rebar/test/rebar_edoc_SUITE_data/bad/apps/bad_foo/src/bad_foo.app.src similarity index 100% rename from test/rebar_edoc_SUITE_data/bad/apps/bad_foo/src/bad_foo.app.src rename to apps/rebar/test/rebar_edoc_SUITE_data/bad/apps/bad_foo/src/bad_foo.app.src diff --git a/test/rebar_edoc_SUITE_data/bad/apps/bad_foo/src/bad_foo.erl b/apps/rebar/test/rebar_edoc_SUITE_data/bad/apps/bad_foo/src/bad_foo.erl similarity index 100% rename from test/rebar_edoc_SUITE_data/bad/apps/bad_foo/src/bad_foo.erl rename to apps/rebar/test/rebar_edoc_SUITE_data/bad/apps/bad_foo/src/bad_foo.erl diff --git a/test/rebar_edoc_SUITE_data/bad/apps/bad_foo/src/bad_foo_app.erl b/apps/rebar/test/rebar_edoc_SUITE_data/bad/apps/bad_foo/src/bad_foo_app.erl similarity index 100% rename from test/rebar_edoc_SUITE_data/bad/apps/bad_foo/src/bad_foo_app.erl rename to apps/rebar/test/rebar_edoc_SUITE_data/bad/apps/bad_foo/src/bad_foo_app.erl diff --git a/test/rebar_edoc_SUITE_data/bad/apps/bad_foo/src/bad_foo_sup.erl b/apps/rebar/test/rebar_edoc_SUITE_data/bad/apps/bad_foo/src/bad_foo_sup.erl similarity index 100% rename from test/rebar_edoc_SUITE_data/bad/apps/bad_foo/src/bad_foo_sup.erl rename to apps/rebar/test/rebar_edoc_SUITE_data/bad/apps/bad_foo/src/bad_foo_sup.erl diff --git a/test/rebar_edoc_SUITE_data/foo/apps/bar1/src/bar1.app.src b/apps/rebar/test/rebar_edoc_SUITE_data/foo/apps/bar1/src/bar1.app.src similarity index 100% rename from test/rebar_edoc_SUITE_data/foo/apps/bar1/src/bar1.app.src rename to apps/rebar/test/rebar_edoc_SUITE_data/foo/apps/bar1/src/bar1.app.src diff --git a/test/rebar_edoc_SUITE_data/foo/apps/bar1/src/bar1.erl b/apps/rebar/test/rebar_edoc_SUITE_data/foo/apps/bar1/src/bar1.erl similarity index 100% rename from test/rebar_edoc_SUITE_data/foo/apps/bar1/src/bar1.erl rename to apps/rebar/test/rebar_edoc_SUITE_data/foo/apps/bar1/src/bar1.erl diff --git a/test/rebar_edoc_SUITE_data/foo/apps/bar1/src/bar1_app.erl b/apps/rebar/test/rebar_edoc_SUITE_data/foo/apps/bar1/src/bar1_app.erl similarity index 100% rename from test/rebar_edoc_SUITE_data/foo/apps/bar1/src/bar1_app.erl rename to apps/rebar/test/rebar_edoc_SUITE_data/foo/apps/bar1/src/bar1_app.erl diff --git a/test/rebar_edoc_SUITE_data/foo/apps/bar1/src/bar1_sup.erl b/apps/rebar/test/rebar_edoc_SUITE_data/foo/apps/bar1/src/bar1_sup.erl similarity index 100% rename from test/rebar_edoc_SUITE_data/foo/apps/bar1/src/bar1_sup.erl rename to apps/rebar/test/rebar_edoc_SUITE_data/foo/apps/bar1/src/bar1_sup.erl diff --git a/test/rebar_edoc_SUITE_data/foo/apps/bar2/src/bar2.app.src b/apps/rebar/test/rebar_edoc_SUITE_data/foo/apps/bar2/src/bar2.app.src similarity index 100% rename from test/rebar_edoc_SUITE_data/foo/apps/bar2/src/bar2.app.src rename to apps/rebar/test/rebar_edoc_SUITE_data/foo/apps/bar2/src/bar2.app.src diff --git a/test/rebar_edoc_SUITE_data/foo/apps/bar2/src/bar2.erl b/apps/rebar/test/rebar_edoc_SUITE_data/foo/apps/bar2/src/bar2.erl similarity index 100% rename from test/rebar_edoc_SUITE_data/foo/apps/bar2/src/bar2.erl rename to apps/rebar/test/rebar_edoc_SUITE_data/foo/apps/bar2/src/bar2.erl diff --git a/test/rebar_edoc_SUITE_data/foo/apps/bar2/src/bar2_app.erl b/apps/rebar/test/rebar_edoc_SUITE_data/foo/apps/bar2/src/bar2_app.erl similarity index 100% rename from test/rebar_edoc_SUITE_data/foo/apps/bar2/src/bar2_app.erl rename to apps/rebar/test/rebar_edoc_SUITE_data/foo/apps/bar2/src/bar2_app.erl diff --git a/test/rebar_edoc_SUITE_data/foo/apps/bar2/src/bar2_sup.erl b/apps/rebar/test/rebar_edoc_SUITE_data/foo/apps/bar2/src/bar2_sup.erl similarity index 100% rename from test/rebar_edoc_SUITE_data/foo/apps/bar2/src/bar2_sup.erl rename to apps/rebar/test/rebar_edoc_SUITE_data/foo/apps/bar2/src/bar2_sup.erl diff --git a/test/rebar_edoc_SUITE_data/foo/apps/foo/rebar.config b/apps/rebar/test/rebar_edoc_SUITE_data/foo/apps/foo/rebar.config similarity index 100% rename from test/rebar_edoc_SUITE_data/foo/apps/foo/rebar.config rename to apps/rebar/test/rebar_edoc_SUITE_data/foo/apps/foo/rebar.config diff --git a/test/rebar_edoc_SUITE_data/foo/apps/foo/src/foo.app.src b/apps/rebar/test/rebar_edoc_SUITE_data/foo/apps/foo/src/foo.app.src similarity index 100% rename from test/rebar_edoc_SUITE_data/foo/apps/foo/src/foo.app.src rename to apps/rebar/test/rebar_edoc_SUITE_data/foo/apps/foo/src/foo.app.src diff --git a/test/rebar_edoc_SUITE_data/foo/apps/foo/src/foo.erl b/apps/rebar/test/rebar_edoc_SUITE_data/foo/apps/foo/src/foo.erl similarity index 100% rename from test/rebar_edoc_SUITE_data/foo/apps/foo/src/foo.erl rename to apps/rebar/test/rebar_edoc_SUITE_data/foo/apps/foo/src/foo.erl diff --git a/test/rebar_edoc_SUITE_data/foo/apps/foo/src/foo_app.erl b/apps/rebar/test/rebar_edoc_SUITE_data/foo/apps/foo/src/foo_app.erl similarity index 100% rename from test/rebar_edoc_SUITE_data/foo/apps/foo/src/foo_app.erl rename to apps/rebar/test/rebar_edoc_SUITE_data/foo/apps/foo/src/foo_app.erl diff --git a/test/rebar_edoc_SUITE_data/foo/apps/foo/src/foo_sup.erl b/apps/rebar/test/rebar_edoc_SUITE_data/foo/apps/foo/src/foo_sup.erl similarity index 100% rename from test/rebar_edoc_SUITE_data/foo/apps/foo/src/foo_sup.erl rename to apps/rebar/test/rebar_edoc_SUITE_data/foo/apps/foo/src/foo_sup.erl diff --git a/test/rebar_edoc_SUITE_data/foo/rebar.config b/apps/rebar/test/rebar_edoc_SUITE_data/foo/rebar.config similarity index 100% rename from test/rebar_edoc_SUITE_data/foo/rebar.config rename to apps/rebar/test/rebar_edoc_SUITE_data/foo/rebar.config diff --git a/test/rebar_escriptize_SUITE.erl b/apps/rebar/test/rebar_escriptize_SUITE.erl similarity index 100% rename from test/rebar_escriptize_SUITE.erl rename to apps/rebar/test/rebar_escriptize_SUITE.erl diff --git a/test/rebar_eunit_SUITE.erl b/apps/rebar/test/rebar_eunit_SUITE.erl similarity index 100% rename from test/rebar_eunit_SUITE.erl rename to apps/rebar/test/rebar_eunit_SUITE.erl diff --git a/test/rebar_eunit_SUITE_data/basic_app.zip b/apps/rebar/test/rebar_eunit_SUITE_data/basic_app.zip similarity index 100% rename from test/rebar_eunit_SUITE_data/basic_app.zip rename to apps/rebar/test/rebar_eunit_SUITE_data/basic_app.zip diff --git a/test/rebar_eunit_SUITE_data/deflate b/apps/rebar/test/rebar_eunit_SUITE_data/deflate similarity index 100% rename from test/rebar_eunit_SUITE_data/deflate rename to apps/rebar/test/rebar_eunit_SUITE_data/deflate diff --git a/test/rebar_eunit_SUITE_data/inflate b/apps/rebar/test/rebar_eunit_SUITE_data/inflate similarity index 100% rename from test/rebar_eunit_SUITE_data/inflate rename to apps/rebar/test/rebar_eunit_SUITE_data/inflate diff --git a/test/rebar_eunit_SUITE_data/multi_app.zip b/apps/rebar/test/rebar_eunit_SUITE_data/multi_app.zip similarity index 100% rename from test/rebar_eunit_SUITE_data/multi_app.zip rename to apps/rebar/test/rebar_eunit_SUITE_data/multi_app.zip diff --git a/test/rebar_eunit_SUITE_data/syscfg_app.zip b/apps/rebar/test/rebar_eunit_SUITE_data/syscfg_app.zip similarity index 100% rename from test/rebar_eunit_SUITE_data/syscfg_app.zip rename to apps/rebar/test/rebar_eunit_SUITE_data/syscfg_app.zip diff --git a/test/rebar_file_utils_SUITE.erl b/apps/rebar/test/rebar_file_utils_SUITE.erl similarity index 100% rename from test/rebar_file_utils_SUITE.erl rename to apps/rebar/test/rebar_file_utils_SUITE.erl diff --git a/test/rebar_hooks_SUITE.erl b/apps/rebar/test/rebar_hooks_SUITE.erl similarity index 100% rename from test/rebar_hooks_SUITE.erl rename to apps/rebar/test/rebar_hooks_SUITE.erl diff --git a/test/rebar_install_deps_SUITE.erl b/apps/rebar/test/rebar_install_deps_SUITE.erl similarity index 100% rename from test/rebar_install_deps_SUITE.erl rename to apps/rebar/test/rebar_install_deps_SUITE.erl diff --git a/test/rebar_localfs_resource.erl b/apps/rebar/test/rebar_localfs_resource.erl similarity index 100% rename from test/rebar_localfs_resource.erl rename to apps/rebar/test/rebar_localfs_resource.erl diff --git a/test/rebar_localfs_resource_v2.erl b/apps/rebar/test/rebar_localfs_resource_v2.erl similarity index 100% rename from test/rebar_localfs_resource_v2.erl rename to apps/rebar/test/rebar_localfs_resource_v2.erl diff --git a/test/rebar_lock_SUITE.erl b/apps/rebar/test/rebar_lock_SUITE.erl similarity index 100% rename from test/rebar_lock_SUITE.erl rename to apps/rebar/test/rebar_lock_SUITE.erl diff --git a/test/rebar_namespace_SUITE.erl b/apps/rebar/test/rebar_namespace_SUITE.erl similarity index 100% rename from test/rebar_namespace_SUITE.erl rename to apps/rebar/test/rebar_namespace_SUITE.erl diff --git a/test/rebar_new_SUITE.erl b/apps/rebar/test/rebar_new_SUITE.erl similarity index 100% rename from test/rebar_new_SUITE.erl rename to apps/rebar/test/rebar_new_SUITE.erl diff --git a/test/rebar_new_SUITE_data/.rebar3/templates/app/LICENSE.dtl b/apps/rebar/test/rebar_new_SUITE_data/.rebar3/templates/app/LICENSE.dtl similarity index 100% rename from test/rebar_new_SUITE_data/.rebar3/templates/app/LICENSE.dtl rename to apps/rebar/test/rebar_new_SUITE_data/.rebar3/templates/app/LICENSE.dtl diff --git a/test/rebar_new_SUITE_data/.rebar3/templates/app/README.md.dtl b/apps/rebar/test/rebar_new_SUITE_data/.rebar3/templates/app/README.md.dtl similarity index 100% rename from test/rebar_new_SUITE_data/.rebar3/templates/app/README.md.dtl rename to apps/rebar/test/rebar_new_SUITE_data/.rebar3/templates/app/README.md.dtl diff --git a/test/rebar_new_SUITE_data/.rebar3/templates/app/app.erl.dtl b/apps/rebar/test/rebar_new_SUITE_data/.rebar3/templates/app/app.erl.dtl similarity index 100% rename from test/rebar_new_SUITE_data/.rebar3/templates/app/app.erl.dtl rename to apps/rebar/test/rebar_new_SUITE_data/.rebar3/templates/app/app.erl.dtl diff --git a/test/rebar_new_SUITE_data/.rebar3/templates/app/gitignore.dtl b/apps/rebar/test/rebar_new_SUITE_data/.rebar3/templates/app/gitignore.dtl similarity index 100% rename from test/rebar_new_SUITE_data/.rebar3/templates/app/gitignore.dtl rename to apps/rebar/test/rebar_new_SUITE_data/.rebar3/templates/app/gitignore.dtl diff --git a/test/rebar_new_SUITE_data/.rebar3/templates/app/otp_app.app.src.dtl b/apps/rebar/test/rebar_new_SUITE_data/.rebar3/templates/app/otp_app.app.src.dtl similarity index 100% rename from test/rebar_new_SUITE_data/.rebar3/templates/app/otp_app.app.src.dtl rename to apps/rebar/test/rebar_new_SUITE_data/.rebar3/templates/app/otp_app.app.src.dtl diff --git a/test/rebar_new_SUITE_data/.rebar3/templates/app/rebar.config.dtl b/apps/rebar/test/rebar_new_SUITE_data/.rebar3/templates/app/rebar.config.dtl similarity index 100% rename from test/rebar_new_SUITE_data/.rebar3/templates/app/rebar.config.dtl rename to apps/rebar/test/rebar_new_SUITE_data/.rebar3/templates/app/rebar.config.dtl diff --git a/test/rebar_new_SUITE_data/.rebar3/templates/app/sup.erl.dtl b/apps/rebar/test/rebar_new_SUITE_data/.rebar3/templates/app/sup.erl.dtl similarity index 100% rename from test/rebar_new_SUITE_data/.rebar3/templates/app/sup.erl.dtl rename to apps/rebar/test/rebar_new_SUITE_data/.rebar3/templates/app/sup.erl.dtl diff --git a/test/rebar_new_SUITE_data/.rebar3/templates/app/test_app.template b/apps/rebar/test/rebar_new_SUITE_data/.rebar3/templates/app/test_app.template similarity index 100% rename from test/rebar_new_SUITE_data/.rebar3/templates/app/test_app.template rename to apps/rebar/test/rebar_new_SUITE_data/.rebar3/templates/app/test_app.template diff --git a/test/rebar_new_SUITE_data/.rebar3/templates/bad_index/LICENSE.dtl b/apps/rebar/test/rebar_new_SUITE_data/.rebar3/templates/bad_index/LICENSE.dtl similarity index 100% rename from test/rebar_new_SUITE_data/.rebar3/templates/bad_index/LICENSE.dtl rename to apps/rebar/test/rebar_new_SUITE_data/.rebar3/templates/bad_index/LICENSE.dtl diff --git a/test/rebar_new_SUITE_data/.rebar3/templates/bad_index/README.md.dtl b/apps/rebar/test/rebar_new_SUITE_data/.rebar3/templates/bad_index/README.md.dtl similarity index 100% rename from test/rebar_new_SUITE_data/.rebar3/templates/bad_index/README.md.dtl rename to apps/rebar/test/rebar_new_SUITE_data/.rebar3/templates/bad_index/README.md.dtl diff --git a/test/rebar_new_SUITE_data/.rebar3/templates/bad_index/app.erl.dtl b/apps/rebar/test/rebar_new_SUITE_data/.rebar3/templates/bad_index/app.erl.dtl similarity index 100% rename from test/rebar_new_SUITE_data/.rebar3/templates/bad_index/app.erl.dtl rename to apps/rebar/test/rebar_new_SUITE_data/.rebar3/templates/bad_index/app.erl.dtl diff --git a/test/rebar_new_SUITE_data/.rebar3/templates/bad_index/bad_index.template b/apps/rebar/test/rebar_new_SUITE_data/.rebar3/templates/bad_index/bad_index.template similarity index 100% rename from test/rebar_new_SUITE_data/.rebar3/templates/bad_index/bad_index.template rename to apps/rebar/test/rebar_new_SUITE_data/.rebar3/templates/bad_index/bad_index.template diff --git a/test/rebar_new_SUITE_data/.rebar3/templates/bad_index/gitignore.dtl b/apps/rebar/test/rebar_new_SUITE_data/.rebar3/templates/bad_index/gitignore.dtl similarity index 100% rename from test/rebar_new_SUITE_data/.rebar3/templates/bad_index/gitignore.dtl rename to apps/rebar/test/rebar_new_SUITE_data/.rebar3/templates/bad_index/gitignore.dtl diff --git a/test/rebar_new_SUITE_data/.rebar3/templates/bad_index/otp_app.app.src.dtl b/apps/rebar/test/rebar_new_SUITE_data/.rebar3/templates/bad_index/otp_app.app.src.dtl similarity index 100% rename from test/rebar_new_SUITE_data/.rebar3/templates/bad_index/otp_app.app.src.dtl rename to apps/rebar/test/rebar_new_SUITE_data/.rebar3/templates/bad_index/otp_app.app.src.dtl diff --git a/test/rebar_new_SUITE_data/.rebar3/templates/bad_index/rebar.config.dtl b/apps/rebar/test/rebar_new_SUITE_data/.rebar3/templates/bad_index/rebar.config.dtl similarity index 100% rename from test/rebar_new_SUITE_data/.rebar3/templates/bad_index/rebar.config.dtl rename to apps/rebar/test/rebar_new_SUITE_data/.rebar3/templates/bad_index/rebar.config.dtl diff --git a/test/rebar_new_SUITE_data/.rebar3/templates/bad_index/sup.erl.dtl b/apps/rebar/test/rebar_new_SUITE_data/.rebar3/templates/bad_index/sup.erl.dtl similarity index 100% rename from test/rebar_new_SUITE_data/.rebar3/templates/bad_index/sup.erl.dtl rename to apps/rebar/test/rebar_new_SUITE_data/.rebar3/templates/bad_index/sup.erl.dtl diff --git a/test/rebar_new_SUITE_data/plugin_tpl/_checkouts/tpl/.gitignore b/apps/rebar/test/rebar_new_SUITE_data/plugin_tpl/_checkouts/tpl/.gitignore similarity index 100% rename from test/rebar_new_SUITE_data/plugin_tpl/_checkouts/tpl/.gitignore rename to apps/rebar/test/rebar_new_SUITE_data/plugin_tpl/_checkouts/tpl/.gitignore diff --git a/test/rebar_new_SUITE_data/plugin_tpl/_checkouts/tpl/priv/module.erl.dtl b/apps/rebar/test/rebar_new_SUITE_data/plugin_tpl/_checkouts/tpl/priv/module.erl.dtl similarity index 100% rename from test/rebar_new_SUITE_data/plugin_tpl/_checkouts/tpl/priv/module.erl.dtl rename to apps/rebar/test/rebar_new_SUITE_data/plugin_tpl/_checkouts/tpl/priv/module.erl.dtl diff --git a/test/rebar_new_SUITE_data/plugin_tpl/_checkouts/tpl/priv/tpl.template b/apps/rebar/test/rebar_new_SUITE_data/plugin_tpl/_checkouts/tpl/priv/tpl.template similarity index 100% rename from test/rebar_new_SUITE_data/plugin_tpl/_checkouts/tpl/priv/tpl.template rename to apps/rebar/test/rebar_new_SUITE_data/plugin_tpl/_checkouts/tpl/priv/tpl.template diff --git a/test/rebar_new_SUITE_data/plugin_tpl/_checkouts/tpl/rebar.config b/apps/rebar/test/rebar_new_SUITE_data/plugin_tpl/_checkouts/tpl/rebar.config similarity index 100% rename from test/rebar_new_SUITE_data/plugin_tpl/_checkouts/tpl/rebar.config rename to apps/rebar/test/rebar_new_SUITE_data/plugin_tpl/_checkouts/tpl/rebar.config diff --git a/test/rebar_new_SUITE_data/plugin_tpl/_checkouts/tpl/src/tpl.app.src b/apps/rebar/test/rebar_new_SUITE_data/plugin_tpl/_checkouts/tpl/src/tpl.app.src similarity index 100% rename from test/rebar_new_SUITE_data/plugin_tpl/_checkouts/tpl/src/tpl.app.src rename to apps/rebar/test/rebar_new_SUITE_data/plugin_tpl/_checkouts/tpl/src/tpl.app.src diff --git a/test/rebar_new_SUITE_data/plugin_tpl/_checkouts/tpl/src/tpl.erl b/apps/rebar/test/rebar_new_SUITE_data/plugin_tpl/_checkouts/tpl/src/tpl.erl similarity index 100% rename from test/rebar_new_SUITE_data/plugin_tpl/_checkouts/tpl/src/tpl.erl rename to apps/rebar/test/rebar_new_SUITE_data/plugin_tpl/_checkouts/tpl/src/tpl.erl diff --git a/test/rebar_new_SUITE_data/plugin_tpl/_checkouts/tpl/src/tpl_prv.erl b/apps/rebar/test/rebar_new_SUITE_data/plugin_tpl/_checkouts/tpl/src/tpl_prv.erl similarity index 100% rename from test/rebar_new_SUITE_data/plugin_tpl/_checkouts/tpl/src/tpl_prv.erl rename to apps/rebar/test/rebar_new_SUITE_data/plugin_tpl/_checkouts/tpl/src/tpl_prv.erl diff --git a/test/rebar_new_SUITE_data/plugin_tpl/rebar.config b/apps/rebar/test/rebar_new_SUITE_data/plugin_tpl/rebar.config similarity index 100% rename from test/rebar_new_SUITE_data/plugin_tpl/rebar.config rename to apps/rebar/test/rebar_new_SUITE_data/plugin_tpl/rebar.config diff --git a/test/rebar_new_SUITE_data/plugin_tpl/src/plugin_tpl.app.src b/apps/rebar/test/rebar_new_SUITE_data/plugin_tpl/src/plugin_tpl.app.src similarity index 100% rename from test/rebar_new_SUITE_data/plugin_tpl/src/plugin_tpl.app.src rename to apps/rebar/test/rebar_new_SUITE_data/plugin_tpl/src/plugin_tpl.app.src diff --git a/test/rebar_new_SUITE_data/plugin_tpl/src/plugin_tpl.erl b/apps/rebar/test/rebar_new_SUITE_data/plugin_tpl/src/plugin_tpl.erl similarity index 100% rename from test/rebar_new_SUITE_data/plugin_tpl/src/plugin_tpl.erl rename to apps/rebar/test/rebar_new_SUITE_data/plugin_tpl/src/plugin_tpl.erl diff --git a/test/rebar_opts_parser_SUITE.erl b/apps/rebar/test/rebar_opts_parser_SUITE.erl similarity index 100% rename from test/rebar_opts_parser_SUITE.erl rename to apps/rebar/test/rebar_opts_parser_SUITE.erl diff --git a/test/rebar_paths_SUITE.erl b/apps/rebar/test/rebar_paths_SUITE.erl similarity index 100% rename from test/rebar_paths_SUITE.erl rename to apps/rebar/test/rebar_paths_SUITE.erl diff --git a/test/rebar_pkg_SUITE.erl b/apps/rebar/test/rebar_pkg_SUITE.erl similarity index 100% rename from test/rebar_pkg_SUITE.erl rename to apps/rebar/test/rebar_pkg_SUITE.erl diff --git a/test/rebar_pkg_SUITE_data/badindexchk-1.0.0.tar b/apps/rebar/test/rebar_pkg_SUITE_data/badindexchk-1.0.0.tar similarity index 100% rename from test/rebar_pkg_SUITE_data/badindexchk-1.0.0.tar rename to apps/rebar/test/rebar_pkg_SUITE_data/badindexchk-1.0.0.tar diff --git a/test/rebar_pkg_SUITE_data/badpkg-1.0.0.tar b/apps/rebar/test/rebar_pkg_SUITE_data/badpkg-1.0.0.tar similarity index 100% rename from test/rebar_pkg_SUITE_data/badpkg-1.0.0.tar rename to apps/rebar/test/rebar_pkg_SUITE_data/badpkg-1.0.0.tar diff --git a/test/rebar_pkg_SUITE_data/goodpkg-1.0.0.tar b/apps/rebar/test/rebar_pkg_SUITE_data/goodpkg-1.0.0.tar similarity index 100% rename from test/rebar_pkg_SUITE_data/goodpkg-1.0.0.tar rename to apps/rebar/test/rebar_pkg_SUITE_data/goodpkg-1.0.0.tar diff --git a/test/rebar_pkg_alias_SUITE.erl b/apps/rebar/test/rebar_pkg_alias_SUITE.erl similarity index 100% rename from test/rebar_pkg_alias_SUITE.erl rename to apps/rebar/test/rebar_pkg_alias_SUITE.erl diff --git a/test/rebar_pkg_repos_SUITE.erl b/apps/rebar/test/rebar_pkg_repos_SUITE.erl similarity index 100% rename from test/rebar_pkg_repos_SUITE.erl rename to apps/rebar/test/rebar_pkg_repos_SUITE.erl diff --git a/test/rebar_plugins_SUITE.erl b/apps/rebar/test/rebar_plugins_SUITE.erl similarity index 100% rename from test/rebar_plugins_SUITE.erl rename to apps/rebar/test/rebar_plugins_SUITE.erl diff --git a/test/rebar_profiles_SUITE.erl b/apps/rebar/test/rebar_profiles_SUITE.erl similarity index 100% rename from test/rebar_profiles_SUITE.erl rename to apps/rebar/test/rebar_profiles_SUITE.erl diff --git a/test/rebar_release_SUITE.erl b/apps/rebar/test/rebar_release_SUITE.erl similarity index 100% rename from test/rebar_release_SUITE.erl rename to apps/rebar/test/rebar_release_SUITE.erl diff --git a/test/rebar_resource_SUITE.erl b/apps/rebar/test/rebar_resource_SUITE.erl similarity index 100% rename from test/rebar_resource_SUITE.erl rename to apps/rebar/test/rebar_resource_SUITE.erl diff --git a/test/rebar_src_dirs_SUITE.erl b/apps/rebar/test/rebar_src_dirs_SUITE.erl similarity index 100% rename from test/rebar_src_dirs_SUITE.erl rename to apps/rebar/test/rebar_src_dirs_SUITE.erl diff --git a/test/rebar_templater_SUITE.erl b/apps/rebar/test/rebar_templater_SUITE.erl similarity index 100% rename from test/rebar_templater_SUITE.erl rename to apps/rebar/test/rebar_templater_SUITE.erl diff --git a/test/rebar_test_utils.erl b/apps/rebar/test/rebar_test_utils.erl similarity index 100% rename from test/rebar_test_utils.erl rename to apps/rebar/test/rebar_test_utils.erl diff --git a/test/rebar_unlock_SUITE.erl b/apps/rebar/test/rebar_unlock_SUITE.erl similarity index 100% rename from test/rebar_unlock_SUITE.erl rename to apps/rebar/test/rebar_unlock_SUITE.erl diff --git a/test/rebar_unlock_SUITE_data/pkg.rebar.lock b/apps/rebar/test/rebar_unlock_SUITE_data/pkg.rebar.lock similarity index 100% rename from test/rebar_unlock_SUITE_data/pkg.rebar.lock rename to apps/rebar/test/rebar_unlock_SUITE_data/pkg.rebar.lock diff --git a/test/rebar_unlock_SUITE_data/rebar.lock b/apps/rebar/test/rebar_unlock_SUITE_data/rebar.lock similarity index 100% rename from test/rebar_unlock_SUITE_data/rebar.lock rename to apps/rebar/test/rebar_unlock_SUITE_data/rebar.lock diff --git a/test/rebar_upgrade_SUITE.erl b/apps/rebar/test/rebar_upgrade_SUITE.erl similarity index 100% rename from test/rebar_upgrade_SUITE.erl rename to apps/rebar/test/rebar_upgrade_SUITE.erl diff --git a/test/rebar_uri_SUITE.erl b/apps/rebar/test/rebar_uri_SUITE.erl similarity index 100% rename from test/rebar_uri_SUITE.erl rename to apps/rebar/test/rebar_uri_SUITE.erl diff --git a/test/rebar_utils_SUITE.erl b/apps/rebar/test/rebar_utils_SUITE.erl similarity index 100% rename from test/rebar_utils_SUITE.erl rename to apps/rebar/test/rebar_utils_SUITE.erl diff --git a/test/rebar_xref_SUITE.erl b/apps/rebar/test/rebar_xref_SUITE.erl similarity index 100% rename from test/rebar_xref_SUITE.erl rename to apps/rebar/test/rebar_xref_SUITE.erl diff --git a/test/rebar_xref_SUITE_data/recursive/apps/rebar_issue1/rebar.config b/apps/rebar/test/rebar_xref_SUITE_data/recursive/apps/rebar_issue1/rebar.config similarity index 100% rename from test/rebar_xref_SUITE_data/recursive/apps/rebar_issue1/rebar.config rename to apps/rebar/test/rebar_xref_SUITE_data/recursive/apps/rebar_issue1/rebar.config diff --git a/test/rebar_xref_SUITE_data/recursive/apps/rebar_issue1/src/rebar_issue1.app.src b/apps/rebar/test/rebar_xref_SUITE_data/recursive/apps/rebar_issue1/src/rebar_issue1.app.src similarity index 100% rename from test/rebar_xref_SUITE_data/recursive/apps/rebar_issue1/src/rebar_issue1.app.src rename to apps/rebar/test/rebar_xref_SUITE_data/recursive/apps/rebar_issue1/src/rebar_issue1.app.src diff --git a/test/rebar_xref_SUITE_data/recursive/apps/rebar_issue1/src/rebar_issue1_app.erl b/apps/rebar/test/rebar_xref_SUITE_data/recursive/apps/rebar_issue1/src/rebar_issue1_app.erl similarity index 100% rename from test/rebar_xref_SUITE_data/recursive/apps/rebar_issue1/src/rebar_issue1_app.erl rename to apps/rebar/test/rebar_xref_SUITE_data/recursive/apps/rebar_issue1/src/rebar_issue1_app.erl diff --git a/test/rebar_xref_SUITE_data/recursive/apps/rebar_issue1/src/rebar_issue1_sup.erl b/apps/rebar/test/rebar_xref_SUITE_data/recursive/apps/rebar_issue1/src/rebar_issue1_sup.erl similarity index 100% rename from test/rebar_xref_SUITE_data/recursive/apps/rebar_issue1/src/rebar_issue1_sup.erl rename to apps/rebar/test/rebar_xref_SUITE_data/recursive/apps/rebar_issue1/src/rebar_issue1_sup.erl diff --git a/test/rebar_xref_SUITE_data/recursive/apps/rebar_issue2/src/rebar_issue2.app.src b/apps/rebar/test/rebar_xref_SUITE_data/recursive/apps/rebar_issue2/src/rebar_issue2.app.src similarity index 100% rename from test/rebar_xref_SUITE_data/recursive/apps/rebar_issue2/src/rebar_issue2.app.src rename to apps/rebar/test/rebar_xref_SUITE_data/recursive/apps/rebar_issue2/src/rebar_issue2.app.src diff --git a/test/rebar_xref_SUITE_data/recursive/apps/rebar_issue2/src/rebar_issue2_app.erl b/apps/rebar/test/rebar_xref_SUITE_data/recursive/apps/rebar_issue2/src/rebar_issue2_app.erl similarity index 100% rename from test/rebar_xref_SUITE_data/recursive/apps/rebar_issue2/src/rebar_issue2_app.erl rename to apps/rebar/test/rebar_xref_SUITE_data/recursive/apps/rebar_issue2/src/rebar_issue2_app.erl diff --git a/test/rebar_xref_SUITE_data/recursive/apps/rebar_issue2/src/rebar_issue2_sup.erl b/apps/rebar/test/rebar_xref_SUITE_data/recursive/apps/rebar_issue2/src/rebar_issue2_sup.erl similarity index 100% rename from test/rebar_xref_SUITE_data/recursive/apps/rebar_issue2/src/rebar_issue2_sup.erl rename to apps/rebar/test/rebar_xref_SUITE_data/recursive/apps/rebar_issue2/src/rebar_issue2_sup.erl diff --git a/bootstrap b/bootstrap index a382fe6d..98e48348 100755 --- a/bootstrap +++ b/bootstrap @@ -194,8 +194,8 @@ maybe_set_ipfamily(_, _Family) -> ok. compile_vendored() -> - compile_xrl_file("src/vendored/r3_safe_erl_term.xrl"), - Sources = filelib:wildcard(filename:join(["src/vendored", "*.erl"])), + compile_xrl_file("apps/rebar/src/vendored/r3_safe_erl_term.xrl"), + Sources = filelib:wildcard(filename:join(["apps/rebar/src/vendored", "*.erl"])), OutDir = filename:absname("_build/bootstrap/lib/rebar/ebin"), code:add_patha(OutDir), Opts = [debug_info,{outdir, OutDir}, return | additional_defines()], @@ -242,10 +242,11 @@ compile_erl_file(File, Opts) -> bootstrap_rebar3() -> filelib:ensure_dir("_build/default/lib/rebar/ebin/dummy.beam"), code:add_path("_build/default/lib/rebar/ebin/"), - Res = symlink_or_copy(filename:absname("src"), + Res = symlink_or_copy(filename:absname("apps/rebar/src"), filename:absname("_build/default/lib/rebar/src")), true = Res == ok orelse Res == exists, - Sources = ["src/rebar_resource_v2.erl", "src/rebar_resource.erl" | filelib:wildcard("src/*.erl") ], + Sources = ["apps/rebar/src/rebar_resource_v2.erl", "apps/rebar/src/rebar_resource.erl" + | filelib:wildcard("apps/rebar/src/*.erl") ], [compile_erl_file(X, [{outdir, "_build/default/lib/rebar/ebin/"} ,return | additional_defines()]) || X <- Sources], code:add_patha(filename:absname("_build/default/lib/rebar/ebin")). @@ -641,12 +642,12 @@ get_deps() -> %% Something went wrong in a previous build, lock file shouldn't be empty io:format("Empty list in lock file, deleting rebar.lock~n"), ok = file:delete("rebar.lock"), - {ok, Config} = file:consult("rebar.config"), + {ok, Config} = file:consult("apps/rebar/rebar.config"), proplists:get_value(deps, Config); {ok, [Deps]} -> [{binary_to_atom(Name, utf8), "", Source} || {Name, Source, _Level} <- Deps]; _ -> - {ok, Config} = file:consult("rebar.config"), + {ok, Config} = file:consult("apps/rebar/rebar.config"), proplists:get_value(deps, Config) end. diff --git a/rebar.config b/rebar.config index cef57822..b12dd10b 100644 --- a/rebar.config +++ b/rebar.config @@ -1,26 +1,8 @@ %% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*- %% ex: ts=4 sw=4 ft=erlang et -{deps, [{erlware_commons, "1.5.0"}, - {ssl_verify_fun, "1.1.6"}, - {certifi, "2.9.0"}, - {providers, "1.9.0"}, - {getopt, "1.0.1"}, - {bbmustache, "1.12.2"}, - {relx, "4.7.0"}, - {cf, "0.3.1"}, - {cth_readable, "1.5.1"}, - {eunit_formatters, "0.5.0"}]}. - -{post_hooks, [{"(linux|darwin|solaris|freebsd|netbsd|openbsd)", - escriptize, - "cp \"$REBAR_BUILD_DIR/bin/rebar3\" ./rebar3"}, - {"win32", - escriptize, - "robocopy \"%REBAR_BUILD_DIR%/bin/\" ./ rebar3* " - "/njs /njh /nfl /ndl & exit /b 0"} % silence things - ]}. - +%% The rest of the config is in apps/rebar/ +{escript_main_app, rebar}. {escript_name, rebar3}. {escript_wrappers_windows, ["cmd", "powershell"]}. {escript_comment, "%%Rebar3 3.19.0\n"}. @@ -30,65 +12,8 @@ {escript_incl_priv, [{relx, "templates/*"}, {rebar, "templates/*"}]}. -{overrides, [{add, relx, [{erl_opts, [{d, 'RLX_LOG', rebar_log}]}]}]}. - -{erl_opts, [warnings_as_errors, - {platform_define, "^(2[1-9])|(20\\\\.3)", filelib_find_source}, - {platform_define, "^(1|(20))", no_customize_hostname_check}, - {platform_define, "^(20)", fun_stacktrace} - ]}. - -{edoc_opts, [preprocess]}. - -%% Use OTP 23+ when dialyzing rebar3 -{dialyzer, [ - {warnings, [unknown]}, - {plt_extra_apps, [parsetools, public_key]} -]}. - -%% Keep only the logs of the last 5 runs -{ct_opts, [{keep_logs, 5}]}. - -%% Profiles -{profiles, [{test, [ - {deps, [{meck, "0.8.13"}]}, - {erl_opts, [debug_info, nowarn_export_all]} - ] - }, - {systest, [ +{ profiles, [{systest, [ {erl_opts, [debug_info, nowarn_export_all]}, {ct_opts, [{dir, "systest"}]} - ]}, - - {dialyzer, [ - {erl_opts, [debug_info, nowarn_export_all]} - ]}, - - {bootstrap, []}, - - {prod, [ - {erl_opts, [no_debug_info]}, - {overrides, [ - {override, erlware_commons, [ - {erl_opts, [{platform_define, "^[0-9]+", namespaced_types}, - {platform_define, "^R1[4|5]", deprecated_crypto}, - {platform_define, "^((1[8|9])|2)", rand_module}, - {platform_define, "^2", unicode_str}, - {platform_define, "^(R|1|20)", fun_stacktrace}, - no_debug_info, - warnings_as_errors]}, - {deps, []}, {plugins, []}]}, - {add, ssl_verify_hostname, [{erl_opts, [no_debug_info]}]}, - {add, certifi, [{erl_opts, [no_debug_info]}]}, - {add, cf, [{erl_opts, [no_debug_info]}]}, - {add, cth_readable, [{erl_opts, [no_debug_info]}]}, - {add, eunit_formatters, [{erl_opts, [no_debug_info]}]}, - {override, bbmustache, [ - {erl_opts, [no_debug_info, {platform_define, "^[0-9]+", namespaced_types}]}, - {deps, []}, {plugins, []}]}, - {add, getopt, [{erl_opts, [no_debug_info]}]}, - {add, providers, [{erl_opts, [no_debug_info]}]}, - {add, relx, [{erl_opts, [no_debug_info]}]}]} ]} - ]}. - +]}. diff --git a/systest/all_SUITE.erl b/systest/all_SUITE.erl index 083fae9b..77471ef8 100644 --- a/systest/all_SUITE.erl +++ b/systest/all_SUITE.erl @@ -72,10 +72,10 @@ grisp_explode() -> [{doc, "Don't force purge a plugin that runs the compile job itself"}]. grisp_explode(Config) -> %% When the purge handling is wrong, the run fails violently. - {error, {_,Output}} = rebar3("grisp deploy -n robot -v 0.1.0", Config), + {error, {_,Output}} = rebar3("grisp deploy -n mygrispproject -v 0.1.0", Config), ct:pal("Rebar3 Output:~n~s",[Output]), ?assertNotEqual(nomatch, - re:run(Output, "No releases exist in the system for robot:0.1.0!") + re:run(Output, "No releases exist in the system for mygrispproject:0.1.0!") ), ok. diff --git a/systest/all_SUITE_data/grisp_explode/rebar.config b/systest/all_SUITE_data/grisp_explode/rebar.config index 43c9f635..a4e15d49 100644 --- a/systest/all_SUITE_data/grisp_explode/rebar.config +++ b/systest/all_SUITE_data/grisp_explode/rebar.config @@ -1,11 +1,11 @@ {deps, [grisp]}. -{plugins, [{rebar3_grisp, "0.1.0"}]}. +{plugins, [{rebar3_grisp, "2.3.0"}]}. {erl_opts, [debug_info]}. {grisp, [ - {otp_release, "19"}, + {otp, [{version, "23.0"}]}, {deploy, [ {destination, "/path/to/SD-card"} ]} diff --git a/vendor_hex_core.sh b/vendor_hex_core.sh index be6db99e..a031cc5d 100755 --- a/vendor_hex_core.sh +++ b/vendor_hex_core.sh @@ -6,7 +6,7 @@ if [[ -z "$1" ]]; then exit 1 fi -REBAR3_TOP=$(pwd) +REBAR3_TOP=$(pwd)/apps/rebar export REBAR3_TOP pushd "$1" touch proto/* # force re-generation of protobuf elements