diff --git a/android/build.gradle b/android/build.gradle index 8a4bbf8..e861599 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,6 +1,10 @@ group 'com.agora.iris_method_channel' version '1.0' +def safeExtGet(prop, fallback) { + rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback +} + buildscript { repositories { google() @@ -27,7 +31,7 @@ android { namespace 'com.agora.iris_method_channel' } - compileSdkVersion 31 + compileSdkVersion safeExtGet('compileSdkVersion', 31) externalNativeBuild { cmake { @@ -49,7 +53,7 @@ android { } defaultConfig { - minSdkVersion 16 + minSdkVersion safeExtGet('minSdkVersion', 21) externalNativeBuild { cmake { diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index 7ee3157..05c2af5 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -38,7 +38,7 @@ android { applicationId "com.agora.iris_method_channel_example" // You can update the following values to match your application needs. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. - minSdkVersion flutter.minSdkVersion + minSdkVersion 21 targetSdkVersion flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName