mirror of
https://github.com/revanced/revanced-patches
synced 2024-07-06 05:42:00 +02:00
Co-authored-by: Ushie <ushiekane@gmail.com> Co-authored-by: aAbed <aabedhkhan@gmail.com> Co-authored-by: CnC-Robert <CnC.Rob3rt@gmail.com>
20 lines
651 B
Kotlin
20 lines
651 B
Kotlin
package app.revanced.meta
|
|
|
|
import app.revanced.patcher.PatchBundleLoader
|
|
import app.revanced.patcher.PatchSet
|
|
import java.io.File
|
|
|
|
internal interface PatchesFileGenerator {
|
|
fun generate(patches: PatchSet)
|
|
|
|
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")
|
|
}.let { bundle ->
|
|
arrayOf(JsonGenerator()).forEach { generator -> generator.generate(bundle) }
|
|
}
|
|
}
|
|
} |