diff --git a/.releaserc b/.releaserc index 5deb9dd..8a8bb30 100644 --- a/.releaserc +++ b/.releaserc @@ -10,7 +10,7 @@ [ "@semantic-release/commit-analyzer", { "releaseRules": [ - { "type": "build", "scope": "needs-bump", "release": "patch" } + { "type": "build", "scope": "Needs bump", "release": "patch" } ] } ], diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ff1a9d..76d5760 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +# [12.1.0-dev.2](https://github.com/ReVanced/revanced-patcher/compare/v12.1.0-dev.1...v12.1.0-dev.2) (2023-08-03) + +# [12.1.0-dev.1](https://github.com/ReVanced/revanced-patcher/compare/v12.0.0...v12.1.0-dev.1) (2023-08-01) + + +### Features + +* add `MutableMethod.getInstructions` extension function ([fae4029](https://github.com/ReVanced/revanced-patcher/commit/fae4029cfccfad7aa3dd8f7fbef1c63ee26b85b3)) + # [12.0.0](https://github.com/ReVanced/revanced-patcher/compare/v11.0.4...v12.0.0) (2023-07-30) diff --git a/build.gradle.kts b/build.gradle.kts index 8d8561f..27d0712 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -23,9 +23,9 @@ dependencies { implementation("xpp3:xpp3:1.1.4c") implementation("app.revanced:smali:2.5.3-a3836654") implementation("app.revanced:multidexlib2:2.5.3-a3836654") - implementation("app.revanced:apktool-lib:2.8.2") + implementation("app.revanced:apktool-lib:2.8.3") - implementation("org.jetbrains.kotlin:kotlin-reflect:1.8.20-RC") + implementation("org.jetbrains.kotlin:kotlin-reflect:1.8.22") testImplementation("org.jetbrains.kotlin:kotlin-test:1.8.20-RC") } diff --git a/gradle.properties b/gradle.properties index 3a18281..deb558b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ org.gradle.parallel = true org.gradle.caching = true kotlin.code.style = official -version = 12.0.0 +version = 12.1.0-dev.2 diff --git a/src/main/kotlin/app/revanced/patcher/extensions/InstructionExtensions.kt b/src/main/kotlin/app/revanced/patcher/extensions/InstructionExtensions.kt index 72d1410..b989544 100644 --- a/src/main/kotlin/app/revanced/patcher/extensions/InstructionExtensions.kt +++ b/src/main/kotlin/app/revanced/patcher/extensions/InstructionExtensions.kt @@ -321,6 +321,11 @@ object InstructionExtensions { * @param T The type of instruction to return. * @return The instruction. */ - @Suppress("UNCHECKED_CAST") fun MutableMethod.getInstruction(index: Int): T = implementation!!.getInstruction(index) + + /** + * Get the instructions of a method. + * @return The instructions. + */ + fun MutableMethod.getInstructions(): MutableList = implementation!!.instructions } \ No newline at end of file