[SetupWizardLib] Set up compat build

Set up a build flavor for v14 (ICS) compatibility.

Bug: 19664089
Change-Id: Iacd66c5756f5b9c8fa7dfce7a4c1cf2d41bddda6
This commit is contained in:
Maurice Lam 2015-03-09 14:02:04 -07:00
parent cfb8d4add0
commit 7617968edb
3 changed files with 52 additions and 0 deletions

View file

@ -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']
}
}
}

View file

@ -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>

View file

@ -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')