[CI] (android-plugin): build two (Espryt/Magma) variants

This commit is contained in:
2026-05-24 08:57:02 +08:00
parent 482b6d7bbf
commit 49e69c1c7d
2 changed files with 42 additions and 15 deletions
+41 -14
View File
@@ -2,13 +2,13 @@ plugins {
id 'com.android.application'
}
def mobileGlEnv = [
LIBGL_ES : '3',
POJAV_RENDERER : 'opengles3',
MOBILEGL_BACKEND_TYPE: 'DirectVulkan',
]
def mobileGlEnvString = mobileGlEnv.collect { key, value -> "${key}=${value}" }.join(':')
def mobileGlEnvString = { backendType ->
[
LIBGL_ES : '3',
POJAV_RENDERER : 'opengles3',
MOBILEGL_BACKEND_TYPE: backendType,
].collect { key, value -> "${key}=${value}" }.join(':')
}
def signingStoreFile = file('../keystore.jks')
def signingStorePassword = System.getenv('SIGNING_STORE_PASSWORD')
def signingKeyAlias = System.getenv('SIGNING_KEY_ALIAS')
@@ -24,7 +24,6 @@ android {
ndkVersion '27.3.13750724'
defaultConfig {
applicationId 'top.mobilegl.plugin'
minSdk 26
targetSdk 34
versionCode 1
@@ -33,13 +32,35 @@ android {
ndk {
abiFilters 'arm64-v8a'
}
}
manifestPlaceholders = [
des : 'MobileGL',
renderer: 'MobileGL:libMobileGL.so:/libMobileGL.so',
boatEnv : mobileGlEnvString,
pojavEnv: mobileGlEnvString,
]
flavorDimensions 'backend'
productFlavors {
espryt {
dimension 'backend'
applicationId 'top.mobilegl.plugin.espryt'
def env = mobileGlEnvString('DirectGLES')
manifestPlaceholders = [
appLabel: 'MobileGL Espryt',
des : 'MobileGL Espryt',
renderer: 'MobileGL Espryt:libMobileGL.so:/libMobileGL.so',
boatEnv : env,
pojavEnv: env,
]
}
magma {
dimension 'backend'
applicationId 'top.mobilegl.plugin.magma'
def env = mobileGlEnvString('DirectVulkan')
manifestPlaceholders = [
appLabel: 'MobileGL Magma',
des : 'MobileGL Magma',
renderer: 'MobileGL Magma:libMobileGL.so:/libMobileGL.so',
boatEnv : env,
pojavEnv: env,
]
}
}
if (releaseSigningReady) {
@@ -70,6 +91,12 @@ android {
}
}
android.applicationVariants.configureEach { variant ->
variant.outputs.configureEach {
outputFileName = "MobileGL-${variant.flavorName.capitalize()}-${variant.buildType.name}.apk"
}
}
dependencies {
implementation project(':MobileGL')
}
@@ -3,7 +3,7 @@
<application
android:hasCode="true"
android:label="@string/app_name"
android:label="${appLabel}"
android:theme="@style/Theme.MobileGLPlugin">
<activity