From ef440c8a9f654383ae67a76f00f49cb487586132 Mon Sep 17 00:00:00 2001 From: Severiano Jaramillo Date: Sun, 5 May 2024 19:37:56 -0700 Subject: [PATCH] Fix project package structure --- .../main/kotlin/net/agorise/kee/ui/screen/home/HomeScreen.kt | 2 +- .../kee/ui/screen/importaccount/ImportAccountScreenModel.kt | 3 +-- .../net/agorise/{shared => library}/crypto/BigIntegerKtx.kt | 2 +- .../kotlin/net/agorise/{shared => library}/crypto/Crc32.kt | 2 +- .../net/agorise/{shared => library}/crypto/bn256/Constants.kt | 2 +- .../net/agorise/{shared => library}/crypto/bn256/GfP.kt | 2 +- .../agorise/{shared => library}/crypto/bn256/GfPGeneric.kt | 2 +- .../net/agorise/{shared => library}/crypto/Crc32Test.kt | 2 +- .../net/agorise/{shared => library}/crypto/bn256/GfPTest.kt | 2 +- library/preferences/build.gradle.kts | 2 +- .../agorise/{shared => library}/preferences/KeePreferences.kt | 2 +- .../net/agorise/{shared => library}/stargate/DeroNode.kt | 2 +- .../agorise/{shared => library}/stargate/StargateBridge.kt | 2 +- .../{shared => library}/stargate/mnemonics/Mnemonics.kt | 4 ++-- .../stargate/mnemonics/MnemonicsEnglish.kt | 2 +- .../stargate/mnemonics/MnemonicsLanguage.kt | 2 +- .../stargate/mnemonics/MnemonicsSpanish.kt | 2 +- .../stargate/mnemonics/MnemonicsDataProvider.kt | 2 +- .../{shared => library}/stargate/mnemonics/MnemonicsTest.kt | 4 ++-- 19 files changed, 21 insertions(+), 22 deletions(-) rename library/crypto/src/main/kotlin/net/agorise/{shared => library}/crypto/BigIntegerKtx.kt (90%) rename library/crypto/src/main/kotlin/net/agorise/{shared => library}/crypto/Crc32.kt (97%) rename library/crypto/src/main/kotlin/net/agorise/{shared => library}/crypto/bn256/Constants.kt (97%) rename library/crypto/src/main/kotlin/net/agorise/{shared => library}/crypto/bn256/GfP.kt (98%) rename library/crypto/src/main/kotlin/net/agorise/{shared => library}/crypto/bn256/GfPGeneric.kt (99%) rename library/crypto/src/test/kotlin/net/agorise/{shared => library}/crypto/Crc32Test.kt (96%) rename library/crypto/src/test/kotlin/net/agorise/{shared => library}/crypto/bn256/GfPTest.kt (98%) rename library/preferences/src/main/kotlin/net/agorise/{shared => library}/preferences/KeePreferences.kt (92%) rename library/stargate/src/main/kotlin/net/agorise/{shared => library}/stargate/DeroNode.kt (86%) rename library/stargate/src/main/kotlin/net/agorise/{shared => library}/stargate/StargateBridge.kt (98%) rename library/stargate/src/main/kotlin/net/agorise/{shared => library}/stargate/mnemonics/Mnemonics.kt (98%) rename library/stargate/src/main/kotlin/net/agorise/{shared => library}/stargate/mnemonics/MnemonicsEnglish.kt (99%) rename library/stargate/src/main/kotlin/net/agorise/{shared => library}/stargate/mnemonics/MnemonicsLanguage.kt (90%) rename library/stargate/src/main/kotlin/net/agorise/{shared => library}/stargate/mnemonics/MnemonicsSpanish.kt (99%) rename library/stargate/src/test/kotlin/net/agorise/{shared => library}/stargate/mnemonics/MnemonicsDataProvider.kt (96%) rename library/stargate/src/test/kotlin/net/agorise/{shared => library}/stargate/mnemonics/MnemonicsTest.kt (98%) diff --git a/app/src/main/kotlin/net/agorise/kee/ui/screen/home/HomeScreen.kt b/app/src/main/kotlin/net/agorise/kee/ui/screen/home/HomeScreen.kt index 645ce3a..60f2336 100644 --- a/app/src/main/kotlin/net/agorise/kee/ui/screen/home/HomeScreen.kt +++ b/app/src/main/kotlin/net/agorise/kee/ui/screen/home/HomeScreen.kt @@ -13,7 +13,7 @@ import cafe.adriel.voyager.navigator.LocalNavigator import net.agorise.kee.ui.component.topappbar.KeeTopAppBar import net.agorise.kee.ui.screen.importaccount.ImportAccountScreen import net.agorise.kee.ui.theme.KeeTheme -import net.agorise.shared.preferences.KeePreferences +import net.agorise.library.preferences.KeePreferences class HomeScreen : Screen { diff --git a/app/src/main/kotlin/net/agorise/kee/ui/screen/importaccount/ImportAccountScreenModel.kt b/app/src/main/kotlin/net/agorise/kee/ui/screen/importaccount/ImportAccountScreenModel.kt index 24955b2..1913298 100644 --- a/app/src/main/kotlin/net/agorise/kee/ui/screen/importaccount/ImportAccountScreenModel.kt +++ b/app/src/main/kotlin/net/agorise/kee/ui/screen/importaccount/ImportAccountScreenModel.kt @@ -3,12 +3,11 @@ package net.agorise.kee.ui.screen.importaccount import cafe.adriel.voyager.core.model.StateScreenModel import cafe.adriel.voyager.core.model.screenModelScope import kotlinx.coroutines.Dispatchers -import kotlinx.coroutines.IO import kotlinx.coroutines.flow.launchIn import kotlinx.coroutines.flow.onEach import kotlinx.coroutines.flow.receiveAsFlow import kotlinx.coroutines.launch -import net.agorise.shared.stargate.StargateBridge +import net.agorise.library.stargate.StargateBridge class ImportAccountScreenModel : StateScreenModel(State()) { diff --git a/library/crypto/src/main/kotlin/net/agorise/shared/crypto/BigIntegerKtx.kt b/library/crypto/src/main/kotlin/net/agorise/library/crypto/BigIntegerKtx.kt similarity index 90% rename from library/crypto/src/main/kotlin/net/agorise/shared/crypto/BigIntegerKtx.kt rename to library/crypto/src/main/kotlin/net/agorise/library/crypto/BigIntegerKtx.kt index 6d1de13..34ce125 100644 --- a/library/crypto/src/main/kotlin/net/agorise/shared/crypto/BigIntegerKtx.kt +++ b/library/crypto/src/main/kotlin/net/agorise/library/crypto/BigIntegerKtx.kt @@ -1,4 +1,4 @@ -package net.agorise.shared.crypto +package net.agorise.library.crypto import java.math.BigInteger diff --git a/library/crypto/src/main/kotlin/net/agorise/shared/crypto/Crc32.kt b/library/crypto/src/main/kotlin/net/agorise/library/crypto/Crc32.kt similarity index 97% rename from library/crypto/src/main/kotlin/net/agorise/shared/crypto/Crc32.kt rename to library/crypto/src/main/kotlin/net/agorise/library/crypto/Crc32.kt index 3d2b2a1..00fbb7d 100644 --- a/library/crypto/src/main/kotlin/net/agorise/shared/crypto/Crc32.kt +++ b/library/crypto/src/main/kotlin/net/agorise/library/crypto/Crc32.kt @@ -1,4 +1,4 @@ -package net.agorise.shared.crypto +package net.agorise.library.crypto /** * Provides functionality to calculate CRC-32 checksums. diff --git a/library/crypto/src/main/kotlin/net/agorise/shared/crypto/bn256/Constants.kt b/library/crypto/src/main/kotlin/net/agorise/library/crypto/bn256/Constants.kt similarity index 97% rename from library/crypto/src/main/kotlin/net/agorise/shared/crypto/bn256/Constants.kt rename to library/crypto/src/main/kotlin/net/agorise/library/crypto/bn256/Constants.kt index c12ef97..dbd15a2 100644 --- a/library/crypto/src/main/kotlin/net/agorise/shared/crypto/bn256/Constants.kt +++ b/library/crypto/src/main/kotlin/net/agorise/library/crypto/bn256/Constants.kt @@ -1,4 +1,4 @@ -package net.agorise.shared.crypto.bn256 +package net.agorise.library.crypto.bn256 import java.math.BigInteger diff --git a/library/crypto/src/main/kotlin/net/agorise/shared/crypto/bn256/GfP.kt b/library/crypto/src/main/kotlin/net/agorise/library/crypto/bn256/GfP.kt similarity index 98% rename from library/crypto/src/main/kotlin/net/agorise/shared/crypto/bn256/GfP.kt rename to library/crypto/src/main/kotlin/net/agorise/library/crypto/bn256/GfP.kt index 4057ca0..8483c7b 100644 --- a/library/crypto/src/main/kotlin/net/agorise/shared/crypto/bn256/GfP.kt +++ b/library/crypto/src/main/kotlin/net/agorise/library/crypto/bn256/GfP.kt @@ -1,6 +1,6 @@ @file:OptIn(ExperimentalUnsignedTypes::class) -package net.agorise.shared.crypto.bn256 +package net.agorise.library.crypto.bn256 /** * GfP implementation ported over from https://github.com/deroproject/derohe/blob/main/cryptography/bn256/gfp.go diff --git a/library/crypto/src/main/kotlin/net/agorise/shared/crypto/bn256/GfPGeneric.kt b/library/crypto/src/main/kotlin/net/agorise/library/crypto/bn256/GfPGeneric.kt similarity index 99% rename from library/crypto/src/main/kotlin/net/agorise/shared/crypto/bn256/GfPGeneric.kt rename to library/crypto/src/main/kotlin/net/agorise/library/crypto/bn256/GfPGeneric.kt index 193313d..6218b43 100644 --- a/library/crypto/src/main/kotlin/net/agorise/shared/crypto/bn256/GfPGeneric.kt +++ b/library/crypto/src/main/kotlin/net/agorise/library/crypto/bn256/GfPGeneric.kt @@ -1,6 +1,6 @@ @file:OptIn(ExperimentalUnsignedTypes::class) -package net.agorise.shared.crypto.bn256 +package net.agorise.library.crypto.bn256 // GfP arithmetic software implementation. We can add hardware implementation later on if necessary. // Ported from https://github.com/deroproject/derohe/blob/main/cryptography/bn256/gfp_generic.go diff --git a/library/crypto/src/test/kotlin/net/agorise/shared/crypto/Crc32Test.kt b/library/crypto/src/test/kotlin/net/agorise/library/crypto/Crc32Test.kt similarity index 96% rename from library/crypto/src/test/kotlin/net/agorise/shared/crypto/Crc32Test.kt rename to library/crypto/src/test/kotlin/net/agorise/library/crypto/Crc32Test.kt index ee0aff4..7962986 100644 --- a/library/crypto/src/test/kotlin/net/agorise/shared/crypto/Crc32Test.kt +++ b/library/crypto/src/test/kotlin/net/agorise/library/crypto/Crc32Test.kt @@ -1,4 +1,4 @@ -package net.agorise.shared.crypto +package net.agorise.library.crypto import kotlin.test.Test import kotlin.test.assertEquals diff --git a/library/crypto/src/test/kotlin/net/agorise/shared/crypto/bn256/GfPTest.kt b/library/crypto/src/test/kotlin/net/agorise/library/crypto/bn256/GfPTest.kt similarity index 98% rename from library/crypto/src/test/kotlin/net/agorise/shared/crypto/bn256/GfPTest.kt rename to library/crypto/src/test/kotlin/net/agorise/library/crypto/bn256/GfPTest.kt index eb981d1..b4e3132 100644 --- a/library/crypto/src/test/kotlin/net/agorise/shared/crypto/bn256/GfPTest.kt +++ b/library/crypto/src/test/kotlin/net/agorise/library/crypto/bn256/GfPTest.kt @@ -1,4 +1,4 @@ -package net.agorise.shared.crypto.bn256 +package net.agorise.library.crypto.bn256 import kotlin.test.Test import kotlin.test.assertEquals diff --git a/library/preferences/build.gradle.kts b/library/preferences/build.gradle.kts index ed85789..346ad54 100644 --- a/library/preferences/build.gradle.kts +++ b/library/preferences/build.gradle.kts @@ -4,7 +4,7 @@ plugins { } android { - namespace = "net.agorise.shared.preferences" + namespace = "net.agorise.library.preferences" compileSdk = libs.versions.android.compileSdk.get().toInt() defaultConfig { diff --git a/library/preferences/src/main/kotlin/net/agorise/shared/preferences/KeePreferences.kt b/library/preferences/src/main/kotlin/net/agorise/library/preferences/KeePreferences.kt similarity index 92% rename from library/preferences/src/main/kotlin/net/agorise/shared/preferences/KeePreferences.kt rename to library/preferences/src/main/kotlin/net/agorise/library/preferences/KeePreferences.kt index b719a00..c0d61ef 100644 --- a/library/preferences/src/main/kotlin/net/agorise/shared/preferences/KeePreferences.kt +++ b/library/preferences/src/main/kotlin/net/agorise/library/preferences/KeePreferences.kt @@ -1,4 +1,4 @@ -package net.agorise.shared.preferences +package net.agorise.library.preferences import com.russhwolf.settings.Settings diff --git a/library/stargate/src/main/kotlin/net/agorise/shared/stargate/DeroNode.kt b/library/stargate/src/main/kotlin/net/agorise/library/stargate/DeroNode.kt similarity index 86% rename from library/stargate/src/main/kotlin/net/agorise/shared/stargate/DeroNode.kt rename to library/stargate/src/main/kotlin/net/agorise/library/stargate/DeroNode.kt index 142003f..8e43546 100644 --- a/library/stargate/src/main/kotlin/net/agorise/shared/stargate/DeroNode.kt +++ b/library/stargate/src/main/kotlin/net/agorise/library/stargate/DeroNode.kt @@ -1,4 +1,4 @@ -package net.agorise.shared.stargate +package net.agorise.library.stargate /** * Represents a Dero node diff --git a/library/stargate/src/main/kotlin/net/agorise/shared/stargate/StargateBridge.kt b/library/stargate/src/main/kotlin/net/agorise/library/stargate/StargateBridge.kt similarity index 98% rename from library/stargate/src/main/kotlin/net/agorise/shared/stargate/StargateBridge.kt rename to library/stargate/src/main/kotlin/net/agorise/library/stargate/StargateBridge.kt index 71ea095..72f8dd2 100644 --- a/library/stargate/src/main/kotlin/net/agorise/shared/stargate/StargateBridge.kt +++ b/library/stargate/src/main/kotlin/net/agorise/library/stargate/StargateBridge.kt @@ -1,4 +1,4 @@ -package net.agorise.shared.stargate +package net.agorise.library.stargate import io.ktor.client.HttpClient import io.ktor.client.engine.cio.CIO diff --git a/library/stargate/src/main/kotlin/net/agorise/shared/stargate/mnemonics/Mnemonics.kt b/library/stargate/src/main/kotlin/net/agorise/library/stargate/mnemonics/Mnemonics.kt similarity index 98% rename from library/stargate/src/main/kotlin/net/agorise/shared/stargate/mnemonics/Mnemonics.kt rename to library/stargate/src/main/kotlin/net/agorise/library/stargate/mnemonics/Mnemonics.kt index 20f16ea..c842cfd 100644 --- a/library/stargate/src/main/kotlin/net/agorise/shared/stargate/mnemonics/Mnemonics.kt +++ b/library/stargate/src/main/kotlin/net/agorise/library/stargate/mnemonics/Mnemonics.kt @@ -1,7 +1,7 @@ -package net.agorise.shared.stargate.mnemonics +package net.agorise.library.stargate.mnemonics import io.ktor.utils.io.core.toByteArray -import net.agorise.shared.crypto.Crc32 +import net.agorise.library.crypto.Crc32 import java.math.BigInteger /** diff --git a/library/stargate/src/main/kotlin/net/agorise/shared/stargate/mnemonics/MnemonicsEnglish.kt b/library/stargate/src/main/kotlin/net/agorise/library/stargate/mnemonics/MnemonicsEnglish.kt similarity index 99% rename from library/stargate/src/main/kotlin/net/agorise/shared/stargate/mnemonics/MnemonicsEnglish.kt rename to library/stargate/src/main/kotlin/net/agorise/library/stargate/mnemonics/MnemonicsEnglish.kt index 527309e..56ec02a 100644 --- a/library/stargate/src/main/kotlin/net/agorise/shared/stargate/mnemonics/MnemonicsEnglish.kt +++ b/library/stargate/src/main/kotlin/net/agorise/library/stargate/mnemonics/MnemonicsEnglish.kt @@ -1,4 +1,4 @@ -package net.agorise.shared.stargate.mnemonics +package net.agorise.library.stargate.mnemonics val mnemonicsEnglish = MnemonicsLanguage( name = "English", diff --git a/library/stargate/src/main/kotlin/net/agorise/shared/stargate/mnemonics/MnemonicsLanguage.kt b/library/stargate/src/main/kotlin/net/agorise/library/stargate/mnemonics/MnemonicsLanguage.kt similarity index 90% rename from library/stargate/src/main/kotlin/net/agorise/shared/stargate/mnemonics/MnemonicsLanguage.kt rename to library/stargate/src/main/kotlin/net/agorise/library/stargate/mnemonics/MnemonicsLanguage.kt index e5fae86..50f4816 100644 --- a/library/stargate/src/main/kotlin/net/agorise/shared/stargate/mnemonics/MnemonicsLanguage.kt +++ b/library/stargate/src/main/kotlin/net/agorise/library/stargate/mnemonics/MnemonicsLanguage.kt @@ -1,4 +1,4 @@ -package net.agorise.shared.stargate.mnemonics +package net.agorise.library.stargate.mnemonics /** * Represents a valid language for mnemonics. diff --git a/library/stargate/src/main/kotlin/net/agorise/shared/stargate/mnemonics/MnemonicsSpanish.kt b/library/stargate/src/main/kotlin/net/agorise/library/stargate/mnemonics/MnemonicsSpanish.kt similarity index 99% rename from library/stargate/src/main/kotlin/net/agorise/shared/stargate/mnemonics/MnemonicsSpanish.kt rename to library/stargate/src/main/kotlin/net/agorise/library/stargate/mnemonics/MnemonicsSpanish.kt index d07d737..560e4ca 100644 --- a/library/stargate/src/main/kotlin/net/agorise/shared/stargate/mnemonics/MnemonicsSpanish.kt +++ b/library/stargate/src/main/kotlin/net/agorise/library/stargate/mnemonics/MnemonicsSpanish.kt @@ -1,4 +1,4 @@ -package net.agorise.shared.stargate.mnemonics +package net.agorise.library.stargate.mnemonics val mnemonicsSpanish = MnemonicsLanguage( name = "EspaƱol", diff --git a/library/stargate/src/test/kotlin/net/agorise/shared/stargate/mnemonics/MnemonicsDataProvider.kt b/library/stargate/src/test/kotlin/net/agorise/library/stargate/mnemonics/MnemonicsDataProvider.kt similarity index 96% rename from library/stargate/src/test/kotlin/net/agorise/shared/stargate/mnemonics/MnemonicsDataProvider.kt rename to library/stargate/src/test/kotlin/net/agorise/library/stargate/mnemonics/MnemonicsDataProvider.kt index 1074eb5..3f17f85 100644 --- a/library/stargate/src/test/kotlin/net/agorise/shared/stargate/mnemonics/MnemonicsDataProvider.kt +++ b/library/stargate/src/test/kotlin/net/agorise/library/stargate/mnemonics/MnemonicsDataProvider.kt @@ -1,4 +1,4 @@ -package net.agorise.shared.stargate.mnemonics +package net.agorise.library.stargate.mnemonics object MnemonicsDataProvider { val invalidSizeSeed = "invalid size seed".split(" ") diff --git a/library/stargate/src/test/kotlin/net/agorise/shared/stargate/mnemonics/MnemonicsTest.kt b/library/stargate/src/test/kotlin/net/agorise/library/stargate/mnemonics/MnemonicsTest.kt similarity index 98% rename from library/stargate/src/test/kotlin/net/agorise/shared/stargate/mnemonics/MnemonicsTest.kt rename to library/stargate/src/test/kotlin/net/agorise/library/stargate/mnemonics/MnemonicsTest.kt index a65f105..6e3f878 100644 --- a/library/stargate/src/test/kotlin/net/agorise/shared/stargate/mnemonics/MnemonicsTest.kt +++ b/library/stargate/src/test/kotlin/net/agorise/library/stargate/mnemonics/MnemonicsTest.kt @@ -1,10 +1,10 @@ -package net.agorise.shared.stargate.mnemonics +package net.agorise.library.stargate.mnemonics import kotlin.test.Test import kotlin.test.assertEquals import kotlin.test.assertFalse import kotlin.test.assertTrue -import net.agorise.shared.crypto.toHexString +import net.agorise.library.crypto.toHexString class MnemonicsTest { private val mnemonics = Mnemonics()