Skip to content

Commit 0f27549

Browse files
committed
fix: add missed external build scripts for android
1 parent c0b037f commit 0f27549

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

android/build.gradle

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
group = "io.agora.agorartm.agora_rtm"
22
version = "1.0"
33

4+
def safeExtGet(prop, fallback) {
5+
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
6+
}
7+
48
buildscript {
59
repositories {
610
google()
@@ -26,16 +30,23 @@ android {
2630
namespace = "io.agora.agorartm.agora_rtm"
2731
}
2832

29-
compileSdk = 34
33+
compileSdkVersion safeExtGet('compileSdkVersion', 31)
3034

3135
compileOptions {
3236
sourceCompatibility = JavaVersion.VERSION_1_8
3337
targetCompatibility = JavaVersion.VERSION_1_8
3438
}
3539

3640
defaultConfig {
41+
minSdkVersion safeExtGet('minSdkVersion', 21)
3742
minSdk = 16
3843
consumerProguardFiles 'consumer-rules.pro'
44+
45+
externalNativeBuild {
46+
cmake {
47+
arguments '-DANDROID_STL=c++_static'
48+
}
49+
}
3950
}
4051

4152
sourceSets {
@@ -45,6 +56,12 @@ android {
4556
}
4657
}
4758

59+
externalNativeBuild {
60+
cmake {
61+
path '../src/CMakeLists.txt'
62+
}
63+
}
64+
4865
dependencies {
4966
testImplementation("junit:junit:4.13.2")
5067
testImplementation("org.mockito:mockito-core:5.0.0")

0 commit comments

Comments
 (0)