Skip to content

Commit

Permalink
actually fix build and update more references
Browse files Browse the repository at this point in the history
  • Loading branch information
PalmDevs authored Oct 10, 2024
1 parent 7431c60 commit b26e30d
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 19 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
path: /tmp/build/apks/app-release.apk
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -41,7 +41,7 @@ data class FontDefinition(
val main: Map<String, String>,
)

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/"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ data class LoaderConfig(
)

class Main : IXposedHookLoadPackage {
private val pyonModules: Array<PyonModule> = arrayOf(
private val modules: Array<Module> = arrayOf(
ThemeModule(),
SysColorsModule(),
FontsModule(),
Expand All @@ -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)
}
}
Expand All @@ -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",
Expand Down
Original file line number Diff line number Diff line change
@@ -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) {}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.pyoncord.xposed
package io.github.revenge.xposed

import android.app.AndroidAppHelper
import android.content.Context
Expand All @@ -16,7 +16,7 @@ data class SysColors(
val accent3: List<String>
)

class SysColorsModule : PyonModule() {
class SysColorsModule : Module() {
private lateinit var context: Context
fun isSupported() = Build.VERSION.SDK_INT >= Build.VERSION_CODES.S

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.pyoncord.xposed
package io.github.revenge.xposed

import android.content.Context
import android.graphics.Color
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b26e30d

Please sign in to comment.