summaryrefslogtreecommitdiff
path: root/src/rebar_app_info.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/rebar_app_info.erl')
-rw-r--r--src/rebar_app_info.erl11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/rebar_app_info.erl b/src/rebar_app_info.erl
index 3854ea7..4fdb14c 100644
--- a/src/rebar_app_info.erl
+++ b/src/rebar_app_info.erl
@@ -30,6 +30,8 @@
dir/2,
source/1,
source/2,
+ state/1,
+ state/2,
valid/1,
valid/2]).
@@ -47,6 +49,7 @@
dep_level=0 :: integer(),
dir :: file:name(),
source :: string() | tuple() | undefined,
+ state :: rebar_state:t() | undefined,
valid :: boolean()}).
%%============================================================================
@@ -211,6 +214,14 @@ source(AppInfo=#app_info_t{}, Source) ->
source(#app_info_t{source=Source}) ->
Source.
+-spec state(t(), rebar_state:t() | undefined) -> t().
+state(AppInfo=#app_info_t{}, State) ->
+ AppInfo#app_info_t{state=State}.
+
+-spec state(t()) -> rebar_state:t() | undefined.
+state(#app_info_t{state=State}) ->
+ State.
+
-spec valid(t()) -> boolean().
valid(AppInfo=#app_info_t{valid=undefined}) ->
rebar_app_discover:validate_application_info(AppInfo);