LoginSignup
4
4

More than 5 years have passed since last update.

rebar3でutility用のdepsを追加する

Posted at

rebar3でutility用のdepsを追加する

rebar.configにedown, reloader, meckなどtestでないしは開発用で使うライブラリを登録するケースがあると思う.
その方法について, 最近tsloughter氏に「こうしてくれ」とご指摘頂いたので, 紹介する.

profilesを使用する

{profiles, [{test, [{deps,
                     [
                      {meck,             ".*", {git, "git://github.com/eproxus/meck.git",            {tag, "0.8.2"}}},
                      {eunit_formatters, ".*", {git, "git://github.com/seancribbs/eunit_formatters", {branch, "master"}}}
                     ]}
                   ]},
            {dev, [{deps,
                    [
                     {reloader, ".*", {git, "git://github.com/mykook/reloader.git", {branch, "master"}}},
                     {edown,    ".*", {git, "git://github.com/uwiger/edown.git",    {branch, "master"}}}
                    ]}
                  ]}
           ]}.

こうしておくことで, ライブラリを使用される際に不要なライブラリを取得しないで済むようになる.

なお, testに関してはrebar3 eunit rebar3 ctを実行した際に取得され, devrebar3 as dev * (rebar3 as dev compileなど)を実行した際に取得される.

詳細は下記ドキュメントを参照して欲しい.
http://www.rebar3.org/v3.0/docs/profiles

4
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4