From cbcf93f7d6bfac8049f7a2a06669d429169ce9cf Mon Sep 17 00:00:00 2001 From: Lucaskyy Date: Sun, 20 Mar 2022 22:54:44 +0100 Subject: [PATCH] refactor: target java 8 instead of java 17 --- .github/workflows/release.yml | 4 ++-- .idea/git_toolbox_prj.xml | 15 +++++++++++++++ .idea/misc.xml | 2 +- .idea/vcs.xml | 6 ++++++ src/main/kotlin/net/revanced/patcher/util/Io.kt | 4 ++-- 5 files changed, 26 insertions(+), 5 deletions(-) create mode 100644 .idea/git_toolbox_prj.xml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a957b71..788ba42 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,8 +20,8 @@ jobs: - name: Setup JDK uses: actions/setup-java@v2 with: - java-version: 17 - distribution: zulu + java-version: '8' + distribution: 'adopt' cache: gradle - name: Setup Node.js uses: actions/setup-node@v2 diff --git a/.idea/git_toolbox_prj.xml b/.idea/git_toolbox_prj.xml new file mode 100644 index 0000000..02b915b --- /dev/null +++ b/.idea/git_toolbox_prj.xml @@ -0,0 +1,15 @@ + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index 6a8d183..11c2286 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -4,7 +4,7 @@ - + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml index 94a25f7..4c6280e 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -1,5 +1,11 @@ + + + + + + diff --git a/src/main/kotlin/net/revanced/patcher/util/Io.kt b/src/main/kotlin/net/revanced/patcher/util/Io.kt index d995bf9..2d5ad87 100644 --- a/src/main/kotlin/net/revanced/patcher/util/Io.kt +++ b/src/main/kotlin/net/revanced/patcher/util/Io.kt @@ -16,7 +16,7 @@ object Io { val e = jar.nextJarEntry ?: break if (e.name.endsWith(".class")) { val classNode = ClassNode() - ClassReader(jar.readAllBytes()).accept(classNode, ClassReader.EXPAND_FRAMES) + ClassReader(jar.readBytes()).accept(classNode, ClassReader.EXPAND_FRAMES) this.add(classNode) } jar.closeEntry() @@ -41,7 +41,7 @@ object Io { clazz.accept(cw) jos.write(cw.toByteArray()) } else { - jos.write(jis.readAllBytes()) + jos.write(jis.readBytes()) } jos.closeEntry() }