Skip to content

Commit

Permalink
chore: update Apollo version
Browse files Browse the repository at this point in the history
Signed-off-by: Ahmed Moussa <ahmed.moussa@iohk.io>
  • Loading branch information
hamada147 committed Mar 19, 2024
1 parent 629075a commit 22bb989
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -557,9 +557,9 @@ constructor(
customUnderlyingErrors: Array<Error>
) : MercuryError(
message = "DIDComm error has occurred with message: $customMessage\nErrors: ${
customUnderlyingErrors.joinToString(
separator = "\n"
) { it.errorDescription ?: "" }
customUnderlyingErrors.joinToString(
separator = "\n"
) { it.errorDescription ?: "" }
}"
) {
override val code: Int
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@file:Suppress("ktlint:standard:import-ordering")

package io.iohk.atala.prism.walletsdk.prismagent

/* ktlint-disable import-ordering */
import anoncreds_wrapper.CredentialOffer
import anoncreds_wrapper.CredentialRequestMetadata
import anoncreds_wrapper.LinkSecret
Expand Down Expand Up @@ -84,8 +85,6 @@ import kotlinx.serialization.json.Json
import kotlinx.serialization.json.JsonObject
import kotlinx.serialization.json.jsonObject

/* ktlint-disable import-ordering */

/**
* Check if the passed URL is valid or not.
* @param str string to check its URL validity
Expand Down Expand Up @@ -1015,6 +1014,9 @@ class PrismAgent {
* Enumeration representing the current state of the agent.
*/
enum class State {
STOPPED, STARTING, RUNNING, STOPPING
STOPPED,
STARTING,
RUNNING,
STOPPING
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@file:Suppress("ktlint:standard:import-ordering")

package io.iohk.atala.prism.walletsdk.mercury

/* ktlint-disable import-ordering */
import io.iohk.atala.prism.walletsdk.domain.buildingblocks.Pluto
import io.iohk.atala.prism.walletsdk.domain.models.DID
import io.iohk.atala.prism.walletsdk.domain.models.DIDPair
Expand All @@ -16,8 +17,6 @@ import io.iohk.atala.prism.walletsdk.pluto.CredentialRecovery
import io.iohk.atala.prism.walletsdk.pluto.data.AvailableClaims
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.flow
/* ktlint-disable import-ordering */

class PlutoMock : Pluto {
var privateKeys = mutableListOf<PrivateKey>()

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@file:Suppress("ktlint:standard:import-ordering")

package io.iohk.atala.prism.walletsdk.prismagent

/* ktlint-disable import-ordering */
import anoncreds_wrapper.LinkSecret
import io.iohk.atala.prism.apollo.derivation.MnemonicHelper
import io.iohk.atala.prism.walletsdk.apollo.ApolloImpl
Expand Down Expand Up @@ -39,8 +40,6 @@ import kotlin.test.assertFailsWith
import kotlin.test.assertFalse
import kotlin.test.assertTrue

/* ktlint-disable import-ordering */

@OptIn(kotlinx.coroutines.ExperimentalCoroutinesApi::class)
class PrismAgentTests {

Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
id("com.android.library") version "8.1.4" apply false
kotlin("jvm") version "1.9.22"
kotlin("plugin.serialization") version "1.8.20"
id("org.jlleitschuh.gradle.ktlint") version "11.5.1"
id("org.jlleitschuh.gradle.ktlint") version "12.1.0"
id("org.jetbrains.dokka") version "1.9.0"
id("org.jetbrains.kotlin.kapt") version "1.9.10"
id("maven-publish")
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kotlin.code.style = official
android.useAndroidX = true
kotlin.mpp.enableCInteropCommonization = true
kotlin.native.cacheKind.iosSimulatorArm64 = none
apollo_version = 1.2.11
apollo_version = 1.2.12
didpeer_version = 1.1.2
kotlin.mpp.androidSourceSetLayoutVersion = 2
kotlinx.atomicfu.enableJvmIrTransformation = true
Expand Down
4 changes: 3 additions & 1 deletion protosLib/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import com.google.protobuf.gradle.* // ktlint-disable no-wildcard-imports
@file:Suppress("ktlint:standard:no-wildcard-imports")

import com.google.protobuf.gradle.*
import org.gradle.internal.os.OperatingSystem

val os: OperatingSystem = OperatingSystem.current()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import androidx.room.Room

object DatabaseClient {
@Volatile
private var INSTANCE: AppDatabase? = null
private var instance: AppDatabase? = null

fun initializeInstance(context: Context) {
if (INSTANCE == null) {
if (instance == null) {
synchronized(AppDatabase::class.java) {
if (INSTANCE == null) {
INSTANCE = Room.databaseBuilder(
if (instance == null) {
instance = Room.databaseBuilder(
context.applicationContext,
AppDatabase::class.java,
"database-name"
Expand All @@ -22,6 +22,6 @@ object DatabaseClient {
}

fun getInstance(): AppDatabase {
return INSTANCE ?: throw IllegalStateException("Database has not been initialized.")
return instance ?: throw IllegalStateException("Database has not been initialized.")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ class MessagesViewModel(application: Application) : AndroidViewModel(application
)
val time = LocalDateTime.now()
val message = Message(
piuri = "https://didcomm.org/basicmessage/2.0/message", // TODO: This should be on ProtocolTypes as an enum
// TODO: This should be on ProtocolTypes as an enum
piuri = "https://didcomm.org/basicmessage/2.0/message",
from = did,
to = did,
body = "{\"msg\":\"This is a new test message ${time}\"}"
Expand Down

0 comments on commit 22bb989

Please sign in to comment.