mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-25 16:07:12 -07:00
First try at running under Java 9.
This commit is contained in:
parent
86e39cbb58
commit
c99a9eb6cd
4 changed files with 45 additions and 40 deletions
|
@ -86,12 +86,12 @@ class GithubApi2 @Inject constructor(
|
|||
.execute()
|
||||
val code = response.code()
|
||||
if (code != Http.CREATED) {
|
||||
val error = Gson().fromJson(response.errorBody().string(), RetrofitError::class.java)
|
||||
val error = Gson().fromJson(response.errorBody()?.string(), RetrofitError::class.java)
|
||||
throw KobaltException("Couldn't upload release, ${error.message}: " + error.errors[0].code)
|
||||
} else {
|
||||
val body = response.body()
|
||||
|
||||
uploadAsset(accessToken, body.uploadUrl!!, Http.TypedFile("application/zip", zipFile), tagName)
|
||||
uploadAsset(accessToken, body?.uploadUrl!!, Http.TypedFile("application/zip", zipFile), tagName)
|
||||
.toBlocking()
|
||||
.forEach { action ->
|
||||
kobaltLog(1, "\n${zipFile.name} successfully uploaded")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue