[CI]: build MobileGL android renderer plugin

This commit is contained in:
2026-05-23 20:58:03 +08:00
parent 8c00ae1d38
commit cb8cb48a60
9 changed files with 201 additions and 1 deletions
+53
View File
@@ -0,0 +1,53 @@
plugins {
id 'com.android.application'
}
def mobileGlEnv = [
LIBGL_ES : '3',
POJAV_RENDERER : 'opengles3',
MOBILEGL_BACKEND_TYPE: 'DirectGLES',
]
def mobileGlEnvString = mobileGlEnv.collect { key, value -> "${key}=${value}" }.join(':')
android {
namespace 'top.mobilegl.plugin'
compileSdk 34
ndkVersion '27.3.13750724'
defaultConfig {
applicationId 'top.mobilegl.plugin'
minSdk 26
targetSdk 34
versionCode 1
versionName 'dev'
ndk {
abiFilters 'arm64-v8a'
}
manifestPlaceholders = [
des : 'MobileGL',
renderer: 'MobileGL:libMobileGL.so:/libMobileGL.so',
boatEnv : mobileGlEnvString,
pojavEnv: mobileGlEnvString,
]
}
buildTypes {
release {
minifyEnabled false
}
}
packaging {
jniLibs {
useLegacyPackaging true
excludes += ['**/libSPIRV-Tools-shared.so']
}
}
}
dependencies {
implementation project(':MobileGL')
}
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application
android:hasCode="true"
android:label="@string/app_name"
android:theme="@style/Theme.MobileGLPlugin">
<activity
android:name=".PluginActivity"
android:exported="true"
android:theme="@style/Theme.MobileGLPlugin.NoDisplay">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<meta-data
android:name="fclPlugin"
android:value="true" />
<meta-data
android:name="des"
android:value="${des}" />
<meta-data
android:name="renderer"
android:value="${renderer}" />
<meta-data
android:name="boatEnv"
android:value="${boatEnv}" />
<meta-data
android:name="pojavEnv"
android:value="${pojavEnv}" />
</application>
</manifest>
@@ -0,0 +1,12 @@
package top.mobilegl.plugin;
import android.app.Activity;
import android.os.Bundle;
public final class PluginActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
finish();
}
}
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">MobileGL</string>
</resources>
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.MobileGLPlugin" parent="@android:style/Theme.Material.NoActionBar" />
<style name="Theme.MobileGLPlugin.NoDisplay" parent="@android:style/Theme.NoDisplay" />
</resources>