File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,12 @@ android {
1818 cppFlags ' '
1919 }
2020 }
21+
22+ if (isRunningOnCI()) {
23+ ndk {
24+ abiFilters getCurrentArchitecture()
25+ }
26+ }
2127 }
2228
2329 buildTypes {
@@ -74,4 +80,21 @@ publishing {
7480 }
7581 }
7682 }
83+ }
84+
85+ // Function to detect the current architecture
86+ def getCurrentArchitecture () {
87+ def arch = System . getProperty(" os.arch" )
88+ if (arch. contains(" aarch64" ) || arch. contains(" arm64" )) {
89+ return " arm64-v8a"
90+ } else if (arch. contains(" x86_64" ) || arch. contains(" amd64" )) {
91+ return " x86_64"
92+ } else {
93+ return " x86_64"
94+ }
95+ }
96+
97+ // Function to check if running on CI in test configuration
98+ def isRunningOnCI () {
99+ return System . getenv(" CI_TEST" )?. toBoolean() ?: false
77100}
You can’t perform that action at this time.
0 commit comments