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 } subprojects { subproject -> subproject.plugins.withId('com.android.library') { subproject.android { defaultConfig { ndk { def abiFiltersOverride = mobileGlAbiFilters() if (!abiFiltersOverride.isEmpty()) { abiFilters(*abiFiltersOverride) } } externalNativeBuild { cmake { cppFlags "-DMOBILEGL_LOG_ACTIVE_LEVEL=${mobileGlLogActiveLevel()}" } } } } } }