Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Xposed Module Config Plan #49

Open
fankes opened this issue Sep 20, 2023 · 0 comments
Open

New Xposed Module Config Plan #49

fankes opened this issue Sep 20, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@fankes
Copy link
Collaborator

fankes commented Sep 20, 2023

New Xposed Module Config Plan

The API currently uses annotations and KSP to complete the automatic generation of entry class code.

Some codes still need to be manually configured, such as meta-data of the Xposed Module.

Currently, Android projects are managed uniformly using the Gradle build system, so we decided to remove KSP, launch a Gradle plugin to fully automate the entire Xposed Module configuration, and use YAML as a new configuration file language for management.

The following example

generator:
  target-type: COMPAT
  use-activity-proxy: true
  use-data-channel: true

xposed-module:
  package-name: com.mydemo
  java-entry: com.mydemo.hook.MyModule
  native-entry: mymodule # libmymodule.so
  description: My new Xposed Module.
  api-level: 100
  host-scopes:
    com.android.systemui
    com.android.phone

The Gradle plugin will automatically generate various types of Xposed Modules based on the configuration file content, and automatically generate corresponding types of configuration files, such as traditional Rovo89 and modern libxposed as well as more compatible Xposed Module types.

The style of the configuration file is only a first draft and will be modified later for actual functionality.

新的 Xposed 模块配置方案

API 目前使用注解配合 KSP 来完成入口类代码的自动生成,部分代码依然需要手动进行配置,例如 Xposed 模块的 meta-data

目前 Android 项目统一使用 Gradle 构建系统进行管理,所以我们决定去掉 KSP,推出一个 Gradle 插件来实现整个 Xposed 模块配置的完全自动化,并采用 YAML 作为新的配置文件语言进行管理。

示例如下

generator:
  target-type: COMPAT
  use-activity-proxy: true
  use-data-channel: true

xposed-module:
  package-name: com.mydemo
  java-entry: com.mydemo.hook.MyModule
  native-entry: mymodule # libmymodule.so
  description: My new Xposed Module.
  api-level: 100
  host-scopes:
    com.android.systemui
    com.android.phone

Gradle 插件会根据配置文件内容自动生成各种类型的 Xposed 模块,自动生成对应类型的配置文件,例如传统的 Rovo89 和现代的 libxposed 以及更多兼容的 Xposed 模块类型。

配置文件的样式只是一个初稿,后期会针对实际功能进行修改。

@fankes fankes self-assigned this Sep 20, 2023
@fankes fankes added this to the 2.0.0 milestone Sep 20, 2023
@fankes fankes added the enhancement New feature or request label Sep 20, 2023
@fankes fankes pinned this issue Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant