diff --git a/.gitmodules b/.gitmodules index cd03d0ec3..e69de29bb 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "android-foundation"] - path = android-foundation - url = https://github.com/soramitsu/android-foundation.git diff --git a/android-foundation b/android-foundation deleted file mode 160000 index 193868497..000000000 --- a/android-foundation +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 193868497926d8f7f8e1714d804b4898f34b790e diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 107152d64..f34cdd97c 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -178,7 +178,6 @@ play { dependencies { // implementation(libs.fileTree(dir: 'libs', include: ['*.jar']) - implementation(project(":android-foundation")) implementation(project(":common")) implementation(project(":core_db")) implementation(project(":demeter")) @@ -222,6 +221,7 @@ dependencies { implementation(libs.timberDep) implementation(libs.xsubstrateDep) + implementation(libs.soramitsu.android.foundation) implementation(libs.daggerDep) kapt(libs.daggerKaptDep) diff --git a/common/build.gradle.kts b/common/build.gradle.kts index c1a864169..2da5b1a91 100644 --- a/common/build.gradle.kts +++ b/common/build.gradle.kts @@ -151,7 +151,6 @@ android { } dependencies { - implementation(project(":android-foundation")) implementation(project(":network")) implementation(libs.activityKtxDep) @@ -165,6 +164,7 @@ dependencies { implementation(libs.coroutineDep) implementation(libs.uiCoreDep) + implementation(libs.soramitsu.android.foundation) implementation(libs.kotlinxSerializationJsonDep) diff --git a/common_wallet/build.gradle.kts b/common_wallet/build.gradle.kts index 4bbddb777..56add40fe 100644 --- a/common_wallet/build.gradle.kts +++ b/common_wallet/build.gradle.kts @@ -79,7 +79,6 @@ android { dependencies { // implementation(libs.fileTree(dir: 'libs', include: ['*.jar'])) - implementation(project(":android-foundation")) implementation(project(":common")) implementation(project(":feature_blockexplorer_api")) implementation(project(":core_db")) @@ -93,6 +92,7 @@ dependencies { implementation(libs.coroutineDep) implementation(libs.uiCoreDep) + implementation(libs.soramitsu.android.foundation) implementation(libs.coilSvgDep) @@ -106,9 +106,8 @@ dependencies { implementation(libs.svgDep) implementation(libs.jdenticonDep) - api(libs.soraCardDep) { + api(libs.soramitsu.sora.card) { exclude(group = "com.paywings.onboarding.kyc.android-libs", module = "java-websocket-lib") - exclude(module = "android-foundation") } implementation(libs.daggerDep) diff --git a/core_db/build.gradle.kts b/core_db/build.gradle.kts index 2d5d2eaea..69be73846 100644 --- a/core_db/build.gradle.kts +++ b/core_db/build.gradle.kts @@ -93,7 +93,7 @@ dependencies { ksp(libs.roomKaptDep) androidTestImplementation(project(":test_data")) - androidTestImplementation(project(":android-foundation")) + androidTestImplementation(libs.soramitsu.android.foundation) androidTestImplementation(libs.androidxTestExtJunitDep) androidTestImplementation(libs.androidxTestEspressoCoreDep) androidTestImplementation(libs.archCoreTestDep) diff --git a/demeter/build.gradle.kts b/demeter/build.gradle.kts index a31c0e04e..e718715ce 100644 --- a/demeter/build.gradle.kts +++ b/demeter/build.gradle.kts @@ -76,7 +76,6 @@ android { } dependencies { - implementation(project(":android-foundation")) implementation(project(":common")) implementation(project(":common_wallet")) implementation(project(":core_db")) @@ -96,6 +95,7 @@ dependencies { implementation(libs.coroutineAndroidDep) implementation(libs.xsubstrateDep) + implementation(libs.soramitsu.android.foundation) implementation(libs.composeRuntimeDep) diff --git a/feature_account_impl/build.gradle.kts b/feature_account_impl/build.gradle.kts index 3fdb2e59f..1736bdbf2 100644 --- a/feature_account_impl/build.gradle.kts +++ b/feature_account_impl/build.gradle.kts @@ -65,7 +65,6 @@ android { } dependencies { - implementation(project(":android-foundation")) implementation(project(":common")) implementation(project(":feature_account_api")) implementation(project(":feature_blockexplorer_api")) @@ -74,6 +73,7 @@ dependencies { implementation(libs.xcryptoDep) implementation(libs.xsubstrateDep) + implementation(libs.soramitsu.android.foundation) implementation(libs.daggerDep) kapt(libs.daggerKaptDep) diff --git a/feature_assets_impl/build.gradle.kts b/feature_assets_impl/build.gradle.kts index 30c2f9064..7412823c8 100644 --- a/feature_assets_impl/build.gradle.kts +++ b/feature_assets_impl/build.gradle.kts @@ -76,7 +76,6 @@ android { } dependencies { - implementation(project(":android-foundation")) implementation(project(":common")) implementation(project(":common_wallet")) implementation(project(":core_db")) @@ -93,6 +92,7 @@ dependencies { implementation(libs.xsubstrateDep) implementation(libs.xcryptoDep) + implementation(libs.soramitsu.android.foundation) implementation(libs.appcompatDep) implementation(libs.materialDep) diff --git a/feature_blockexplorer_api/build.gradle.kts b/feature_blockexplorer_api/build.gradle.kts index 9e518d531..17dcef38e 100644 --- a/feature_blockexplorer_api/build.gradle.kts +++ b/feature_blockexplorer_api/build.gradle.kts @@ -76,7 +76,6 @@ android { } dependencies { - implementation(project(":android-foundation")) implementation(project(":common")) implementation(project(":core_db")) implementation(project(":network")) @@ -93,6 +92,7 @@ dependencies { implementation(libs.viewmodelKtxDep) implementation(libs.uiCoreDep) + implementation(libs.soramitsu.android.foundation) implementation(libs.navigationComposeDep) implementation(platform(libs.compose.bom)) diff --git a/feature_blockexplorer_api/src/main/java/jp/co/soramitsu/feature_blockexplorer_api/data/SoraConfigManager.kt b/feature_blockexplorer_api/src/main/java/jp/co/soramitsu/feature_blockexplorer_api/data/SoraConfigManager.kt index 3386edb6d..769dff4c9 100644 --- a/feature_blockexplorer_api/src/main/java/jp/co/soramitsu/feature_blockexplorer_api/data/SoraConfigManager.kt +++ b/feature_blockexplorer_api/src/main/java/jp/co/soramitsu/feature_blockexplorer_api/data/SoraConfigManager.kt @@ -44,7 +44,7 @@ import jp.co.soramitsu.feature_blockexplorer_api.data.models.SoraConfig import jp.co.soramitsu.feature_blockexplorer_api.data.models.SoraConfigNode import jp.co.soramitsu.feature_blockexplorer_api.data.models.SoraCurrency import jp.co.soramitsu.xnetworking.lib.engines.rest.api.RestClient -import jp.co.soramitsu.xnetworking.lib.engines.utils.JsonGetRequest +import jp.co.soramitsu.xnetworking.lib.engines.utils.getAsString import kotlinx.serialization.DeserializationStrategy import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @@ -124,12 +124,7 @@ class SoraConfigManager @Inject constructor( deserializer: () -> DeserializationStrategy ): T? { val result = runCatching { - restClient.getReturnString( - JsonGetRequest( - url = url(), - responseDeserializer = String.serializer() - ) - ) + restClient.getAsString(url()) }.onSuccess { configAsString -> soraPreferences.putString( field = nameToSaveWith(), diff --git a/feature_blockexplorer_impl/build.gradle.kts b/feature_blockexplorer_impl/build.gradle.kts index c39d27dc1..8bb6ea06e 100644 --- a/feature_blockexplorer_impl/build.gradle.kts +++ b/feature_blockexplorer_impl/build.gradle.kts @@ -77,7 +77,6 @@ android { dependencies { - implementation(project(":android-foundation")) implementation(project(":common")) implementation(project(":sorasubstrate")) implementation(project(":feature_assets_api")) @@ -99,6 +98,7 @@ dependencies { implementation(libs.viewmodelKtxDep) implementation(libs.uiCoreDep) + implementation(libs.soramitsu.android.foundation) implementation(libs.navigationComposeDep) implementation(platform(libs.compose.bom)) diff --git a/feature_ecosystem_impl/build.gradle.kts b/feature_ecosystem_impl/build.gradle.kts index daf26999c..a1a177772 100644 --- a/feature_ecosystem_impl/build.gradle.kts +++ b/feature_ecosystem_impl/build.gradle.kts @@ -76,7 +76,6 @@ android { } dependencies { - implementation(project(":android-foundation")) implementation(project(":common")) implementation(project(":demeter")) implementation(project(":common_wallet")) @@ -119,6 +118,7 @@ dependencies { kapt(libs.lifecycleKaptDep) implementation(libs.uiCoreDep) + implementation(libs.soramitsu.android.foundation) implementation(platform(libs.compose.bom)) implementation(libs.composeUiDep) diff --git a/feature_main_impl/build.gradle.kts b/feature_main_impl/build.gradle.kts index bd95d5a4d..27f15be1b 100644 --- a/feature_main_impl/build.gradle.kts +++ b/feature_main_impl/build.gradle.kts @@ -76,7 +76,6 @@ android { } dependencies { - implementation(project(":android-foundation")) implementation(project(":common")) implementation(project(":common_wallet")) implementation(project(":core_db")) @@ -99,6 +98,7 @@ dependencies { implementation(libs.biometricDep) implementation(libs.uiCoreDep) + implementation(libs.soramitsu.android.foundation) implementation(libs.coreKtxDep) diff --git a/feature_multiaccount_impl/build.gradle.kts b/feature_multiaccount_impl/build.gradle.kts index c0dc4dee6..a775fea21 100644 --- a/feature_multiaccount_impl/build.gradle.kts +++ b/feature_multiaccount_impl/build.gradle.kts @@ -81,7 +81,6 @@ android { dependencies { - implementation(project(":android-foundation")) implementation(project(":common")) implementation(project(":feature_assets_api")) implementation(project(":feature_account_api")) @@ -105,6 +104,7 @@ dependencies { implementation(libs.viewmodelKtxDep) implementation(libs.uiCoreDep) + implementation(libs.soramitsu.android.foundation) implementation(libs.coilDep) implementation(libs.coilComposeDep) diff --git a/feature_polkaswap_impl/build.gradle.kts b/feature_polkaswap_impl/build.gradle.kts index c52473545..1ddc98b0d 100644 --- a/feature_polkaswap_impl/build.gradle.kts +++ b/feature_polkaswap_impl/build.gradle.kts @@ -77,7 +77,6 @@ android { dependencies { - implementation(project(":android-foundation")) implementation(project(":common")) implementation(project(":common_wallet")) implementation(project(":core_db")) @@ -93,6 +92,7 @@ dependencies { implementation(libs.xsubstrateDep) implementation(libs.xcryptoDep) + implementation(libs.soramitsu.android.foundation) implementation(libs.appcompatDep) implementation(libs.materialDep) diff --git a/feature_referral_impl/build.gradle.kts b/feature_referral_impl/build.gradle.kts index 1dc70c514..ae4201185 100644 --- a/feature_referral_impl/build.gradle.kts +++ b/feature_referral_impl/build.gradle.kts @@ -77,7 +77,6 @@ android { dependencies { - implementation(project(":android-foundation")) implementation(project(":common")) implementation(project(":core_db")) implementation(project(":feature_assets_api")) @@ -98,6 +97,7 @@ dependencies { implementation(libs.viewmodelKtxDep) implementation(libs.uiCoreDep) + implementation(libs.soramitsu.android.foundation) implementation(libs.navigationComposeDep) implementation(platform(libs.compose.bom)) diff --git a/feature_select_node_impl/build.gradle.kts b/feature_select_node_impl/build.gradle.kts index c20b10f5b..40555eb5a 100644 --- a/feature_select_node_impl/build.gradle.kts +++ b/feature_select_node_impl/build.gradle.kts @@ -76,7 +76,6 @@ android { } dependencies { - implementation(project(":android-foundation")) implementation(project(":common")) implementation(project(":feature_select_node_api")) implementation(project(":feature_main_api")) @@ -100,6 +99,7 @@ dependencies { implementation(libs.navigationUiDep) implementation(libs.xsubstrateDep) + implementation(libs.soramitsu.android.foundation) implementation(libs.roomDep) implementation(libs.roomKtxDep) diff --git a/feature_sora_card_impl/build.gradle.kts b/feature_sora_card_impl/build.gradle.kts index f40ceb645..3fb9f7b22 100644 --- a/feature_sora_card_impl/build.gradle.kts +++ b/feature_sora_card_impl/build.gradle.kts @@ -76,7 +76,6 @@ android { } dependencies { - implementation(project(":android-foundation")) implementation(project(":common")) implementation(project(":common_wallet")) implementation(project(":demeter")) @@ -106,6 +105,7 @@ dependencies { implementation(libs.navigationUiDep) implementation(libs.uiCoreDep) + implementation(libs.soramitsu.android.foundation) implementation(libs.timberDep) diff --git a/feature_wallet_impl/build.gradle.kts b/feature_wallet_impl/build.gradle.kts index 393319405..93ea84af1 100644 --- a/feature_wallet_impl/build.gradle.kts +++ b/feature_wallet_impl/build.gradle.kts @@ -80,7 +80,6 @@ android { } dependencies { - implementation(project(":android-foundation")) implementation(project(":common")) implementation(project(":common_wallet")) implementation(project(":core_db")) @@ -99,6 +98,7 @@ dependencies { implementation(libs.xsubstrateDep) implementation(libs.xcryptoDep) + implementation(libs.soramitsu.android.foundation) implementation(libs.appcompatDep) implementation(libs.materialDep) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index fc48ed339..4f50f0208 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,7 +1,7 @@ [versions] -agp = "8.5.1" +agp = "8.6.0" kotlin = "1.9.24" -appcompat = "1.6.1" +appcompat = "1.7.0" coroutines = "1.8.1" coreKtx = "1.13.1" constraint = "2.2.0-alpha05" @@ -10,21 +10,21 @@ navigation = "2.7.7" navigationCompose = "2.7.7" lottie = "4.2.0" insetter = "0.6.1" -workManager = "2.9.0" +workManager = "2.9.1" coil = "2.2.2" svg = "1.4" jdenticon = "1.1" -archFragmentTest = "1.7.1" +archFragmentTest = "1.8.2" mockk = "1.13.8" truth = "1.4.2" mockitoKotlin = "5.2.1" mockito = "5.2.0" junit = "4.13.2" -androidxTestExtJunit = "1.1.5" -androidxTestEspressoCore = "3.5.1" +androidxTestExtJunit = "1.2.1" +androidxTestEspressoCore = "3.6.1" archCoreTest = "2.2.0" archComponents = "2.7.0" -activityCompose = "1.9.0" +activityCompose = "1.9.1" material = "1.12.0" fragmentKtx = "1.7.1" permission = "1.7.1" @@ -38,24 +38,18 @@ firebaseCrashlytics = "2.9.9" firebaseAppDistribution = "3.2.0" tripletVersion = "3.8.4" timber = "5.0.1" -ktor = "2.3.1" -soracard = "1.1.16" -xnetworkingLib = "1.0.7" -xsubstrate = "1.2.7" -uicore = "0.2.32" -xbackup = "1.2.2" -xcrypto = "1.2.6" +ktor = "2.3.2" ed = "2.0.1" xerces = "2.9.0" -dagger = "2.49" -daggerKapt = "2.49" +dagger = "2.52" +daggerKapt = "2.52" hiltCompose = "1.2.0" hiltWorkManager = "1.2.0" webSocketLib = "2.14" web3j = "4.6.0-android" zXing = "3.3.3" zXingEmbedded = "4.3.0" -activityKtx = "1.9.0" +activityKtx = "1.9.1" xserializationjson = "1.6.3" gson = "2.10.1" datastore = "1.0.0" @@ -63,8 +57,22 @@ room = "2.6.1" lazySodium = "5.0.2" jna = "5.8.0" kover = "0.7.5" +soramitsuSoracard = "1.1.18" +soramitsuXnetworking = "1.0.9" +soramitsuXsubstrate = "1.2.7" +soramitsuUicore = "0.2.34" +soramitsuXbackup = "1.2.2" +soramitsuXcrypto = "1.2.6" +soramitsuAndroidFoundation = "0.0.1" [libraries] +soramitsu-android-foundation = { module = "jp.co.soramitsu:android-foundation", version.ref = "soramitsuAndroidFoundation" } +soramitsu-sora-card = { module = "jp.co.soramitsu:android-sora-card", version.ref = "soramitsuSoracard" } +xnetworkingLibDep = { module = "jp.co.soramitsu.xnetworking:lib-android", version.ref = "soramitsuXnetworking" } +xsubstrateDep = { module = "jp.co.soramitsu:xsubstrate", version.ref = "soramitsuXsubstrate" } +uiCoreDep = { module = "jp.co.soramitsu:ui-core", version.ref = "soramitsuUicore" } +xbackupDep = { module = "jp.co.soramitsu:xbackup", version.ref = "soramitsuXbackup" } +xcryptoDep = { module = "jp.co.soramitsu:xcrypto", version.ref = "soramitsuXcrypto" } roomDep = { module = "androidx.room:room-runtime", version.ref = "room" } roomKaptDep = { module = "androidx.room:room-compiler", version.ref = "room" } roomKtxDep = { module = "androidx.room:room-ktx", version.ref = "room" } @@ -92,12 +100,6 @@ ktorLoggingDep = { module = "io.ktor:ktor-client-logging", version.ref = "ktor" ktorContentNegotiationDep = { module = "io.ktor:ktor-client-content-negotiation", version.ref = "ktor" } ktorOkHttpDep = { module = "io.ktor:ktor-client-okhttp", version.ref = "ktor" } ktorWebSocketDep = { module = "io.ktor:ktor-client-websockets", version.ref = "ktor" } -soraCardDep = { module = "jp.co.soramitsu:android-sora-card", version.ref = "soracard" } -xnetworkingLibDep = { module = "jp.co.soramitsu.xnetworking:lib-android", version.ref = "xnetworkingLib" } -xsubstrateDep = { module = "jp.co.soramitsu:xsubstrate", version.ref = "xsubstrate" } -uiCoreDep = { module = "jp.co.soramitsu:ui-core", version.ref = "uicore" } -xbackupDep = { module = "jp.co.soramitsu:xbackup", version.ref = "xbackup" } -xcryptoDep = { module = "jp.co.soramitsu:xcrypto", version.ref = "xcrypto" } ed25519Dep = { module = "com.github.warchant:ed25519-sha3-java", version.ref = "ed" } xercesDep = { module = "org.eclipse.birt.runtime.3_7_1:org.apache.xerces", version.ref = "xerces" } timberDep = { module = "com.jakewharton.timber:timber", version.ref = "timber" } diff --git a/settings.gradle.kts b/settings.gradle.kts index 75272dd6a..fcc5a2b64 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -43,7 +43,6 @@ dependencyResolutionManagement { } rootProject.name = "passport-android" -include(":android-foundation") include(":app") include(":common") include(":common_wallet") diff --git a/sorasubstrate/build.gradle.kts b/sorasubstrate/build.gradle.kts index 371349f53..e77365650 100644 --- a/sorasubstrate/build.gradle.kts +++ b/sorasubstrate/build.gradle.kts @@ -65,7 +65,6 @@ android { dependencies { - implementation(project(":android-foundation")) implementation(project(":common")) implementation(project(":common_wallet")) implementation(project(":feature_blockexplorer_api")) @@ -74,6 +73,7 @@ dependencies { implementation(libs.xsubstrateDep) implementation(libs.xcryptoDep) implementation(libs.xnetworkingLibDep) + implementation(libs.soramitsu.android.foundation) implementation(libs.gsonDep) implementation(libs.webSocketLibDep) diff --git a/sorasubstrate/src/main/java/jp/co/soramitsu/sora/substrate/runtime/RuntimeManager.kt b/sorasubstrate/src/main/java/jp/co/soramitsu/sora/substrate/runtime/RuntimeManager.kt index 9d3983ead..977b4d8ed 100644 --- a/sorasubstrate/src/main/java/jp/co/soramitsu/sora/substrate/runtime/RuntimeManager.kt +++ b/sorasubstrate/src/main/java/jp/co/soramitsu/sora/substrate/runtime/RuntimeManager.kt @@ -42,7 +42,7 @@ import jp.co.soramitsu.common.io.FileManager import jp.co.soramitsu.common.logger.FirebaseWrapper import jp.co.soramitsu.feature_blockexplorer_api.data.SoraConfigManager import jp.co.soramitsu.xnetworking.lib.engines.rest.api.RestClient -import jp.co.soramitsu.xnetworking.lib.engines.utils.JsonGetRequest +import jp.co.soramitsu.xnetworking.lib.engines.utils.getAsString import jp.co.soramitsu.xsubstrate.runtime.RuntimeSnapshot import jp.co.soramitsu.xsubstrate.runtime.definitions.TypeDefinitionParser import jp.co.soramitsu.xsubstrate.runtime.definitions.TypeDefinitionsTree @@ -72,7 +72,6 @@ import kotlinx.coroutines.launch import kotlinx.coroutines.sync.Mutex import kotlinx.coroutines.sync.withLock import kotlinx.coroutines.withContext -import kotlinx.serialization.builtins.serializer private const val DEFAULT_TYPES_FILE = "default_types.json" private const val SORA2_TYPES_FILE = "types_scalecodec_mobile.json" @@ -197,11 +196,8 @@ class RuntimeManager @Inject constructor( } is MetadataSource.SoraNet -> { - val sora2Types = restClient.getReturnString( - JsonGetRequest( - url = soraConfigManager.getSubstrateTypesUrl(), - responseDeserializer = String.serializer() - ) + val sora2Types = restClient.getAsString( + soraConfigManager.getSubstrateTypesUrl() ) buildTypeRegistry14(sora2Types, runtimeMetadataReader, runtimeVersion).also { saveToCache(SORA2_TYPES_FILE, sora2Types)