From b26e30d7c0cc19985582b9a6a1e006ab3f57dda5 Mon Sep 17 00:00:00 2001 From: Palm Date: Thu, 10 Oct 2024 08:19:25 +0000 Subject: [PATCH] actually fix build and update more references --- .github/workflows/build.yml | 16 ++++++++-------- .../{pyoncord => revenge}/xposed/FontsModule.kt | 4 ++-- .../github/{pyoncord => revenge}/xposed/Main.kt | 6 +++--- .../{pyoncord => revenge}/xposed/PyonModule.kt | 4 ++-- .../xposed/SysColorsModule.kt | 4 ++-- .../{pyoncord => revenge}/xposed/ThemeModule.kt | 4 ++-- 6 files changed, 19 insertions(+), 19 deletions(-) rename app/src/main/kotlin/io/github/{pyoncord => revenge}/xposed/FontsModule.kt (99%) rename app/src/main/kotlin/io/github/{pyoncord => revenge}/xposed/Main.kt (98%) rename app/src/main/kotlin/io/github/{pyoncord => revenge}/xposed/PyonModule.kt (79%) rename app/src/main/kotlin/io/github/{pyoncord => revenge}/xposed/SysColorsModule.kt (95%) rename app/src/main/kotlin/io/github/{pyoncord => revenge}/xposed/ThemeModule.kt (98%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1fc257c..2c82391 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,29 +25,29 @@ jobs: - name: "Setup directories" run: | - mkdir -p /tmp/pyonbuild/apks - mkdir -p /tmp/pyonbuild/tools + mkdir -p /tmp/build/apks + mkdir -p /tmp/build/tools - name: "Move debug APK" - run: mv ./app/build/outputs/apk/debug/app-debug.apk /tmp/pyonbuild/apks + run: mv ./app/build/outputs/apk/debug/app-debug.apk /tmp/build/apks - name: "Download uber-apk-signer" - run: wget -nv "https://github.com/patrickfav/uber-apk-signer/releases/download/v1.2.1/uber-apk-signer-1.2.1.jar" -O /tmp/pyonbuild/tools/uber-apk-signer.jar + run: wget -nv "https://github.com/patrickfav/uber-apk-signer/releases/download/v1.2.1/uber-apk-signer-1.2.1.jar" -O /tmp/build/tools/uber-apk-signer.jar - name: "Sign release APK" - run: java -jar /tmp/pyonbuild/tools/uber-apk-signer.jar --apks ./app/build/outputs/apk/release/app-release-unsigned.apk --out /tmp/pyonbuild/apks/ + run: java -jar /tmp/build/tools/uber-apk-signer.jar --apks ./app/build/outputs/apk/release/app-release-unsigned.apk --out /tmp/build/apks/ - name: "Rename release APK" - run: mv /tmp/pyonbuild/apks/app-release-aligned-debugSigned.apk /tmp/pyonbuild/apks/app-release.apk + run: mv /tmp/build/apks/app-release-aligned-debugSigned.apk /tmp/build/apks/app-release.apk - name: "Upload debug APK" uses: actions/upload-artifact@v3 with: name: app-debug - path: /tmp/pyonbuild/apks/app-debug.apk + path: /tmp/build/apks/app-debug.apk - name: "Upload release APK" uses: actions/upload-artifact@v3 with: name: app-release - path: /tmp/pyonbuild/apks/app-release.apk \ No newline at end of file + path: /tmp/build/apks/app-release.apk \ No newline at end of file diff --git a/app/src/main/kotlin/io/github/pyoncord/xposed/FontsModule.kt b/app/src/main/kotlin/io/github/revenge/xposed/FontsModule.kt similarity index 99% rename from app/src/main/kotlin/io/github/pyoncord/xposed/FontsModule.kt rename to app/src/main/kotlin/io/github/revenge/xposed/FontsModule.kt index 3bf82c7..c529974 100644 --- a/app/src/main/kotlin/io/github/pyoncord/xposed/FontsModule.kt +++ b/app/src/main/kotlin/io/github/revenge/xposed/FontsModule.kt @@ -1,7 +1,7 @@ // credits to janisslsm from his PR: https://github.com/vendetta-mod/VendettaXposed/pull/17 // hooks are modified function from RN codebase -package io.github.pyoncord.xposed +package io.github.revenge.xposed import android.content.res.AssetManager import android.os.Build @@ -41,7 +41,7 @@ data class FontDefinition( val main: Map, ) -class FontsModule: PyonModule() { +class FontsModule: Module() { private val EXTENSIONS = arrayOf("", "_bold", "_italic", "_bold_italic") private val FILE_EXTENSIONS = arrayOf(".ttf", ".otf") private val FONTS_ASSET_PATH = "fonts/" diff --git a/app/src/main/kotlin/io/github/pyoncord/xposed/Main.kt b/app/src/main/kotlin/io/github/revenge/xposed/Main.kt similarity index 98% rename from app/src/main/kotlin/io/github/pyoncord/xposed/Main.kt rename to app/src/main/kotlin/io/github/revenge/xposed/Main.kt index 9e0fd8b..8819eff 100644 --- a/app/src/main/kotlin/io/github/pyoncord/xposed/Main.kt +++ b/app/src/main/kotlin/io/github/revenge/xposed/Main.kt @@ -36,7 +36,7 @@ data class LoaderConfig( ) class Main : IXposedHookLoadPackage { - private val pyonModules: Array = arrayOf( + private val modules: Array = arrayOf( ThemeModule(), SysColorsModule(), FontsModule(), @@ -47,7 +47,7 @@ class Main : IXposedHookLoadPackage { put("loaderName", "BunnyXposed") put("loaderVersion", BuildConfig.VERSION_NAME) - for (module in pyonModules) { + for (module in modules) { module.buildJson(this) } } @@ -73,7 +73,7 @@ class Main : IXposedHookLoadPackage { classLoader.loadClass("com.facebook.react.bridge.CatalystInstanceImpl") }.getOrElse { return@with } - for (module in pyonModules) module.onInit(param) + for (module in modules) module.onInit(param) val loadScriptFromAssets = catalystInstanceImpl.getDeclaredMethod( "loadScriptFromAssets", diff --git a/app/src/main/kotlin/io/github/pyoncord/xposed/PyonModule.kt b/app/src/main/kotlin/io/github/revenge/xposed/PyonModule.kt similarity index 79% rename from app/src/main/kotlin/io/github/pyoncord/xposed/PyonModule.kt rename to app/src/main/kotlin/io/github/revenge/xposed/PyonModule.kt index ebcab56..b0416fd 100644 --- a/app/src/main/kotlin/io/github/pyoncord/xposed/PyonModule.kt +++ b/app/src/main/kotlin/io/github/revenge/xposed/PyonModule.kt @@ -1,9 +1,9 @@ -package io.github.pyoncord.xposed +package io.github.revenge.xposed import de.robv.android.xposed.callbacks.XC_LoadPackage import kotlinx.serialization.json.JsonObjectBuilder -abstract class PyonModule { +abstract class Module { open fun buildJson(builder: JsonObjectBuilder) {} open fun onInit(packageParam: XC_LoadPackage.LoadPackageParam) {} } \ No newline at end of file diff --git a/app/src/main/kotlin/io/github/pyoncord/xposed/SysColorsModule.kt b/app/src/main/kotlin/io/github/revenge/xposed/SysColorsModule.kt similarity index 95% rename from app/src/main/kotlin/io/github/pyoncord/xposed/SysColorsModule.kt rename to app/src/main/kotlin/io/github/revenge/xposed/SysColorsModule.kt index 140b631..c4e49aa 100644 --- a/app/src/main/kotlin/io/github/pyoncord/xposed/SysColorsModule.kt +++ b/app/src/main/kotlin/io/github/revenge/xposed/SysColorsModule.kt @@ -1,4 +1,4 @@ -package io.github.pyoncord.xposed +package io.github.revenge.xposed import android.app.AndroidAppHelper import android.content.Context @@ -16,7 +16,7 @@ data class SysColors( val accent3: List ) -class SysColorsModule : PyonModule() { +class SysColorsModule : Module() { private lateinit var context: Context fun isSupported() = Build.VERSION.SDK_INT >= Build.VERSION_CODES.S diff --git a/app/src/main/kotlin/io/github/pyoncord/xposed/ThemeModule.kt b/app/src/main/kotlin/io/github/revenge/xposed/ThemeModule.kt similarity index 98% rename from app/src/main/kotlin/io/github/pyoncord/xposed/ThemeModule.kt rename to app/src/main/kotlin/io/github/revenge/xposed/ThemeModule.kt index 7b1cb6c..e8da0f8 100644 --- a/app/src/main/kotlin/io/github/pyoncord/xposed/ThemeModule.kt +++ b/app/src/main/kotlin/io/github/revenge/xposed/ThemeModule.kt @@ -1,4 +1,4 @@ -package io.github.pyoncord.xposed +package io.github.revenge.xposed import android.content.Context import android.graphics.Color @@ -35,7 +35,7 @@ data class Theme( val data: ThemeData ) -class ThemeModule : PyonModule() { +class ThemeModule : Module() { private lateinit var param: XC_LoadPackage.LoadPackageParam private var theme: Theme? = null