blob: f1b86f421c6c46d46a4524a33f0b5a4a16d82eca [file] [log] [blame]
Alan Viverette53f6b2a2018-02-21 11:44:57 -05001#
2# Copyright (C) 2018 The Android Open Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16
17###########################################################
18## Rules for resolving Support Library dependencies.
19##
20## The following variables may be modified:
21## - LOCAL_JAVA_LIBRARIES
22## - LOCAL_STATIC_JAVA_LIBRARIES
23## - LOCAL_SHARED_ANDROID_LIBRARIES
24## - LOCAL_STATIC_ANDROID_LIBRARIES
25###########################################################
26
27# Some projects don't work correctly yet. Allow them to skip resolution.
28ifndef LOCAL_DISABLE_RESOLVE_SUPPORT_LIBRARIES
29
30# Clear these out so we don't accidentally get old values.
31support_android_deps :=
32support_java_deps :=
33
34# Delegate dependency expansion to the Support Library's rules. This will store
35# its output in the variables support_android_deps and support_java_deps.
36include $(RESOLVE_SUPPORT_LIBRARIES)
37
Alan Viverette861475d2018-03-22 14:07:58 -040038# Everything is static, which simplifies resource handling. Don't write to any
39# vars unless we actually have data, since even an empty ANDROID_LIBRARIES var
40# requires an AndroidManifest.xml file!
Alan Viverette53f6b2a2018-02-21 11:44:57 -050041ifdef support_android_deps
Alan Viverette861475d2018-03-22 14:07:58 -040042 LOCAL_STATIC_ANDROID_LIBRARIES += $(support_android_deps)
Alan Viverette53f6b2a2018-02-21 11:44:57 -050043endif #support_android_deps
Alan Viverette861475d2018-03-22 14:07:58 -040044ifdef support_java_deps
45 LOCAL_STATIC_JAVA_LIBRARIES += $(support_java_deps)
46endif #support_java_deps
Alan Viverette53f6b2a2018-02-21 11:44:57 -050047
48# We have consumed these values. Clean them up.
49support_android_deps :=
50support_java_deps :=
51
52endif #LOCAL_DISABLE_RESOLVE_SUPPORT_LIBRARIES
53LOCAL_DISABLE_RESOLVE_SUPPORT_LIBRARIES :=