diff options
author | Tristan Sloughter <t@crashfast.com> | 2014-11-01 10:21:46 -0500 |
---|---|---|
committer | Tristan Sloughter <t@crashfast.com> | 2014-11-01 10:21:46 -0500 |
commit | 6c1201f1ace6870adb5547a8e4f2fb1f22106cc2 (patch) | |
tree | 435fc22f1c90a773b706754bca3ac7c794daacc6 /src/rebar_resource.erl | |
parent | ef1df1222dbed3d219159efdb2d7abfb5974d344 (diff) |
dynamicly find module for fullfilling dependency
Diffstat (limited to 'src/rebar_resource.erl')
-rw-r--r-- | src/rebar_resource.erl | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/rebar_resource.erl b/src/rebar_resource.erl index 7e79356..17db13b 100644 --- a/src/rebar_resource.erl +++ b/src/rebar_resource.erl @@ -4,6 +4,16 @@ -export([]). +-export_types([resource/0 + ,type/0 + ,location/0 + ,ref/0]). + +-type resource() :: {type(), location(), ref()}. +-type type() :: atom(). +-type location() :: string(). +-type ref() :: any(). + -ifdef(have_callback_support). %% In the case where R14 or lower is being used to compile the system @@ -19,7 +29,8 @@ behaviour_info(_) -> -else. --callback lock(string(), tuple()) -> ok. --callback download(string(), tuple()) -> ok. +-callback lock(file:filename_all(), tuple()) -> rebar_resource:resource(). +-callback download(file:filename_all(), tuple()) -> + {tarball, file:filename_all()} | {ok, any()} | {error, any()}. -endif. |