ByteX banner
bytedance bytedance

ByteX

Development community

Description

ByteX is a bytecode plugin platform based on Android Gradle Transform API and ASM. 字节码插件开发平台

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

English | **[简体中文](README_zh.md)**

ByteX(Infinite Possibilities)

logo

[![GitHub license](https://img.shields.io/badge/license-Apache%202-blue)](https://github.com/bytedance/ByteX/blob/master/LICENSE)

Powered by ByteDance TikTok & Douyin Android team.

ByteX is a bytecode plugin platform based on Android Gradle Transform Api and ASM.

(Maybe you can think of it as a socket with unlimited plugs?)

In the apk building process, each plugin is completely independent. It not only can run independently from the ByteX host, but also can be automatically integrated into the host into a single Transform along with other plugins.

What's more, each plugin's code is decoupled from one another, as well as their host, which makes it extensible and highly efficient for the development of new plugins.

Background

If all features are developed as a separate plugin, each plugin will cost 10+s, and the compilation time will increase linearly.

But if the iterative development in only one plugin module will make it more and more cluttered, for the code is deeply coupled.

So an idea was raised. It could make sense to build a bytecode plugin platform, and the new feature can be extended based on it as a new plugin.

Feature

  • Code reuse. The common code sinks to `common` module and is reused by all plugins, so that each plugin only needs to focus on bytecode operation.

  • Plugin code is isolated and decoupled from each other. Based on ByteX, each feature is independent as a single plugin, and the code of each plugin is isolated from each other, which is conducive to develop a new plugin.

  • Platformization makes `Transform` more efficient.

    • Class files are processed in multiple threads concurrently, making full use of the CPU resources of your machine.

    • Plugins are automatically and seamlessly integrated into a single `Transform` to improve the efficiency o