This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
android.applicationVariants.all{ variant -> | |
// This is an annoying hack to get around the fact that the Gradle plugin does not support | |
// having libraries with different minSdkVersions. Play Services has a min version of 9 (Gingerbread) | |
// but Android Maps Utils supports 8 (Froyo) still | |
variant.processManifest.doFirst { | |
File manifestFile = file("${buildDir}/exploded-bundles/ComGoogleMapsAndroidAndroidMapsUtils03.aar/AndroidManifest.xml") | |
if (manifestFile.exists()) { | |
println("Replacing minSdkVersion in Android Maps Utils") | |
String content = manifestFile.getText('UTF-8') | |
content = content.replaceAll(/minSdkVersion="8"/, 'minSdkVersion=\"9\"') |