mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-09 20:58:31 +09:00
[Chore] (ci): cache native builds
This commit is contained in:
@@ -28,6 +28,9 @@ def mobileGlAbiFilters = {
|
||||
.collect { it.trim() }
|
||||
.findAll { !it.isEmpty() }
|
||||
}
|
||||
def mobileGlCmakeCompilerLauncher = {
|
||||
(findProperty('mobilegl.cmakeCompilerLauncher') ?: System.getenv('MOBILEGL_CMAKE_COMPILER_LAUNCHER') ?: '') as String
|
||||
}
|
||||
|
||||
android {
|
||||
namespace 'top.mobilegl.plugin'
|
||||
@@ -112,6 +115,11 @@ android {
|
||||
cmake {
|
||||
path file('src/trace/cpp/CMakeLists.txt')
|
||||
version '3.22.1'
|
||||
def compilerLauncher = mobileGlCmakeCompilerLauncher()
|
||||
if (!compilerLauncher.isEmpty()) {
|
||||
arguments "-DCMAKE_C_COMPILER_LAUNCHER=${compilerLauncher}",
|
||||
"-DCMAKE_CXX_COMPILER_LAUNCHER=${compilerLauncher}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,9 @@ def mobileGlAbiFilters = {
|
||||
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') ?: '') as String
|
||||
}
|
||||
|
||||
subprojects { subproject ->
|
||||
subproject.plugins.withId('com.android.library') {
|
||||
@@ -30,6 +33,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