diff options
author | Maurice Lam <yukl@google.com> | 2015-03-09 14:02:04 -0700 |
---|---|---|
committer | Maurice Lam <yukl@google.com> | 2015-03-09 14:02:04 -0700 |
commit | 7617968edbe1b85aa8ce61a0586335b4eb49359e (patch) | |
tree | e6807689d59ffdfbf7d455f594e90508ab300199 | |
parent | cfb8d4add01e3a8108e97a8b53b8a77b0705b2a9 (diff) | |
download | setupwizard-7617968edbe1b85aa8ce61a0586335b4eb49359e.tar.gz |
[SetupWizardLib] Set up compat build
Set up a build flavor for v14 (ICS) compatibility.
Bug: 19664089
Change-Id: Iacd66c5756f5b9c8fa7dfce7a4c1cf2d41bddda6
-rw-r--r-- | library/build.gradle | 22 | ||||
-rw-r--r-- | library/res-ics/values/styles.xml | 19 | ||||
-rw-r--r-- | tools/gradle/settings.gradle | 11 |
3 files changed, 52 insertions, 0 deletions
diff --git a/library/build.gradle b/library/build.gradle index 24a2293..02173e3 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -1,6 +1,9 @@ apply plugin: 'com.android.library' android { + + publishNonDefault true + sourceSets { main { manifest.srcFile 'AndroidManifest.xml' @@ -8,5 +11,24 @@ android { resources.srcDirs = ['src'] res.srcDirs = ['res'] } + + productFlavors { + // Platform version that will not include the compatibility libraries + platform { + minSdkVersion 21 + } + + // Compatibility build that provides the L layout for SDK versions ICS+ + icsCompat { + minSdkVersion 14 + dependencies { + icsCompatCompile project(':support-appcompat-v7') + } + } + } + + icsCompat { + res.srcDirs = ['res-ics'] + } } } diff --git a/library/res-ics/values/styles.xml b/library/res-ics/values/styles.xml new file mode 100644 index 0000000..fec00dc --- /dev/null +++ b/library/res-ics/values/styles.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (C) 2015 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<resources> +</resources>
\ No newline at end of file diff --git a/tools/gradle/settings.gradle b/tools/gradle/settings.gradle index 2af31d0..b5fd357 100644 --- a/tools/gradle/settings.gradle +++ b/tools/gradle/settings.gradle @@ -1,2 +1,13 @@ include(':setup-wizard-lib') project(':setup-wizard-lib').projectDir = new File(rootDir, 'frameworks/opt/setupwizard/library') + +File supportLibsRoot = new File(rootDir, "prebuilts/fullsdk/linux/platforms/android-22/support") +if (!supportLibsRoot.exists()) { + supportLibsRoot = new File(rootDir, "prebuilts/fullsdk/darwin/platforms/android-22/support") +} + +include(':support-v4') +project(':support-v4').projectDir = new File(supportLibsRoot, 'v4') + +include(':support-appcompat-v7') +project(':support-appcompat-v7').projectDir = new File(supportLibsRoot, 'appcompat') |