mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-04-29 22:24:31 +02:00
chore(JsonPatchesFileGenerator): Match patch list format with ReVanced API 4
This commit is contained in:
parent
bdae48b981
commit
10747f54cf
907
patches.json
907
patches.json
File diff suppressed because it is too large
Load Diff
@ -15,15 +15,17 @@ internal class JsonPatchesFileGenerator : PatchesFileGenerator {
|
|||||||
it.name!!,
|
it.name!!,
|
||||||
it.description,
|
it.description,
|
||||||
it.use,
|
it.use,
|
||||||
|
it.dependencies.map { dependency -> dependency.name ?: dependency.toString() },
|
||||||
it.compatiblePackages?.associate { (packageName, versions) -> packageName to versions },
|
it.compatiblePackages?.associate { (packageName, versions) -> packageName to versions },
|
||||||
it.options.values.map { option ->
|
it.options.values.map { option ->
|
||||||
JsonPatch.Option(
|
JsonPatch.Option(
|
||||||
option.key,
|
option.key,
|
||||||
option.default,
|
|
||||||
option.values,
|
|
||||||
option.title,
|
option.title,
|
||||||
option.description,
|
option.description,
|
||||||
option.required,
|
option.required,
|
||||||
|
option.type.toString(),
|
||||||
|
option.default,
|
||||||
|
option.values,
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
@ -37,16 +39,18 @@ internal class JsonPatchesFileGenerator : PatchesFileGenerator {
|
|||||||
val name: String? = null,
|
val name: String? = null,
|
||||||
val description: String? = null,
|
val description: String? = null,
|
||||||
val use: Boolean = true,
|
val use: Boolean = true,
|
||||||
|
val dependencies: List<String>,
|
||||||
val compatiblePackages: Map<PackageName, Set<VersionName>?>? = null,
|
val compatiblePackages: Map<PackageName, Set<VersionName>?>? = null,
|
||||||
val options: List<Option>,
|
val options: List<Option>,
|
||||||
) {
|
) {
|
||||||
class Option(
|
class Option(
|
||||||
val key: String,
|
val key: String,
|
||||||
val default: Any?,
|
|
||||||
val values: Map<String, Any?>?,
|
|
||||||
val title: String?,
|
val title: String?,
|
||||||
val description: String?,
|
val description: String?,
|
||||||
val required: Boolean,
|
val required: Boolean,
|
||||||
|
val type: String,
|
||||||
|
val default: Any?,
|
||||||
|
val values: Map<String, Any?>?,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user