feat: Add ability to create options outside of a patch

This commit is contained in:
oSumAtrIX
2024-08-01 17:39:35 +02:00
parent dcc989243c
commit d310246852
5 changed files with 386 additions and 11 deletions

View File

@@ -149,6 +149,18 @@ The type of an option can be obtained from the `type` property of the option:
option.type // The KType of the option.
```
Options can be declared outside of a patch and added to a patch manually:
```kt
val option = stringOption(key = "option")
bytecodePatch(name = "Patch") {
val value by option()
}
```
This is useful when the same option is referenced in multiple patches.
### 🧩 Extensions
An extension is a precompiled DEX file merged into the patched app before a patch is executed.