SetupWizardLibrary/library/rules.gradle
Maurice Lam f48c1c7a1f Bump min SDK of platform to 23
Platform builds only guarantee support of the latest platform
version, so it is safe to bump the min SDK version to 23.

This fixes the ButtonItemTest Robolectric test.

Test: Existing tests pass. ./gradlew connectedAndroidTest test
Change-Id: I82fa27a1b342973ea2d05312cb80ba509e6c6dc3
2017-02-28 11:33:58 -08:00

71 lines
2.6 KiB
Groovy

/**
* Base rules for building setup wizard library. This build file is not used directly but rather
* included in scripts like build.gradle or standalone.gradle using 'apply from'.
*
* This allows the dependencies to be configured so that for builds in the Android tree, the
* dependencies like support library is built directly from source, while for standalone builds they
* will be fetched from maven central.
*/
apply plugin: 'com.android.library'
android {
publishNonDefault true
sourceSets {
main {
manifest.srcFile 'main/AndroidManifest.xml'
java.srcDirs = ['main/src']
resources.srcDirs = ['main/src']
res.srcDirs = ['main/res']
}
productFlavors {
// Platform version that will not include the compatibility libraries
platform {
minSdkVersion 23
dependencies {
// Read the dependencies from the "deps" map in the extra properties.
//
// For builds in the Android tree we want to build the dependencies from source
// for reproducible builds, for example in build.gradle define something like
// this:
// ext {
// deps = ['project-name': project(':project-path')]
// }
//
// For standalone project clients, since the source may not be available, we
// fetch the dependencies from maven. For example in standalone.gradle define
// something like this:
// ext {
// deps = ['project-name': 'com.example.group:project-name:1.0.0']
// }
//
platformCompile deps['support-annotations']
}
}
// Provides backwards compatibility for Gingerbread or above, using support libraries.
gingerbreadCompat {
minSdkVersion 9
dependencies {
gingerbreadCompatCompile deps['support-appcompat-v7']
gingerbreadCompatCompile deps['support-recyclerview-v7']
}
}
}
platform {
java.srcDirs = ['platform/src']
res.srcDirs = ['platform/res']
}
gingerbreadCompat {
java.srcDirs = ['eclair-mr1/src', 'full-support/src']
res.srcDirs = ['eclair-mr1/res', 'full-support/res']
}
}
}