diff --git a/api/revanced-patches-template.api b/api/revanced-patches-template.api index 8b4a86525..c9bf68b05 100644 --- a/api/revanced-patches-template.api +++ b/api/revanced-patches-template.api @@ -1,6 +1,4 @@ -public final class app/revanced/patches/example/ExamplePatch : app/revanced/patcher/patch/BytecodePatch { - public static final field INSTANCE Lapp/revanced/patches/example/ExamplePatch; - public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V - public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V +public final class app/revanced/patches/example/ExamplePatchKt { + public static final fun getExamplePatch ()Lapp/revanced/patcher/patch/BytecodePatch; } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 8cebce31c..7db954618 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,13 +1,3 @@ [versions] -revanced-patcher = "19.3.1" +revanced-patcher = "20.0.0" smali = "3.0.7" -binary-compatibility-validator = "0.14.0" -kotlin = "2.0.0" - -[libraries] -revanced-patcher = { module = "app.revanced:revanced-patcher", version.ref = "revanced-patcher" } -smali = { module = "com.android.tools.smali:smali", version.ref = "smali" } - -[plugins] -binary-compatibility-validator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "binary-compatibility-validator" } -kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } diff --git a/src/main/kotlin/app/revanced/patches/example/ExamplePatch.kt b/src/main/kotlin/app/revanced/patches/example/ExamplePatch.kt index b4d00d7c2..df68ee607 100644 --- a/src/main/kotlin/app/revanced/patches/example/ExamplePatch.kt +++ b/src/main/kotlin/app/revanced/patches/example/ExamplePatch.kt @@ -1,20 +1,15 @@ package app.revanced.patches.example -import app.revanced.patcher.data.BytecodeContext -import app.revanced.patcher.patch.BytecodePatch -import app.revanced.patcher.patch.annotation.CompatiblePackage -import app.revanced.patcher.patch.annotation.Patch +import app.revanced.patcher.patch.bytecodePatch -@Patch( +@Suppress("unused") +val examplePatch = bytecodePatch( name = "Example Patch", description = "This is an example patch to start with.", - compatiblePackages = [ - CompatiblePackage("com.example.app", ["1.0.0"]), - ], -) -@Suppress("unused") -object ExamplePatch : BytecodePatch(emptySet()) { - override fun execute(context: BytecodeContext) { +) { + compatibleWith("com.example.app"("1.0.0")) + + execute { // TODO("Not yet implemented") } }