Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 22 additions & 2 deletions .github/workflows/build_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,45 @@ on:
branches:
- dev

permissions:
contents: read

jobs:
build:
name: Build (${{ matrix.os }})
name: Build (${{ matrix.os }}, JDK ${{ matrix.jdk }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
# JDK version the test suite is executed against. Gradle itself always runs
# on JDK 17 (last in the setup-java list); tests fork onto the matrix JDK.
jdk: [11, 17, 25]
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Set up JDKs
uses: actions/setup-java@v4
with:
distribution: temurin
# 17 is listed last so JAVA_HOME (used to run Gradle) points to JDK 17.
java-version: |
${{ matrix.jdk }}
17

- name: Cache Gradle
uses: burrunan/gradle-cache-action@v3

- name: Build
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./gradlew build --no-daemon
# Run tests against the matrix JDK via a Gradle toolchain, discovered from the
# JDKs that setup-java installed (both x64 and arm64 runners are covered).
run: >-
./gradlew build --no-daemon
-PtestJavaVersion=${{ matrix.jdk }}
"-Porg.gradle.java.installations.fromEnv=JAVA_HOME_11_X64,JAVA_HOME_17_X64,JAVA_HOME_25_X64,JAVA_HOME_11_ARM64,JAVA_HOME_17_ARM64,JAVA_HOME_25_ARM64"
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
# [1.6.0-dev.1](https://github.com/MorpheApp/morphe-patcher/compare/v1.5.3-dev.3...v1.6.0-dev.1) (2026-06-30)


### Features

* Expose APK signing certificates to patches ([#145](https://github.com/MorpheApp/morphe-patcher/issues/145)) ([2284e22](https://github.com/MorpheApp/morphe-patcher/commit/2284e220cea3a701b5dcdcb00ac0643a21fbee73))

## [1.5.3-dev.3](https://github.com/MorpheApp/morphe-patcher/compare/v1.5.3-dev.2...v1.5.3-dev.3) (2026-06-29)


### Bug Fixes

* Don't use --file-per-class when calling D8 to prevent issues with reserved filenames on Windows ([424c041](https://github.com/MorpheApp/morphe-patcher/commit/424c041755ec28980d8f88dd220ae518db7ddd7f))

## [1.5.3-dev.2](https://github.com/MorpheApp/morphe-patcher/compare/v1.5.3-dev.1...v1.5.3-dev.2) (2026-06-29)


### Bug Fixes

* Memory map files using FFM on JDK22+ to fix file locking on Windows ([#143](https://github.com/MorpheApp/morphe-patcher/issues/143)) ([713d342](https://github.com/MorpheApp/morphe-patcher/commit/713d34220f6f78a9b77f5404dbf3bcbc8edc8253))

## [1.5.3-dev.1](https://github.com/MorpheApp/morphe-patcher/compare/v1.5.2...v1.5.3-dev.1) (2026-06-20)


### Bug Fixes

* Show more verbose exception if an instruction from the immutable method is passed to mutable method in `addInstructionsWithLabels()`. Fix wrong label can be used if multiple labels are specified ([d955d8a](https://github.com/MorpheApp/morphe-patcher/commit/d955d8abda5b2624985dd3620a52a83baac10113))

## [1.5.2](https://github.com/MorpheApp/morphe-patcher/compare/v1.5.1...v1.5.2) (2026-06-10)


Expand Down
70 changes: 20 additions & 50 deletions api/morphe-patcher.api
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ public final class app/morphe/patcher/OpcodesFilter$Companion {

public final class app/morphe/patcher/PackageMetadata {
public final fun getPackageName ()Ljava/lang/String;
public final fun getSigningCertificates ()Ljava/util/Map;
public final fun getVersionCode ()Ljava/lang/String;
public final fun getVersionName ()Ljava/lang/String;
}
Expand Down Expand Up @@ -348,6 +349,24 @@ public final class app/morphe/patcher/apk/ApkMerger {
public static synthetic fun merge$default (Lapp/morphe/patcher/apk/ApkMerger;Ljava/io/File;Ljava/io/File;ZLjava/lang/String;ZLjava/lang/Boolean;ZILjava/lang/Object;)V
}

public final class app/morphe/patcher/apk/ApkSignatureScheme {
public static final field Companion Lapp/morphe/patcher/apk/ApkSignatureScheme$Companion;
public fun <init> (I)V
public final fun component1 ()I
public final fun copy (I)Lapp/morphe/patcher/apk/ApkSignatureScheme;
public static synthetic fun copy$default (Lapp/morphe/patcher/apk/ApkSignatureScheme;IILjava/lang/Object;)Lapp/morphe/patcher/apk/ApkSignatureScheme;
public fun equals (Ljava/lang/Object;)Z
public final fun getId ()I
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}

public final class app/morphe/patcher/apk/ApkSignatureScheme$Companion {
public final fun getV2 ()Lapp/morphe/patcher/apk/ApkSignatureScheme;
public final fun getV3 ()Lapp/morphe/patcher/apk/ApkSignatureScheme;
public final fun getV31 ()Lapp/morphe/patcher/apk/ApkSignatureScheme;
}

public final class app/morphe/patcher/apk/ApkSigner {
public static final field INSTANCE Lapp/morphe/patcher/apk/ApkSigner;
public final fun newApkSigner (Ljava/lang/String;Lapp/morphe/patcher/apk/ApkSigner$PrivateKeyCertificatePair;)Lapp/morphe/patcher/apk/ApkSigner$Signer;
Expand Down Expand Up @@ -439,6 +458,7 @@ public final class app/morphe/patcher/dex/SdkDexVerifier$Companion {
public final class app/morphe/patcher/environment/EnvironmentUtils {
public static final field INSTANCE Lapp/morphe/patcher/environment/EnvironmentUtils;
public final fun isAndroidEnvironment ()Z
public final fun isWindowsEnvironment ()Z
}

public final class app/morphe/patcher/extensions/ExtensionsKt {
Expand Down Expand Up @@ -613,9 +633,7 @@ public final class app/morphe/patcher/patch/Compatibility {
public final fun component6 ()Ljava/util/Set;
public final fun component7 ()Ljava/util/List;
public final synthetic fun copy (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lapp/morphe/patcher/patch/ApkFileType;Ljava/lang/Integer;Ljava/util/Set;Ljava/util/List;)Lapp/morphe/patcher/patch/Compatibility;
public final fun copy (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lapp/morphe/patcher/patch/ApkFileType;Ljava/lang/Integer;Ljava/util/Set;Ljava/util/List;Z)Lapp/morphe/patcher/patch/Compatibility;
public static synthetic fun copy$default (Lapp/morphe/patcher/patch/Compatibility;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lapp/morphe/patcher/patch/ApkFileType;Ljava/lang/Integer;Ljava/util/Set;Ljava/util/List;ILjava/lang/Object;)Lapp/morphe/patcher/patch/Compatibility;
public static synthetic fun copy$default (Lapp/morphe/patcher/patch/Compatibility;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lapp/morphe/patcher/patch/ApkFileType;Ljava/lang/Integer;Ljava/util/Set;Ljava/util/List;ZILjava/lang/Object;)Lapp/morphe/patcher/patch/Compatibility;
public fun equals (Ljava/lang/Object;)Z
public final fun excluding ([Ljava/lang/String;)Lapp/morphe/patcher/patch/Compatibility;
public final fun getApkFileType ()Lapp/morphe/patcher/patch/ApkFileType;
Expand Down Expand Up @@ -958,54 +976,6 @@ public final class app/morphe/patcher/resource/XmlPullParserUtilsKt {
public static final fun writeXml (Ljava/io/File;Lkotlin/jvm/functions/Function1;)V
}

public final class app/morphe/patcher/resource/coder/ArsclibResourceCoder : app/morphe/patcher/resource/coder/ResourceCoder {
public fun <init> (Ljava/io/File;Ljava/io/File;Ljava/util/Set;)V
public synthetic fun <init> (Ljava/io/File;Ljava/io/File;Ljava/util/Set;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public fun addFile (Ljava/lang/String;Ljava/io/File;Ljava/lang/String;)Ljava/io/File;
public fun close ()V
public fun decodeRaw ()Lapp/morphe/patcher/PackageMetadata;
public fun decodeResources ()Lapp/morphe/patcher/PackageMetadata;
public fun deleteFile (Ljava/lang/String;Ljava/lang/String;)V
public fun encodeResources (Ljava/io/File;)Ljava/io/File;
public fun getDeletedFiles ()Ljava/util/Set;
public fun getFile (Ljava/lang/String;Ljava/lang/String;Z)Ljava/io/File;
public fun getOtherResourceFiles (Ljava/io/File;Lapp/morphe/patcher/resource/ResourceMode;)Ljava/io/File;
public fun getPackageMetadata ()Lapp/morphe/patcher/PackageMetadata;
public fun getUncompressedFiles ()Ljava/util/Set;
}

public final class app/morphe/patcher/resource/coder/ArsclibResourceCoder$PackageInfo {
public fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;I)V
public final fun getFrameworkVersion ()I
public final fun getPackageName ()Ljava/lang/String;
public final fun getVersionCode ()Ljava/lang/String;
public final fun getVersionName ()Ljava/lang/String;
}

public abstract interface class app/morphe/patcher/resource/coder/ResourceCoder : java/io/Closeable {
public abstract fun addFile (Ljava/lang/String;Ljava/io/File;Ljava/lang/String;)Ljava/io/File;
public static synthetic fun addFile$default (Lapp/morphe/patcher/resource/coder/ResourceCoder;Ljava/lang/String;Ljava/io/File;Ljava/lang/String;ILjava/lang/Object;)Ljava/io/File;
public fun close ()V
public abstract fun decodeRaw ()Lapp/morphe/patcher/PackageMetadata;
public abstract fun decodeResources ()Lapp/morphe/patcher/PackageMetadata;
public abstract fun deleteFile (Ljava/lang/String;Ljava/lang/String;)V
public static synthetic fun deleteFile$default (Lapp/morphe/patcher/resource/coder/ResourceCoder;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)V
public abstract fun encodeResources (Ljava/io/File;)Ljava/io/File;
public abstract fun getDeletedFiles ()Ljava/util/Set;
public abstract fun getFile (Ljava/lang/String;Ljava/lang/String;Z)Ljava/io/File;
public static synthetic fun getFile$default (Lapp/morphe/patcher/resource/coder/ResourceCoder;Ljava/lang/String;Ljava/lang/String;ZILjava/lang/Object;)Ljava/io/File;
public abstract fun getOtherResourceFiles (Ljava/io/File;Lapp/morphe/patcher/resource/ResourceMode;)Ljava/io/File;
public abstract fun getPackageMetadata ()Lapp/morphe/patcher/PackageMetadata;
public abstract fun getUncompressedFiles ()Ljava/util/Set;
}

public final class app/morphe/patcher/resource/coder/ResourceCoder$DefaultImpls {
public static synthetic fun addFile$default (Lapp/morphe/patcher/resource/coder/ResourceCoder;Ljava/lang/String;Ljava/io/File;Ljava/lang/String;ILjava/lang/Object;)Ljava/io/File;
public static fun close (Lapp/morphe/patcher/resource/coder/ResourceCoder;)V
public static synthetic fun deleteFile$default (Lapp/morphe/patcher/resource/coder/ResourceCoder;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)V
public static synthetic fun getFile$default (Lapp/morphe/patcher/resource/coder/ResourceCoder;Ljava/lang/String;Ljava/lang/String;ZILjava/lang/Object;)Ljava/io/File;
}

public final class app/morphe/patcher/util/Document : java/io/Closeable, org/w3c/dom/Document {
public fun adoptNode (Lorg/w3c/dom/Node;)Lorg/w3c/dom/Node;
public fun appendChild (Lorg/w3c/dom/Node;)Lorg/w3c/dom/Node;
Expand Down
12 changes: 12 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ dependencies {

testImplementation(libs.mockk)
testImplementation(libs.kotlin.test)
testImplementation(libs.junit.jupiter.params)
}

kotlin {
Expand All @@ -91,6 +92,17 @@ kotlin {
}

tasks.withType<Test> {
// Allow running the test suite against a specific JDK (e.g. -PtestJavaVersion=11)
// while Gradle itself keeps running on JDK 17+. Used by CI to verify the library
// works across the JDK versions it supports.
providers.gradleProperty("testJavaVersion").orNull?.let { testJavaVersion ->
javaLauncher.set(
javaToolchains.launcherFor {
languageVersion.set(JavaLanguageVersion.of(testJavaVersion.toInt()))
},
)
}

testLogging {
// Uncomment to show println and exception stack traces in unit tests.
// showStandardStreams = true
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
org.gradle.parallel = true
org.gradle.caching = true
version = 1.5.2
version = 1.6.0-dev.1
2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ arsclib = "a28c6fb2a7"
bcpkix-jdk18on = "1.77"
binary-compatibility-validator = "0.18.1"
guava = "33.5.0-jre"
junit = "5.10.1"
kotlin = "2.2.21"
kotlinx-coroutines-core = "1.10.2"
kotlinx-serialization = "1.7.1"
Expand All @@ -23,6 +24,7 @@ kotlin-reflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref =
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines-core" }
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinx-serialization" }
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
junit-jupiter-params = { module = "org.junit.jupiter:junit-jupiter-params", version.ref = "junit" }
mockk = { module = "io.mockk:mockk", version.ref = "mockk" }
smali = { module = "com.github.MorpheApp.smali:smali", version.ref = "smali" }

Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=553c78f50dafcd54d65b9a444649057857469edf836431389695608536d6b746
distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.0-bin.zip
distributionSha256Sum=9c0f7faeeb306cb14e4279a3e084ca6b596894089a0638e68a07c945a32c9e14
distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.1-bin.zip
networkTimeout=10000
retries=0
retryBackOffMs=500
Expand Down
Loading
Loading