generated from ReVanced/revanced-patches-template
-
-
Notifications
You must be signed in to change notification settings - Fork 269
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The previous release depends on a version of ReVanced Patcher which prevents usage of resource patches on lower Android versions. To solve this issue temporarily, until a fix is present, the previous release is reverted.
- Loading branch information
Showing
496 changed files
with
2,555 additions
and
2,429 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,25 @@ | ||
package app.revanced.meta | ||
|
||
import app.revanced.patcher.PatchBundleLoader | ||
import app.revanced.patcher.patch.PatchClass | ||
import app.revanced.patcher.data.Context | ||
import app.revanced.patcher.patch.Patch | ||
import app.revanced.patcher.util.patch.PatchBundle | ||
import java.io.File | ||
|
||
internal typealias PatchBundlePatches = List<PatchClass> | ||
internal typealias PatchBundlePatches = List<Class<out Patch<Context>>> | ||
|
||
internal interface PatchesFileGenerator { | ||
fun generate(bundle: PatchBundlePatches) | ||
|
||
private companion object { | ||
@JvmStatic | ||
fun main(args: Array<String>) = PatchBundleLoader.Jar( | ||
File("build/libs/").listFiles { it -> it.name.endsWith(".jar") }!!.first() | ||
).also { loader -> | ||
if (loader.isEmpty()) throw IllegalStateException("No patches found") | ||
fun main(args: Array<String>) = PatchBundle.Jar( | ||
File("build/libs/").listFiles()!!.first { | ||
it.name.startsWith("revanced-patches-") && it.name.endsWith(".jar") | ||
}.absolutePath | ||
).loadPatches().also { | ||
if (it.isEmpty()) throw IllegalStateException("No patches found") | ||
}.let { bundle -> | ||
arrayOf(JsonGenerator()).forEach { generator -> generator.generate(bundle) } | ||
arrayOf(JsonGenerator()).forEach { it.generate(bundle) } | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.