diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index ed6c72b..8fa3c66 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,5 +1,5 @@ [versions] -lib = "2.0.0-alpha-03" +lib = "2.0.0-alpha-04" android = "8.1.2" auto-service = "1.1.1" kotlin = "1.9.23" diff --git a/sekret-compiler-plugin/src/main/kotlin/dev/datlag/sekret/generator/DeobfuscatorGenerator.kt b/sekret-compiler-plugin/src/main/kotlin/dev/datlag/sekret/generator/DeobfuscatorGenerator.kt index 06c4db6..fbad4aa 100644 --- a/sekret-compiler-plugin/src/main/kotlin/dev/datlag/sekret/generator/DeobfuscatorGenerator.kt +++ b/sekret-compiler-plugin/src/main/kotlin/dev/datlag/sekret/generator/DeobfuscatorGenerator.kt @@ -50,7 +50,7 @@ object DeobfuscatorGenerator { val varargListOf = listOfFunction.firstNotNullOf { function -> val params = function.owner.valueParameters if (params.isNotEmpty()) { - if (params.single().isVararg) { + if (params.first().isVararg) { function } else { null @@ -76,7 +76,7 @@ object DeobfuscatorGenerator { } val props = irClass?.properties?.toList() ?: emptyList() - valuesField = props.first { + valuesField = props.firstOrNull { it.name == Name.identifier("values") } diff --git a/sekret-gradle-plugin/src/main/java/dev/datlag/sekret/gradle/SekretPlugin.kt b/sekret-gradle-plugin/src/main/java/dev/datlag/sekret/gradle/SekretPlugin.kt index d1c2537..83f05c3 100644 --- a/sekret-gradle-plugin/src/main/java/dev/datlag/sekret/gradle/SekretPlugin.kt +++ b/sekret-gradle-plugin/src/main/java/dev/datlag/sekret/gradle/SekretPlugin.kt @@ -55,7 +55,7 @@ open class SekretPlugin : Plugin { } companion object { - private const val VERSION = "2.0.0-alpha-03" + private const val VERSION = "2.0.0-alpha-04" internal fun getVersion(): String { return runCatching {