mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-08 04:08:32 +09:00
49 lines
1.7 KiB
Groovy
49 lines
1.7 KiB
Groovy
plugins {
|
|
id 'com.android.application' version '8.6.0' apply false
|
|
id 'com.android.library' version '8.6.0' apply false
|
|
}
|
|
|
|
def mobileGlAbiFilters = {
|
|
def abiList = (rootProject.findProperty('mobilegl.abis') ?: System.getenv('MOBILEGL_ABIS') ?: 'arm64-v8a') as String
|
|
if (abiList.equalsIgnoreCase('all')) {
|
|
return ['arm64-v8a', 'x86_64']
|
|
}
|
|
abiList
|
|
.split(',')
|
|
.collect { it.trim() }
|
|
.findAll { !it.isEmpty() }
|
|
}
|
|
|
|
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 {
|
|
defaultConfig {
|
|
ndk {
|
|
def abiFiltersOverride = mobileGlAbiFilters()
|
|
if (!abiFiltersOverride.isEmpty()) {
|
|
abiFilters(*abiFiltersOverride)
|
|
}
|
|
}
|
|
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()}"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|