Add 'compat' flavor dimension to SUW lib.
Change-Id: I6538454ba777730f3a75cffda737a07901521733 Test: Gradle sync with 2.3 plugin.
This commit is contained in:
parent
462823c777
commit
a820a7f85d
|
@ -13,6 +13,22 @@ android {
|
||||||
|
|
||||||
publishNonDefault true
|
publishNonDefault true
|
||||||
|
|
||||||
|
flavorDimensions 'compat'
|
||||||
|
|
||||||
|
productFlavors {
|
||||||
|
// Platform version that will not include the compatibility libraries
|
||||||
|
platform {
|
||||||
|
dimension 'compat'
|
||||||
|
minSdkVersion 23
|
||||||
|
}
|
||||||
|
|
||||||
|
// Provides backwards compatibility for Gingerbread or above, using support libraries.
|
||||||
|
gingerbreadCompat {
|
||||||
|
dimension 'compat'
|
||||||
|
minSdkVersion 9
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
main {
|
main {
|
||||||
manifest.srcFile 'main/AndroidManifest.xml'
|
manifest.srcFile 'main/AndroidManifest.xml'
|
||||||
|
@ -21,15 +37,19 @@ android {
|
||||||
res.srcDirs = ['main/res']
|
res.srcDirs = ['main/res']
|
||||||
}
|
}
|
||||||
|
|
||||||
flavorDimensions 'compat'
|
|
||||||
|
|
||||||
productFlavors {
|
|
||||||
// Platform version that will not include the compatibility libraries
|
|
||||||
platform {
|
platform {
|
||||||
dimension 'compat'
|
java.srcDirs = ['platform/src']
|
||||||
minSdkVersion 23
|
res.srcDirs = ['platform/res']
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
gingerbreadCompat {
|
||||||
|
java.srcDirs = ['gingerbread/src', 'recyclerview/src']
|
||||||
|
res.srcDirs = ['gingerbread/res', 'recyclerview/res']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
// Read the dependencies from the "deps" map in the extra properties.
|
// 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 builds in the Android tree we want to build the dependencies from source
|
||||||
|
@ -46,29 +66,8 @@ android {
|
||||||
// deps = ['project-name': 'com.example.group:project-name:1.0.0']
|
// deps = ['project-name': 'com.example.group:project-name:1.0.0']
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
platformImplementation deps['support-annotations']
|
platformCompile deps['support-annotations']
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Provides backwards compatibility for Gingerbread or above, using support libraries.
|
gingerbreadCompatCompile deps['support-appcompat-v7']
|
||||||
gingerbreadCompat {
|
gingerbreadCompatCompile deps['support-recyclerview-v7']
|
||||||
dimension 'compat'
|
|
||||||
minSdkVersion 9
|
|
||||||
dependencies {
|
|
||||||
gingerbreadCompatImplementation deps['support-appcompat-v7']
|
|
||||||
gingerbreadCompatImplementation deps['support-recyclerview-v7']
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
platform {
|
|
||||||
java.srcDirs = ['platform/src']
|
|
||||||
res.srcDirs = ['platform/res']
|
|
||||||
}
|
|
||||||
|
|
||||||
gingerbreadCompat {
|
|
||||||
java.srcDirs = ['gingerbread/src', 'recyclerview/src']
|
|
||||||
res.srcDirs = ['gingerbread/res', 'recyclerview/res']
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue