Alan Viverette | 53f6b2a | 2018-02-21 11:44:57 -0500 | [diff] [blame] | 1 | # |
| 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. |
| 28 | ifndef LOCAL_DISABLE_RESOLVE_SUPPORT_LIBRARIES |
| 29 | |
| 30 | # Clear these out so we don't accidentally get old values. |
| 31 | support_android_deps := |
| 32 | support_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. |
| 36 | include $(RESOLVE_SUPPORT_LIBRARIES) |
| 37 | |
Alan Viverette | 861475d | 2018-03-22 14:07:58 -0400 | [diff] [blame] | 38 | # 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 Viverette | 53f6b2a | 2018-02-21 11:44:57 -0500 | [diff] [blame] | 41 | ifdef support_android_deps |
Alan Viverette | 861475d | 2018-03-22 14:07:58 -0400 | [diff] [blame] | 42 | LOCAL_STATIC_ANDROID_LIBRARIES += $(support_android_deps) |
Alan Viverette | 53f6b2a | 2018-02-21 11:44:57 -0500 | [diff] [blame] | 43 | endif #support_android_deps |
Alan Viverette | 861475d | 2018-03-22 14:07:58 -0400 | [diff] [blame] | 44 | ifdef support_java_deps |
| 45 | LOCAL_STATIC_JAVA_LIBRARIES += $(support_java_deps) |
| 46 | endif #support_java_deps |
Alan Viverette | 53f6b2a | 2018-02-21 11:44:57 -0500 | [diff] [blame] | 47 | |
| 48 | # We have consumed these values. Clean them up. |
| 49 | support_android_deps := |
| 50 | support_java_deps := |
| 51 | |
| 52 | endif #LOCAL_DISABLE_RESOLVE_SUPPORT_LIBRARIES |
| 53 | LOCAL_DISABLE_RESOLVE_SUPPORT_LIBRARIES := |