[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' id 'com.android.application'
} }
def mobileGlEnv = [ def mobileGlEnvString = { backendType ->
LIBGL_ES : '3', [
POJAV_RENDERER : 'opengles3', LIBGL_ES : '3',
MOBILEGL_BACKEND_TYPE: 'DirectVulkan', POJAV_RENDERER : 'opengles3',
] MOBILEGL_BACKEND_TYPE: backendType,
].collect { key, value -> "${key}=${value}" }.join(':')
def mobileGlEnvString = mobileGlEnv.collect { key, value -> "${key}=${value}" }.join(':') }
def signingStoreFile = file('../keystore.jks') def signingStoreFile = file('../keystore.jks')
def signingStorePassword = System.getenv('SIGNING_STORE_PASSWORD') def signingStorePassword = System.getenv('SIGNING_STORE_PASSWORD')
def signingKeyAlias = System.getenv('SIGNING_KEY_ALIAS') def signingKeyAlias = System.getenv('SIGNING_KEY_ALIAS')
@@ -24,7 +24,6 @@ android {
ndkVersion '27.3.13750724' ndkVersion '27.3.13750724'
defaultConfig { defaultConfig {
applicationId 'top.mobilegl.plugin'
minSdk 26 minSdk 26
targetSdk 34 targetSdk 34
versionCode 1 versionCode 1
@@ -33,13 +32,35 @@ android {
ndk { ndk {
abiFilters 'arm64-v8a' abiFilters 'arm64-v8a'
} }
}
manifestPlaceholders = [ flavorDimensions 'backend'
des : 'MobileGL',
renderer: 'MobileGL:libMobileGL.so:/libMobileGL.so', productFlavors {
boatEnv : mobileGlEnvString, espryt {
pojavEnv: mobileGlEnvString, 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) { if (releaseSigningReady) {
@@ -70,6 +91,12 @@ android {
} }
} }
android.applicationVariants.configureEach { variant ->
variant.outputs.configureEach {
outputFileName = "MobileGL-${variant.flavorName.capitalize()}-${variant.buildType.name}.apk"
}
}
dependencies { dependencies {
implementation project(':MobileGL') implementation project(':MobileGL')
} }
@@ -3,7 +3,7 @@
<application <application
android:hasCode="true" android:hasCode="true"
android:label="@string/app_name" android:label="${appLabel}"
android:theme="@style/Theme.MobileGLPlugin"> android:theme="@style/Theme.MobileGLPlugin">
<activity <activity