From 98f8eedecd72b0afe6a0f099a3641a1cc6be2698 Mon Sep 17 00:00:00 2001 From: rstular Date: Sat, 6 May 2023 13:42:26 +0200 Subject: [PATCH 1/4] fix: remove `count` instead of `count + 1` instructions with `removeInstructions` (#167) Co-authored-by: oSumAtrIX BREAKING-CHANGE: This alters the behaviour of the function. Instead of removing `count + 1` instructions, this now removes `count` instructions. --- src/main/kotlin/app/revanced/patcher/extensions/Extensions.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/app/revanced/patcher/extensions/Extensions.kt b/src/main/kotlin/app/revanced/patcher/extensions/Extensions.kt index 723c377..f828631 100644 --- a/src/main/kotlin/app/revanced/patcher/extensions/Extensions.kt +++ b/src/main/kotlin/app/revanced/patcher/extensions/Extensions.kt @@ -39,7 +39,7 @@ fun MutableMethodImplementation.replaceInstructions(index: Int, instructions: Li } fun MutableMethodImplementation.removeInstructions(index: Int, count: Int) { - for (i in count downTo 0) { + for (i in count - 1 downTo 0) { this.removeInstruction(index + i) } } From 9c53877888cbaea8ac55861a2ed7767ae2baea0d Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Mon, 8 May 2023 00:41:24 +0200 Subject: [PATCH 2/4] build: downgrade to JDK version 11 This is to properly support Android --- .github/workflows/release.yml | 2 +- build.gradle.kts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8b20eb4..2170654 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,7 +26,7 @@ jobs: - name: Setup JDK uses: actions/setup-java@v3 with: - java-version: '17' + java-version: '11' distribution: 'zulu' cache: gradle - name: Setup Node.js diff --git a/build.gradle.kts b/build.gradle.kts index 904423d..dfe7ee5 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -45,6 +45,10 @@ java { withSourcesJar() } +kotlin { + jvmToolchain(11) +} + publishing { repositories { if (System.getenv("GITHUB_ACTOR") != null) From 81e6f8784ee73d129687668ece39379f8b274ebe Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Mon, 8 May 2023 00:46:16 +0200 Subject: [PATCH 3/4] docs: fix heading --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 438dce7..ed9ccf2 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,3 @@ -# Patcher -Patcher framework used in the ReVanced project. \ No newline at end of file +# 💉 ReVanced Patcher + +ReVanced Patcher used to patch Android applications. From 966bbd902eb08f50d719b8daeb75be81ddb67e22 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Sun, 7 May 2023 23:04:09 +0000 Subject: [PATCH 4/4] chore(release): 7.1.1-dev.1 [skip ci] ## [7.1.1-dev.1](https://github.com/revanced/revanced-patcher/compare/v7.1.0...v7.1.1-dev.1) (2023-05-07) ### Bug Fixes * remove `count` instead of `count + 1` instructions with `removeInstructions` ([#167](https://github.com/revanced/revanced-patcher/issues/167)) ([98f8eed](https://github.com/revanced/revanced-patcher/commit/98f8eedecd72b0afe6a0f099a3641a1cc6be2698)) --- CHANGELOG.md | 7 +++++++ gradle.properties | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d997328..bc5ff3e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [7.1.1-dev.1](https://github.com/revanced/revanced-patcher/compare/v7.1.0...v7.1.1-dev.1) (2023-05-07) + + +### Bug Fixes + +* remove `count` instead of `count + 1` instructions with `removeInstructions` ([#167](https://github.com/revanced/revanced-patcher/issues/167)) ([98f8eed](https://github.com/revanced/revanced-patcher/commit/98f8eedecd72b0afe6a0f099a3641a1cc6be2698)) + # [7.1.0](https://github.com/revanced/revanced-patcher/compare/v7.0.0...v7.1.0) (2023-05-05) diff --git a/gradle.properties b/gradle.properties index 0e362a5..28c283f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,2 @@ kotlin.code.style = official -version = 7.1.0 +version = 7.1.1-dev.1