hydrogen is a pluggable android app, use Lua
develop android, minSdkVersion="15", lua 5.3
plugin wrote by lua
program language
宿主:sample
宿主用到的 lua 文件: lua_main
插件目录:lua
脚本:script
插件目录:lua
插件包含文件 info.json
main.lua
{
"id": "pub.hanks.gacha",
"name": "网易插画",
"icon": "http://ww1.sinaimg.cn/large/8c9b876fly1fhaaa8qcofj2046046we9.jpg",
"main": "main.lua",
"versionName": "1.0",
"versionCode": 1,
"desc": "网易每日插画排行"
}
id: 插件唯一标识符号
name: 插件名称
icon: 插件图标
main: 插件启动文件
versionName: 插件版本名称
versionVersion: 插件版本号
desc: 插件描述
插件生成目录 api_luanroid, 执行 java 单元测试 zipPlugin
, 该方法会打包好插件并更新获取插件的 api, 成功后,然后 push 到线上
require "import"
import "android.widget.*"
import "android.view.*"
import "android.app.*"
import "android.net.*"
import "android.content.*"
https://coding.net/u/zhangyuhan/p/api_luanroid/git/blob/master/api/splash
https://coding.net/u/zhangyuhan/p/api_luanroid/git/blob/master/api/update