Home | History | Annotate | Download | only in design
      1 # Copyright (C) 2015 The Android Open Source Project
      2 #
      3 # Licensed under the Apache License, Version 2.0 (the "License");
      4 # you may not use this file except in compliance with the License.
      5 # You may obtain a copy of the License at
      6 #
      7 #      http://www.apache.org/licenses/LICENSE-2.0
      8 #
      9 # Unless required by applicable law or agreed to in writing, software
     10 # distributed under the License is distributed on an "AS IS" BASIS,
     11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     12 # See the License for the specific language governing permissions and
     13 # limitations under the License.
     14 
     15 LOCAL_PATH := $(call my-dir)
     16 
     17 # Android libraries referenced by this module's resources.
     18 resource_libs := \
     19     android-support-v7-appcompat \
     20     android-support-v7-recyclerview
     21 
     22 # Build the resources using the latest applicable SDK version.
     23 # We do this here because the final static library must be compiled with an older
     24 # SDK version than the resources.  The resources library and the R class that it
     25 # contains will not be linked into the final static library.
     26 include $(CLEAR_VARS)
     27 LOCAL_USE_AAPT2 := true
     28 LOCAL_MODULE := android-support-design-res
     29 LOCAL_SDK_VERSION := $(SUPPORT_CURRENT_SDK_VERSION)
     30 LOCAL_SRC_FILES := $(call all-java-files-under, dummy)
     31 LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
     32 LOCAL_SHARED_ANDROID_LIBRARIES := $(resource_libs)
     33 LOCAL_AAPT_FLAGS := --no-version-vectors
     34 LOCAL_JAR_EXCLUDE_FILES := none
     35 LOCAL_JAVA_LANGUAGE_VERSION := 1.7
     36 include $(BUILD_STATIC_JAVA_LIBRARY)
     37 
     38 # A helper sub-library to resolve cyclic dependencies between src and the platform dependent
     39 # implementations
     40 include $(CLEAR_VARS)
     41 LOCAL_MODULE := android-support-design-base
     42 LOCAL_SDK_VERSION := 9
     43 LOCAL_SRC_FILES := $(call all-java-files-under, base)
     44 LOCAL_JAVA_LIBRARIES := \
     45     android-support-design-res \
     46     android-support-v4 \
     47     android-support-v7-appcompat \
     48     android-support-v7-recyclerview
     49 LOCAL_JAVA_LANGUAGE_VERSION := 1.7
     50 include $(BUILD_STATIC_JAVA_LIBRARY)
     51 
     52 # A helper sub-library that makes direct use of Gingerbread APIs
     53 include $(CLEAR_VARS)
     54 LOCAL_MODULE := android-support-design-gingerbread
     55 LOCAL_SDK_VERSION := 9
     56 LOCAL_SRC_FILES := $(call all-java-files-under, gingerbread)
     57 LOCAL_STATIC_JAVA_LIBRARIES := android-support-design-base
     58 LOCAL_JAVA_LIBRARIES := \
     59     android-support-design-res \
     60     android-support-v4 \
     61     android-support-v7-appcompat \
     62     android-support-v7-recyclerview
     63 LOCAL_JAVA_LANGUAGE_VERSION := 1.7
     64 include $(BUILD_STATIC_JAVA_LIBRARY)
     65 
     66 # A helper sub-library that makes direct use of Honeycomb APIs
     67 include $(CLEAR_VARS)
     68 LOCAL_MODULE := android-support-design-honeycomb
     69 LOCAL_SDK_VERSION := 11
     70 LOCAL_SRC_FILES := $(call all-java-files-under, honeycomb)
     71 LOCAL_STATIC_JAVA_LIBRARIES := android-support-design-gingerbread
     72 LOCAL_JAVA_LIBRARIES := \
     73     android-support-design-res \
     74     android-support-v4 \
     75     android-support-v7-appcompat \
     76     android-support-v7-recyclerview
     77 LOCAL_JAVA_LANGUAGE_VERSION := 1.7
     78 include $(BUILD_STATIC_JAVA_LIBRARY)
     79 
     80 # A helper sub-library that makes direct use of Honeycomb MR1 APIs
     81 include $(CLEAR_VARS)
     82 LOCAL_MODULE := android-support-design-honeycomb-mr1
     83 LOCAL_SDK_VERSION := 12
     84 LOCAL_SRC_FILES := $(call all-java-files-under, honeycomb-mr1)
     85 LOCAL_STATIC_JAVA_LIBRARIES := android-support-design-honeycomb
     86 LOCAL_JAVA_LIBRARIES := \
     87     android-support-design-res \
     88     android-support-v4 \
     89     android-support-v7-appcompat \
     90     android-support-v7-recyclerview
     91 LOCAL_JAVA_LANGUAGE_VERSION := 1.7
     92 include $(BUILD_STATIC_JAVA_LIBRARY)
     93 
     94 # A helper sub-library that makes direct use of ICS APIs
     95 include $(CLEAR_VARS)
     96 LOCAL_MODULE := android-support-design-ics
     97 LOCAL_SDK_VERSION := 14
     98 LOCAL_SRC_FILES := $(call all-java-files-under, ics)
     99 LOCAL_STATIC_JAVA_LIBRARIES := android-support-design-honeycomb-mr1
    100 LOCAL_JAVA_LIBRARIES := \
    101     android-support-design-res \
    102     android-support-v4 \
    103     android-support-v7-appcompat \
    104     android-support-v7-recyclerview
    105 LOCAL_JAVA_LANGUAGE_VERSION := 1.7
    106 include $(BUILD_STATIC_JAVA_LIBRARY)
    107 
    108 # A helper sub-library that makes direct use of Lollipop APIs
    109 include $(CLEAR_VARS)
    110 LOCAL_MODULE := android-support-design-lollipop
    111 LOCAL_SDK_VERSION := 21
    112 LOCAL_SRC_FILES := $(call all-java-files-under, lollipop)
    113 LOCAL_STATIC_JAVA_LIBRARIES := android-support-design-ics
    114 LOCAL_JAVA_LIBRARIES := \
    115     android-support-design-res \
    116     android-support-v4 \
    117     android-support-v7-appcompat \
    118     android-support-v7-recyclerview
    119 LOCAL_JAVA_LANGUAGE_VERSION := 1.7
    120 include $(BUILD_STATIC_JAVA_LIBRARY)
    121 
    122 # Here is the final static library that apps can link against.
    123 # Applications that use this library must specify
    124 #
    125 #   LOCAL_STATIC_ANDROID_LIBRARIES := \
    126 #       android-support-design \
    127 #       android-support-v7-appcompat \
    128 #       android-support-v7-recyclerview \
    129 #       android-support-v4
    130 #
    131 # in their makefiles to include the resources and their dependencies in their package.
    132 include $(CLEAR_VARS)
    133 LOCAL_USE_AAPT2 := true
    134 LOCAL_MODULE := android-support-design
    135 LOCAL_SDK_VERSION := $(SUPPORT_CURRENT_SDK_VERSION)
    136 LOCAL_SRC_FILES := $(call all-java-files-under, src)
    137 LOCAL_STATIC_JAVA_LIBRARIES := android-support-design-lollipop
    138 LOCAL_STATIC_ANDROID_LIBRARIES := android-support-design-res
    139 LOCAL_SHARED_ANDROID_LIBRARIES := $(resource_libs) android-support-v4
    140 LOCAL_JAR_EXCLUDE_FILES := none
    141 LOCAL_JAVA_LANGUAGE_VERSION := 1.7
    142 LOCAL_AAPT_FLAGS := --add-javadoc-annotation doconly
    143 include $(BUILD_STATIC_JAVA_LIBRARY)
    144