Skip to content

Commit

Permalink
try fix plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton Nazarov committed Jul 26, 2024
1 parent dee44d2 commit ff1438a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion plugin-build/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ID=ru.litres.plugin.publish.samsung
VERSION=0.0.1
VERSION=0.0.2
GROUP=ru.litres.plugin
DISPLAY_NAME=Samsung publisher
DESCRIPTION=Gradle plugin for publish in samsung store
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package ru.litres.publish.samsung.repository
import com.github.kittinunf.fuel.core.FileDataPart
import com.github.kittinunf.fuel.core.extensions.jsonBody
import com.github.kittinunf.fuel.serialization.kotlinxDeserializerOf
import com.github.kittinunf.result.getOrNull
import kotlinx.serialization.json.Json
import kotlinx.serialization.json.encodeToJsonElement
import kotlinx.serialization.json.jsonObject
Expand Down Expand Up @@ -57,7 +58,6 @@ class UpdateAppRepository(
success = { it },
failure = { error ->
println(error)
println(error.errorData.decodeToString())
null
}
)
Expand Down Expand Up @@ -92,13 +92,7 @@ class UpdateAppRepository(
.jsonBody(json.jsonObject.toString())
.responseObject<UpdateDataResponse>(kotlinxDeserializerOf())

val updateResponse = updateResult.third.fold(
success = { it },
failure = {
println(it.errorData.decodeToString())
null
}
)
val updateResponse = updateResult.third.getOrNull()
if (updateResponse?.errorMsg != null) throw UploadApkException(updateResponse.errorMsg)

return updateResponse?.contentStatus == SUCCESS_UPDATE_APK_RESULT
Expand Down

0 comments on commit ff1438a

Please sign in to comment.