[Fix] (ci): cache native compilation

This commit is contained in:
2026-06-22 09:24:21 +08:00
parent dac5f8964f
commit b87b698148
4 changed files with 91 additions and 2 deletions
+12
View File
@@ -18,6 +18,9 @@ def releaseSigningReady = signingStoreFile.exists()
&& signingKeyAlias
&& signingKeyPassword
def debuggableRelease = (findProperty('mobilegl.debuggableRelease') ?: 'false').toString().toBoolean()
def mobileGlCmakeCompilerLauncher = {
(findProperty('mobilegl.cmakeCompilerLauncher') ?: System.getenv('MOBILEGL_CMAKE_COMPILER_LAUNCHER') ?: '').toString().trim()
}
def mobileGlAbiFilters = {
def abiList = (findProperty('mobilegl.abis') ?: System.getenv('MOBILEGL_ABIS') ?: 'arm64-v8a') as String
if (abiList.equalsIgnoreCase('all')) {
@@ -46,6 +49,15 @@ android {
abiFilters(*abiFiltersOverride)
}
}
externalNativeBuild {
cmake {
def compilerLauncher = mobileGlCmakeCompilerLauncher()
if (!compilerLauncher.isEmpty()) {
arguments "-DCMAKE_C_COMPILER_LAUNCHER=${compilerLauncher}",
"-DCMAKE_CXX_COMPILER_LAUNCHER=${compilerLauncher}"
}
}
}
}
flavorDimensions 'backend', 'profile'