diff --git a/android/build.gradle b/android/build.gradle index 7578cdf..039a60e 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,6 +1,10 @@ group = "io.agora.agorartm.agora_rtm" version = "1.0" +def safeExtGet(prop, fallback) { + rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback +} + buildscript { repositories { google() @@ -26,7 +30,7 @@ android { namespace = "io.agora.agorartm.agora_rtm" } - compileSdk = 34 + compileSdkVersion safeExtGet('compileSdkVersion', 31) compileOptions { sourceCompatibility = JavaVersion.VERSION_1_8 @@ -34,6 +38,7 @@ android { } defaultConfig { + minSdkVersion safeExtGet('minSdkVersion', 21) minSdk = 16 consumerProguardFiles 'consumer-rules.pro' } @@ -45,6 +50,13 @@ android { } } + externalNativeBuild { + cmake { + path '../src/CMakeLists.txt' + arguments '-DANDROID_STL=c++_static' + } + } + dependencies { testImplementation("junit:junit:4.13.2") testImplementation("org.mockito:mockito-core:5.0.0")