1
0
Fork 0
mirror of https://github.com/anyproto/anytype-kotlin.git synced 2025-06-08 05:47:05 +09:00

Tech | CI fixes after SDK updates + library updates (#2073)

This commit is contained in:
Evgenii Kozlov 2022-01-31 19:28:24 +03:00 committed by GitHub
parent 85e1cebce6
commit 4d806ab010
Signed by: github
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 47 additions and 48 deletions

View file

@ -24,11 +24,11 @@ buildscript {
classpath 'com.android.tools.build:gradle:7.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$nav_version"
classpath 'com.google.gms:google-services:4.3.8'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.7.1'
classpath 'com.google.gms:google-services:4.3.10'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1'
classpath "org.jetbrains.dokka:dokka-gradle-plugin:${dokka_version}"
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
classpath 'com.squareup.wire:wire-gradle-plugin:3.5.0'
classpath 'com.squareup.wire:wire-gradle-plugin:4.0.1'
}
}

View file

@ -1,7 +1,7 @@
package com.anytypeio.anytype.core_ui.widgets.text
import android.R.id.paste
import android.R.id.copy
import android.R.id.paste
import android.content.Context
import android.graphics.Canvas
import android.text.InputType

View file

@ -57,7 +57,7 @@ ext {
// Acceptance Testing
runner_version = '1.1.0'
espresso_version = '3.3.0'
android_junit_version = '1.1.0'
android_junit_version = '1.1.3'
disable_animation_version = '2.0.0'
// Development
@ -73,7 +73,7 @@ ext {
protobuf_java_version = '3.9.2'
protoc_version = '3.9.0'
wire_version = '3.7.0'
wire_version = '4.0.1'
// DBB

View file

@ -16,7 +16,6 @@ import com.anytypeio.anytype.middleware.model.CreateWalletResponse
import com.anytypeio.anytype.middleware.model.SelectAccountResponse
import com.anytypeio.anytype.middleware.service.MiddlewareService
import timber.log.Timber
import java.util.*
class Middleware(
private val service: MiddlewareService,
@ -227,7 +226,7 @@ class Middleware(
val detail = Rpc.Block.Set.Details.Detail(
key = nameKey,
value = command.title
value_ = command.title
)
val request = Rpc.Block.Set.Details.Request(
@ -556,12 +555,12 @@ class Middleware(
val emojiDetail = Rpc.Block.Set.Details.Detail(
key = iconEmojiKey,
value = command.emoji
value_ = command.emoji
)
val imageDetail = Rpc.Block.Set.Details.Detail(
key = iconImageKey,
value = null
value_ = null
)
val request = Rpc.Block.Set.Details.Request(
@ -583,11 +582,11 @@ class Middleware(
val imageDetail = Rpc.Block.Set.Details.Detail(
key = iconImageKey,
value = command.hash
value_ = command.hash
)
val emojiDetail = Rpc.Block.Set.Details.Detail(
key = iconEmojiKey,
value = null
value_ = null
)
val request = Rpc.Block.Set.Details.Request(
@ -611,11 +610,11 @@ class Middleware(
): Payload {
val coverIdDetail = Rpc.Block.Set.Details.Detail(
key = coverIdKey,
value = color
value_ = color
)
val coverTypeDetail = Rpc.Block.Set.Details.Detail(
key = coverTypeKey,
value = Constants.COVER_TYPE_COLOR.toDouble()
value_ = Constants.COVER_TYPE_COLOR.toDouble()
)
val request = Rpc.Block.Set.Details.Request(
contextId = ctx,
@ -634,11 +633,11 @@ class Middleware(
): Payload {
val coverIdDetail = Rpc.Block.Set.Details.Detail(
key = coverIdKey,
value = gradient
value_ = gradient
)
val coverTypeDetail = Rpc.Block.Set.Details.Detail(
key = coverTypeKey,
value = Constants.COVER_TYPE_GRADIENT.toDouble()
value_ = Constants.COVER_TYPE_GRADIENT.toDouble()
)
val request = Rpc.Block.Set.Details.Request(
contextId = ctx,
@ -657,11 +656,11 @@ class Middleware(
): Payload {
val coverIdDetail = Rpc.Block.Set.Details.Detail(
key = coverIdKey,
value = hash
value_ = hash
)
val coverTypeDetail = Rpc.Block.Set.Details.Detail(
key = coverTypeKey,
value = Constants.COVER_TYPE_UPLOADED_IMAGE.toDouble()
value_ = Constants.COVER_TYPE_UPLOADED_IMAGE.toDouble()
)
val request = Rpc.Block.Set.Details.Request(
contextId = ctx,
@ -677,11 +676,11 @@ class Middleware(
fun removeDocumentCover(ctx: String): Payload {
val coverIdDetail = Rpc.Block.Set.Details.Detail(
key = coverIdKey,
value = null
value_ = null
)
val coverTypeDetail = Rpc.Block.Set.Details.Detail(
key = coverTypeKey,
value = Constants.COVER_TYPE_NONE.toDouble()
value_ = Constants.COVER_TYPE_NONE.toDouble()
)
val request = Rpc.Block.Set.Details.Request(
contextId = ctx,
@ -697,11 +696,11 @@ class Middleware(
fun removeDocumentIcon(ctx: String): Payload {
val imageDetail = Rpc.Block.Set.Details.Detail(
key = iconImageKey,
value = null
value_ = null
)
val emojiDetail = Rpc.Block.Set.Details.Detail(
key = iconEmojiKey,
value = null
value_ = null
)
val request = Rpc.Block.Set.Details.Request(
@ -1394,7 +1393,7 @@ class Middleware(
): Payload {
val detail = Rpc.Block.Set.Details.Detail(
key = key,
value = value
value_ = value
)
val request = Rpc.Block.Set.Details.Request(
contextId = ctx,

View file

@ -45,11 +45,11 @@ fun anytype.Event.Message.toCoreModels(
Event.Command.GranularChange(
context = context,
id = event.id,
text = event.text?.value,
style = event.style?.value?.toCoreModels(),
color = event.color?.value,
marks = event.marks?.value?.marks?.map { it.toCoreModels() },
checked = event.checked?.value
text = event.text?.value_,
style = event.style?.value_?.toCoreModels(),
color = event.color?.value_,
marks = event.marks?.value_?.marks?.map { it.toCoreModels() },
checked = event.checked?.value_
)
}
blockSetBackgroundColor != null -> {
@ -93,7 +93,7 @@ fun anytype.Event.Message.toCoreModels(
Event.Command.Details.Amend(
context = context,
target = event.id,
details = event.details.associate { it.key to it.value }
details = event.details.associate { it.key to it.value_ }
)
}
objectDetailsUnset != null -> {
@ -111,8 +111,8 @@ fun anytype.Event.Message.toCoreModels(
Event.Command.LinkGranularChange(
context = context,
id = event.id,
target = event.targetBlockId?.value.orEmpty(),
fields = event.fields?.value.toCoreModel()
target = event.targetBlockId?.value_.orEmpty(),
fields = event.fields?.value_.toCoreModel()
)
}
blockSetAlign != null -> {
@ -140,12 +140,12 @@ fun anytype.Event.Message.toCoreModels(
Event.Command.UpdateFileBlock(
context = context,
id = id,
state = state?.value?.toCoreModels(),
type = type?.value?.toCoreModels(),
name = name?.value,
hash = hash?.value,
mime = mime?.value,
size = size?.value
state = state?.value_?.toCoreModels(),
type = type?.value_?.toCoreModels(),
name = name?.value_,
hash = hash?.value_,
mime = mime?.value_,
size = size?.value_
)
}
}
@ -155,11 +155,11 @@ fun anytype.Event.Message.toCoreModels(
Event.Command.BookmarkGranularChange(
context = context,
target = event.id,
url = event.url?.value,
title = event.title?.value,
description = event.description?.value,
image = event.imageHash?.value,
favicon = event.faviconHash?.value
url = event.url?.value_,
title = event.title?.value_,
description = event.description?.value_,
image = event.imageHash?.value_,
favicon = event.faviconHash?.value_
)
}
blockDataviewRecordsSet != null -> {
@ -203,7 +203,7 @@ fun anytype.Event.Message.toCoreModels(
Event.Command.UpdateDividerBlock(
context = context,
id = event.id,
style = style.value.toCoreModels()
style = style.value_.toCoreModels()
)
}
blockDataviewViewSet != null -> {
@ -235,7 +235,7 @@ fun anytype.Event.Message.toCoreModels(
Event.Command.BlockEvent.SetRelation(
context = context,
id = event.id,
key = event.key?.value
key = event.key?.value_
)
}
objectRelationsSet != null -> {

View file

@ -24,7 +24,7 @@ class MiddlewareSubscriptionEventChannel(
if (subscriptions.any { it in event.subIds || "$it$DEPENDENT_SUBSCRIPTION_POST_FIX" in event.subIds }) {
SubscriptionEvent.Amend(
target = event.id,
diff = event.details.associate { it.key to it.value },
diff = event.details.associate { it.key to it.value_ },
subscriptions = event.subIds
)
} else {

View file

@ -361,7 +361,7 @@ fun MDVFilter.toCoreModels(): DVFilter = DVFilter(
relationKey = RelationKey,
operator = operator_.toCoreModels(),
condition = condition.toCoreModels(),
value = value
value = value_
)
fun MDVFilterCondition.toCoreModels(): DVFilterCondition = when (this) {

View file

@ -265,7 +265,7 @@ fun Block.Content.DataView.Filter.toMiddlewareModel(): MDVFilter =
RelationKey = relationKey,
operator_ = operator.toMiddlewareModel(),
condition = condition.toMiddlewareModel(),
value = value
value_ = value
)
fun Block.Content.DataView.Filter.Operator.toMiddlewareModel(): MDVFilterOperator = when (this) {

View file

@ -225,7 +225,7 @@ class MiddlewareTest {
val emojiValue = command.emoji
val emojiDetail = Rpc.Block.Set.Details.Detail(
key = emojiIconKey, value = emojiValue
key = emojiIconKey, value_ = emojiValue
)
val imageValue = ""