You've already forked revanced-patcher
mirror of
https://github.com/revanced/revanced-patcher
synced 2025-09-10 05:30:49 +02:00
Compare commits
2 Commits
v18.0.0-de
...
v18.0.0-de
Author | SHA1 | Date | |
---|---|---|---|
![]() |
079de45238 | ||
![]() |
56ce9ec2f9 |
@@ -1,3 +1,10 @@
|
||||
# [18.0.0-dev.3](https://github.com/ReVanced/revanced-patcher/compare/v18.0.0-dev.2...v18.0.0-dev.3) (2023-10-22)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* Make `PatchOption#values` nullable ([56ce9ec](https://github.com/ReVanced/revanced-patcher/commit/56ce9ec2f98ff351c3d42df71b49e5c88f07e665))
|
||||
|
||||
# [18.0.0-dev.2](https://github.com/ReVanced/revanced-patcher/compare/v18.0.0-dev.1...v18.0.0-dev.2) (2023-10-22)
|
||||
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
org.gradle.parallel = true
|
||||
org.gradle.caching = true
|
||||
kotlin.code.style = official
|
||||
version = 18.0.0-dev.2
|
||||
version = 18.0.0-dev.3
|
||||
|
@@ -19,7 +19,7 @@ import kotlin.reflect.KProperty
|
||||
open class PatchOption<T>(
|
||||
val key: String,
|
||||
val default: T?,
|
||||
val values: Set<T>,
|
||||
val values: Set<T>?,
|
||||
val title: String?,
|
||||
val description: String?,
|
||||
val required: Boolean,
|
||||
@@ -105,7 +105,7 @@ open class PatchOption<T>(
|
||||
fun <P : Patch<*>> P.stringPatchOption(
|
||||
key: String,
|
||||
default: String? = null,
|
||||
values: Set<String> = emptySet(),
|
||||
values: Set<String>? = null,
|
||||
title: String? = null,
|
||||
description: String? = null,
|
||||
required: Boolean = false,
|
||||
@@ -130,7 +130,7 @@ open class PatchOption<T>(
|
||||
fun <P : Patch<*>> P.intPatchOption(
|
||||
key: String,
|
||||
default: Int? = null,
|
||||
values: Set<Int> = emptySet(),
|
||||
values: Set<Int>? = null,
|
||||
title: String? = null,
|
||||
description: String? = null,
|
||||
required: Boolean = false,
|
||||
@@ -155,7 +155,7 @@ open class PatchOption<T>(
|
||||
fun <P : Patch<*>> P.booleanPatchOption(
|
||||
key: String,
|
||||
default: Boolean? = null,
|
||||
values: Set<Boolean> = emptySet(),
|
||||
values: Set<Boolean>? = null,
|
||||
title: String? = null,
|
||||
description: String? = null,
|
||||
required: Boolean = false,
|
||||
@@ -180,7 +180,7 @@ open class PatchOption<T>(
|
||||
fun <P : Patch<*>> P.floatPatchOption(
|
||||
key: String,
|
||||
default: Float? = null,
|
||||
values: Set<Float> = emptySet(),
|
||||
values: Set<Float>? = null,
|
||||
title: String? = null,
|
||||
description: String? = null,
|
||||
required: Boolean = false,
|
||||
@@ -205,7 +205,7 @@ open class PatchOption<T>(
|
||||
fun <P : Patch<*>> P.longPatchOption(
|
||||
key: String,
|
||||
default: Long? = null,
|
||||
values: Set<Long> = emptySet(),
|
||||
values: Set<Long>? = null,
|
||||
title: String? = null,
|
||||
description: String? = null,
|
||||
required: Boolean = false,
|
||||
@@ -230,7 +230,7 @@ open class PatchOption<T>(
|
||||
fun <P : Patch<*>> P.stringArrayPatchOption(
|
||||
key: String,
|
||||
default: Array<String>? = null,
|
||||
values: Set<Array<String>> = emptySet(),
|
||||
values: Set<Array<String>>? = null,
|
||||
title: String? = null,
|
||||
description: String? = null,
|
||||
required: Boolean = false,
|
||||
@@ -255,7 +255,7 @@ open class PatchOption<T>(
|
||||
fun <P : Patch<*>> P.intArrayPatchOption(
|
||||
key: String,
|
||||
default: Array<Int>? = null,
|
||||
values: Set<Array<Int>> = emptySet(),
|
||||
values: Set<Array<Int>>? = null,
|
||||
title: String? = null,
|
||||
description: String? = null,
|
||||
required: Boolean = false,
|
||||
@@ -280,7 +280,7 @@ open class PatchOption<T>(
|
||||
fun <P : Patch<*>> P.booleanArrayPatchOption(
|
||||
key: String,
|
||||
default: Array<Boolean>? = null,
|
||||
values: Set<Array<Boolean>> = emptySet(),
|
||||
values: Set<Array<Boolean>>? = null,
|
||||
title: String? = null,
|
||||
description: String? = null,
|
||||
required: Boolean = false,
|
||||
@@ -305,7 +305,7 @@ open class PatchOption<T>(
|
||||
fun <P : Patch<*>> P.floatArrayPatchOption(
|
||||
key: String,
|
||||
default: Array<Float>? = null,
|
||||
values: Set<Array<Float>> = emptySet(),
|
||||
values: Set<Array<Float>>? = null,
|
||||
title: String? = null,
|
||||
description: String? = null,
|
||||
required: Boolean = false,
|
||||
@@ -330,7 +330,7 @@ open class PatchOption<T>(
|
||||
fun <P : Patch<*>> P.longArrayPatchOption(
|
||||
key: String,
|
||||
default: Array<Long>? = null,
|
||||
values: Set<Array<Long>> = emptySet(),
|
||||
values: Set<Array<Long>>? = null,
|
||||
title: String? = null,
|
||||
description: String? = null,
|
||||
required: Boolean = false,
|
||||
|
@@ -62,7 +62,7 @@ internal class PatchOptionsTest {
|
||||
@Test
|
||||
fun `should allow setting value from values`() =
|
||||
with(OptionsTestPatch.options["choices"] as PatchOption<String>) {
|
||||
value = values.last()
|
||||
value = values!!.last()
|
||||
assertTrue(value == "valid")
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user