Template
mirror of
https://github.com/MorpheApp/morphe-patches-template.git
synced 2026-12-01 00:19:34 +00:00
refactor: Use patch() and remove the type argument of Patch (#75)
This commit is contained in:
1 parent
ff6530e08f
commit
8cf70f89a1
4 files changed
+6
-6
No files matched your search
@@ -1,5 +1,5 @@
|
||||
[versions]
|
||||
morphe-patcher = "2.2.0"
|
||||
morphe-patcher = "2.3.0"
|
||||
#noinspection GradleDependency
|
||||
smali = "4220ae75f7"
|
||||
gson = "2.15.0"
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
package app.template.patches.example
|
||||
|
||||
import app.morphe.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.morphe.patcher.patch.bytecodePatch
|
||||
import app.morphe.patcher.patch.patch
|
||||
import app.template.patches.shared.Constants.COMPATIBILITY_EXAMPLE
|
||||
|
||||
private const val EXTENSION_CLASS = "Lapp/template/extension/ExamplePatch;"
|
||||
|
||||
@Suppress("unused")
|
||||
val examplePatch = bytecodePatch(
|
||||
val examplePatch = patch(
|
||||
name = "Example Patch",
|
||||
description = "Example patch to start with.",
|
||||
default = true
|
||||
|
||||
@@ -2,11 +2,11 @@ package app.template.patches.example
|
||||
|
||||
import app.morphe.patcher.Fingerprint
|
||||
import app.morphe.patcher.extensions.InstructionExtensions.addInstruction
|
||||
import app.morphe.patcher.patch.bytecodePatch
|
||||
import app.morphe.patcher.patch.patch
|
||||
|
||||
// Internal patch that is not shown in Morphe Manager or CLI patch list,
|
||||
// but this patch is required for other patches to function.
|
||||
val internalPatch = bytecodePatch {
|
||||
val internalPatch = patch {
|
||||
execute {
|
||||
Fingerprint(
|
||||
/**
|
||||
|
||||
@@ -37,7 +37,7 @@ fun main() {
|
||||
}
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
private fun generatePatchList(version: String, patches: Set<Patch<*>>) {
|
||||
private fun generatePatchList(version: String, patches: Set<Patch>) {
|
||||
val listJson = File("../patches-list.json")
|
||||
|
||||
val patchesMap = patches.sortedBy { it.name }.map { patch ->
|
||||
|
||||
Reference in new issue
Block a user