mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-11 05:38:31 +09:00
[Fix] (ci): cache native compilation
This commit is contained in:
@@ -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'
|
||||
|
||||
@@ -18,6 +18,10 @@ def mobileGlLogActiveLevel = {
|
||||
(rootProject.findProperty('mobilegl.logLevel') ?: System.getenv('MOBILEGL_LOG_ACTIVE_LEVEL') ?: 'MOBILEGL_LOG_LEVEL_INFO') as String
|
||||
}
|
||||
|
||||
def mobileGlCmakeCompilerLauncher = {
|
||||
(rootProject.findProperty('mobilegl.cmakeCompilerLauncher') ?: System.getenv('MOBILEGL_CMAKE_COMPILER_LAUNCHER') ?: '').toString().trim()
|
||||
}
|
||||
|
||||
subprojects { subproject ->
|
||||
subproject.plugins.withId('com.android.library') {
|
||||
subproject.android {
|
||||
@@ -30,6 +34,11 @@ subprojects { subproject ->
|
||||
}
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
def compilerLauncher = mobileGlCmakeCompilerLauncher()
|
||||
if (!compilerLauncher.isEmpty()) {
|
||||
arguments "-DCMAKE_C_COMPILER_LAUNCHER=${compilerLauncher}",
|
||||
"-DCMAKE_CXX_COMPILER_LAUNCHER=${compilerLauncher}"
|
||||
}
|
||||
cppFlags "-DMOBILEGL_LOG_ACTIVE_LEVEL=${mobileGlLogActiveLevel()}"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user