diff --git a/.idea/gradle.xml b/.idea/gradle.xml index 5870143..b5383fd 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -11,8 +11,10 @@ diff --git a/common-datasource/.gitignore b/common-datasource/.gitignore new file mode 100644 index 0000000..42afabf --- /dev/null +++ b/common-datasource/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/common-datasource/build.gradle.kts b/common-datasource/build.gradle.kts new file mode 100644 index 0000000..9d28d6c --- /dev/null +++ b/common-datasource/build.gradle.kts @@ -0,0 +1,69 @@ +plugins { + alias(libs.plugins.android.library) + alias(libs.plugins.kotlin.android) + alias(libs.plugins.kotlin.compose) + alias(libs.plugins.hilt.android) + id("kotlin-kapt") +} + +android { + namespace = "ke.don.common_datasource" + compileSdk = 35 + + defaultConfig { + minSdk = 24 + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + consumerProguardFiles("consumer-rules.pro") + } + + buildTypes { + release { + isMinifyEnabled = false + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro" + ) + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + kotlinOptions { + jvmTarget = "11" + } + buildFeatures { + compose = true + } + composeOptions { + kotlinCompilerExtensionVersion = "1.5.1" + } +} + +dependencies { + + implementation(libs.androidx.core.ktx) + implementation(libs.androidx.appcompat) + implementation(libs.material) + implementation(libs.androidx.lifecycle.runtime.ktx) + implementation(libs.androidx.activity.compose) + implementation(platform(libs.androidx.compose.bom)) + implementation(libs.androidx.ui) + implementation(libs.androidx.ui.graphics) + implementation(libs.androidx.ui.tooling.preview) + implementation(libs.androidx.material3) + implementation(libs.androidx.material.icons.extended) + implementation(libs.kotlinx.coroutines.core) + + //Dagger Hilt + implementation(libs.hilt.android) + implementation(libs.androidx.runtime.livedata) + kapt(libs.hilt.android.compiler) + implementation(libs.androidx.hilt.navigation.compose) + + implementation(libs.material) + testImplementation(libs.junit) + androidTestImplementation(libs.androidx.junit) + androidTestImplementation(libs.androidx.espresso.core) +} \ No newline at end of file diff --git a/common-datasource/consumer-rules.pro b/common-datasource/consumer-rules.pro new file mode 100644 index 0000000..e69de29 diff --git a/common-datasource/proguard-rules.pro b/common-datasource/proguard-rules.pro new file mode 100644 index 0000000..481bb43 --- /dev/null +++ b/common-datasource/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/common-datasource/src/androidTest/java/ke/don/common_datasource/ExampleInstrumentedTest.kt b/common-datasource/src/androidTest/java/ke/don/common_datasource/ExampleInstrumentedTest.kt new file mode 100644 index 0000000..55f9c21 --- /dev/null +++ b/common-datasource/src/androidTest/java/ke/don/common_datasource/ExampleInstrumentedTest.kt @@ -0,0 +1,24 @@ +package ke.don.common_datasource + +import androidx.test.platform.app.InstrumentationRegistry +import androidx.test.ext.junit.runners.AndroidJUnit4 + +import org.junit.Test +import org.junit.runner.RunWith + +import org.junit.Assert.* + +/** + * Instrumented test, which will execute on an Android device. + * + * See [testing documentation](http://d.android.com/tools/testing). + */ +@RunWith(AndroidJUnit4::class) +class ExampleInstrumentedTest { + @Test + fun useAppContext() { + // Context of the app under test. + val appContext = InstrumentationRegistry.getInstrumentation().targetContext + assertEquals("ke.don.common_datasource.test", appContext.packageName) + } +} \ No newline at end of file diff --git a/common-datasource/src/main/AndroidManifest.xml b/common-datasource/src/main/AndroidManifest.xml new file mode 100644 index 0000000..a5918e6 --- /dev/null +++ b/common-datasource/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/common-datasource/src/test/java/ke/don/common_datasource/ExampleUnitTest.kt b/common-datasource/src/test/java/ke/don/common_datasource/ExampleUnitTest.kt new file mode 100644 index 0000000..0bee9d7 --- /dev/null +++ b/common-datasource/src/test/java/ke/don/common_datasource/ExampleUnitTest.kt @@ -0,0 +1,17 @@ +package ke.don.common_datasource + +import org.junit.Test + +import org.junit.Assert.* + +/** + * Example local unit test, which will execute on the development machine (host). + * + * See [testing documentation](http://d.android.com/tools/testing). + */ +class ExampleUnitTest { + @Test + fun addition_isCorrect() { + assertEquals(4, 2 + 2) + } +} \ No newline at end of file diff --git a/common-domain/.gitignore b/common-domain/.gitignore index 42afabf..a020a2e 100644 --- a/common-domain/.gitignore +++ b/common-domain/.gitignore @@ -1 +1,3 @@ -/build \ No newline at end of file +/build +/src/main/java/ke.don.shared_domain/values/Secrets.kt +/src/main/java/ke/don/shared_domain/values/Secrets.kt \ No newline at end of file diff --git a/common-domain/src/main/java/ke/don/shared_domain/screens/logger/Logger.kt b/common-domain/src/main/java/ke/don/shared_domain/logger/Logger.kt similarity index 72% rename from common-domain/src/main/java/ke/don/shared_domain/screens/logger/Logger.kt rename to common-domain/src/main/java/ke/don/shared_domain/logger/Logger.kt index d8a9618..82b86b6 100644 --- a/common-domain/src/main/java/ke/don/shared_domain/screens/logger/Logger.kt +++ b/common-domain/src/main/java/ke/don/shared_domain/logger/Logger.kt @@ -1,4 +1,4 @@ -package ke.don.shared_domain.screens.logger +package ke.don.shared_domain.logger interface Logger { fun logDebug(tag: String, message: String) diff --git a/common-domain/src/main/java/ke/don/shared_domain/screens/logger/LoggerImpl.kt b/common-domain/src/main/java/ke/don/shared_domain/logger/LoggerImpl.kt similarity index 84% rename from common-domain/src/main/java/ke/don/shared_domain/screens/logger/LoggerImpl.kt rename to common-domain/src/main/java/ke/don/shared_domain/logger/LoggerImpl.kt index 3852a4f..c8a61f3 100644 --- a/common-domain/src/main/java/ke/don/shared_domain/screens/logger/LoggerImpl.kt +++ b/common-domain/src/main/java/ke/don/shared_domain/logger/LoggerImpl.kt @@ -1,4 +1,4 @@ -package ke.don.shared_domain.screens.logger +package ke.don.shared_domain.logger class LoggerImpl : Logger { override fun logDebug(tag: String, message: String) { diff --git a/common-domain/src/main/java/ke/don/shared_domain/screens/utils/color_utils/extractPaletteFromImage.kt b/common-domain/src/main/java/ke/don/shared_domain/utils/color_utils/extractPaletteFromImage.kt similarity index 94% rename from common-domain/src/main/java/ke/don/shared_domain/screens/utils/color_utils/extractPaletteFromImage.kt rename to common-domain/src/main/java/ke/don/shared_domain/utils/color_utils/extractPaletteFromImage.kt index 493b5f9..38d5c6d 100644 --- a/common-domain/src/main/java/ke/don/shared_domain/screens/utils/color_utils/extractPaletteFromImage.kt +++ b/common-domain/src/main/java/ke/don/shared_domain/utils/color_utils/extractPaletteFromImage.kt @@ -1,8 +1,8 @@ -package ke.don.shared_domain.screens.utils.color_utils +package ke.don.shared_domain.utils.color_utils import okhttp3.OkHttpClient import okhttp3.Request -import ke.don.shared_domain.screens.utils.color_utils.model.ColorPallet +import ke.don.shared_domain.utils.color_utils.model.ColorPallet import java.io.InputStream import androidx.palette.graphics.Palette import android.graphics.BitmapFactory diff --git a/common-domain/src/main/java/ke/don/shared_domain/screens/utils/color_utils/model/ColorPallet.kt b/common-domain/src/main/java/ke/don/shared_domain/utils/color_utils/model/ColorPallet.kt similarity index 84% rename from common-domain/src/main/java/ke/don/shared_domain/screens/utils/color_utils/model/ColorPallet.kt rename to common-domain/src/main/java/ke/don/shared_domain/utils/color_utils/model/ColorPallet.kt index a76baa7..55e9ad8 100644 --- a/common-domain/src/main/java/ke/don/shared_domain/screens/utils/color_utils/model/ColorPallet.kt +++ b/common-domain/src/main/java/ke/don/shared_domain/utils/color_utils/model/ColorPallet.kt @@ -1,4 +1,4 @@ -package ke.don.shared_domain.screens.utils.color_utils.model +package ke.don.shared_domain.utils.color_utils.model import androidx.compose.ui.graphics.Color diff --git a/common-domain/src/main/java/ke/don/shared_domain/screens/utils/formatting_utils/formatHtmlToAnnotatedString.kt b/common-domain/src/main/java/ke/don/shared_domain/utils/formatting_utils/formatHtmlToAnnotatedString.kt similarity index 98% rename from common-domain/src/main/java/ke/don/shared_domain/screens/utils/formatting_utils/formatHtmlToAnnotatedString.kt rename to common-domain/src/main/java/ke/don/shared_domain/utils/formatting_utils/formatHtmlToAnnotatedString.kt index ab7f727..d7eaf6a 100644 --- a/common-domain/src/main/java/ke/don/shared_domain/screens/utils/formatting_utils/formatHtmlToAnnotatedString.kt +++ b/common-domain/src/main/java/ke/don/shared_domain/utils/formatting_utils/formatHtmlToAnnotatedString.kt @@ -1,4 +1,4 @@ -package ke.don.shared_domain.screens.utils.formatting_utils +package ke.don.shared_domain.utils.formatting_utils import android.text.Spanned import android.text.style.CharacterStyle diff --git a/common-domain/src/main/java/ke/don/shared_domain/values/Secrets.kt b/common-domain/src/main/java/ke/don/shared_domain/values/Secrets.kt new file mode 100644 index 0000000..3d1803b --- /dev/null +++ b/common-domain/src/main/java/ke/don/shared_domain/values/Secrets.kt @@ -0,0 +1,2 @@ +package ke.don.shared_domain.values + diff --git a/feature-authentication/.gitignore b/feature-authentication/.gitignore new file mode 100644 index 0000000..42afabf --- /dev/null +++ b/feature-authentication/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/feature-authentication/build.gradle.kts b/feature-authentication/build.gradle.kts new file mode 100644 index 0000000..e91e2bf --- /dev/null +++ b/feature-authentication/build.gradle.kts @@ -0,0 +1,75 @@ +plugins { + alias(libs.plugins.android.library) + alias(libs.plugins.kotlin.android) + alias(libs.plugins.kotlin.compose) + alias(libs.plugins.hilt.android) + id("kotlin-kapt") +} + +android { + namespace = "ke.don.feature_authentication" + compileSdk = 35 + + defaultConfig { + minSdk = 24 + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + consumerProguardFiles("consumer-rules.pro") + } + + buildTypes { + release { + isMinifyEnabled = false + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro" + ) + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + kotlinOptions { + jvmTarget = "11" + } + buildFeatures { + compose = true + } + composeOptions { + kotlinCompilerExtensionVersion = "1.5.1" + } +} + +dependencies { + + implementation(libs.androidx.core.ktx) + implementation(libs.androidx.appcompat) + implementation(libs.material) + implementation(libs.androidx.lifecycle.runtime.ktx) + implementation(libs.androidx.activity.compose) + implementation(platform(libs.androidx.compose.bom)) + implementation(libs.androidx.ui) + implementation(libs.androidx.ui.graphics) + implementation(libs.androidx.ui.tooling.preview) + implementation(libs.androidx.material3) + implementation(libs.androidx.material.icons.extended) + implementation(libs.kotlinx.coroutines.core) + + //Dagger Hilt + implementation(libs.hilt.android) + implementation(libs.androidx.runtime.livedata) + implementation(libs.googleid) + kapt(libs.hilt.android.compiler) + implementation(libs.androidx.hilt.navigation.compose) + + //Credential Manager + implementation(libs.androidx.credentials) + implementation(libs.androidx.credentials.play.services.auth) + + + implementation(libs.material) + testImplementation(libs.junit) + androidTestImplementation(libs.androidx.junit) + androidTestImplementation(libs.androidx.espresso.core) +} \ No newline at end of file diff --git a/feature-authentication/consumer-rules.pro b/feature-authentication/consumer-rules.pro new file mode 100644 index 0000000..e69de29 diff --git a/feature-authentication/proguard-rules.pro b/feature-authentication/proguard-rules.pro new file mode 100644 index 0000000..f1b4245 --- /dev/null +++ b/feature-authentication/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile diff --git a/feature-authentication/src/androidTest/java/ke/don/feature_authentication/ExampleInstrumentedTest.kt b/feature-authentication/src/androidTest/java/ke/don/feature_authentication/ExampleInstrumentedTest.kt new file mode 100644 index 0000000..2a21d0f --- /dev/null +++ b/feature-authentication/src/androidTest/java/ke/don/feature_authentication/ExampleInstrumentedTest.kt @@ -0,0 +1,24 @@ +package ke.don.feature_authentication + +import androidx.test.platform.app.InstrumentationRegistry +import androidx.test.ext.junit.runners.AndroidJUnit4 + +import org.junit.Test +import org.junit.runner.RunWith + +import org.junit.Assert.* + +/** + * Instrumented test, which will execute on an Android device. + * + * See [testing documentation](http://d.android.com/tools/testing). + */ +@RunWith(AndroidJUnit4::class) +class ExampleInstrumentedTest { + @Test + fun useAppContext() { + // Context of the app under test. + val appContext = InstrumentationRegistry.getInstrumentation().targetContext + assertEquals("ke.don.feature_authentication.test", appContext.packageName) + } +} \ No newline at end of file diff --git a/feature-authentication/src/main/AndroidManifest.xml b/feature-authentication/src/main/AndroidManifest.xml new file mode 100644 index 0000000..a5918e6 --- /dev/null +++ b/feature-authentication/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/feature-authentication/src/main/java/ke/don/feature_authentication/data/GoogleSignInClient.kt b/feature-authentication/src/main/java/ke/don/feature_authentication/data/GoogleSignInClient.kt new file mode 100644 index 0000000..9ea2e4c --- /dev/null +++ b/feature-authentication/src/main/java/ke/don/feature_authentication/data/GoogleSignInClient.kt @@ -0,0 +1,8 @@ +package ke.don.feature_authentication.data + +import android.content.Context +import com.google.android.libraries.identity.googleid.GetGoogleIdOption + +class GoogleSignInClient(context: Context) { + val googleIdOption: GetGoogleIdOption = GetGoogleIdOption.Builder() +} \ No newline at end of file diff --git a/feature-authentication/src/main/java/ke/don/feature_authentication/presentation/SignInWithGoogle.kt b/feature-authentication/src/main/java/ke/don/feature_authentication/presentation/SignInWithGoogle.kt new file mode 100644 index 0000000..68874fe --- /dev/null +++ b/feature-authentication/src/main/java/ke/don/feature_authentication/presentation/SignInWithGoogle.kt @@ -0,0 +1,17 @@ +package ke.don.feature_authentication.presentation + +import android.service.autofill.OnClickAction +import androidx.compose.material3.Button +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable + +@Composable +fun GoogleSignInButton( + onClickAction: () -> Unit +){ + Button( + onClick = { /*TODO*/ } + ) { + Text(text = "Sign in with Google") + } +} \ No newline at end of file diff --git a/feature-authentication/src/test/java/ke/don/feature_authentication/ExampleUnitTest.kt b/feature-authentication/src/test/java/ke/don/feature_authentication/ExampleUnitTest.kt new file mode 100644 index 0000000..2ccec2a --- /dev/null +++ b/feature-authentication/src/test/java/ke/don/feature_authentication/ExampleUnitTest.kt @@ -0,0 +1,17 @@ +package ke.don.feature_authentication + +import org.junit.Test + +import org.junit.Assert.* + +/** + * Example local unit test, which will execute on the development machine (host). + * + * See [testing documentation](http://d.android.com/tools/testing). + */ +class ExampleUnitTest { + @Test + fun addition_isCorrect() { + assertEquals(4, 2 + 2) + } +} \ No newline at end of file diff --git a/feature-book-details/src/main/java/ke/don/feature_book_details/data/di/NetworkModule.kt b/feature-book-details/src/main/java/ke/don/feature_book_details/data/di/NetworkModule.kt index b790065..130004e 100644 --- a/feature-book-details/src/main/java/ke/don/feature_book_details/data/di/NetworkModule.kt +++ b/feature-book-details/src/main/java/ke/don/feature_book_details/data/di/NetworkModule.kt @@ -1,7 +1,7 @@ package ke.don.feature_book_details.data.di -import ke.don.shared_domain.screens.logger.Logger -import ke.don.shared_domain.screens.logger.LoggerImpl +import ke.don.shared_domain.logger.Logger +import ke.don.shared_domain.logger.LoggerImpl import ke.don.feature_book_details.network.GoogleBooksApi import dagger.Module import dagger.Provides diff --git a/feature-book-details/src/main/java/ke/don/feature_book_details/data/di/RepositoryModule.kt b/feature-book-details/src/main/java/ke/don/feature_book_details/data/di/RepositoryModule.kt index 03aefc7..62c26d9 100644 --- a/feature-book-details/src/main/java/ke/don/feature_book_details/data/di/RepositoryModule.kt +++ b/feature-book-details/src/main/java/ke/don/feature_book_details/data/di/RepositoryModule.kt @@ -8,10 +8,10 @@ import dagger.hilt.android.qualifiers.ApplicationContext import dagger.hilt.components.SingletonComponent import ke.don.feature_book_details.R import ke.don.feature_book_details.data.repositoryImpl.BooksRepositoryImpl -import ke.don.shared_domain.screens.logger.Logger +import ke.don.shared_domain.logger.Logger import ke.don.feature_book_details.domain.repositories.BooksRepository import ke.don.feature_book_details.domain.usecase.BooksUseCases -import ke.don.shared_domain.screens.utils.color_utils.DefaultColorPaletteExtractor +import ke.don.shared_domain.utils.color_utils.DefaultColorPaletteExtractor import ke.don.feature_book_details.network.GoogleBooksApi import javax.inject.Singleton diff --git a/feature-book-details/src/main/java/ke/don/feature_book_details/data/repositoryImpl/BooksRepositoryImpl.kt b/feature-book-details/src/main/java/ke/don/feature_book_details/data/repositoryImpl/BooksRepositoryImpl.kt index 16e3b2a..7e0b3b5 100644 --- a/feature-book-details/src/main/java/ke/don/feature_book_details/data/repositoryImpl/BooksRepositoryImpl.kt +++ b/feature-book-details/src/main/java/ke/don/feature_book_details/data/repositoryImpl/BooksRepositoryImpl.kt @@ -8,9 +8,9 @@ import ke.don.feature_book_details.network.GoogleBooksApi import ke.don.feature_book_details.presentation.screens.search.SearchState import ke.don.feature_book_details.presentation.screens.search.searchMessages import ke.don.feature_book_details.presentation.screens.search.suggestedBookTitles -import ke.don.shared_domain.screens.logger.Logger -import ke.don.shared_domain.screens.utils.color_utils.ColorPaletteExtractor -import ke.don.shared_domain.screens.utils.color_utils.model.ColorPallet +import ke.don.shared_domain.logger.Logger +import ke.don.shared_domain.utils.color_utils.ColorPaletteExtractor +import ke.don.shared_domain.utils.color_utils.model.ColorPallet import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.StateFlow import kotlinx.coroutines.flow.update diff --git a/feature-book-details/src/main/java/ke/don/feature_book_details/data/utils/ColorGetters.kt b/feature-book-details/src/main/java/ke/don/feature_book_details/data/utils/ColorGetters.kt index 7c53dac..562b3ca 100644 --- a/feature-book-details/src/main/java/ke/don/feature_book_details/data/utils/ColorGetters.kt +++ b/feature-book-details/src/main/java/ke/don/feature_book_details/data/utils/ColorGetters.kt @@ -4,7 +4,7 @@ import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.luminance -import ke.don.shared_domain.screens.utils.color_utils.model.ColorPallet +import ke.don.shared_domain.utils.color_utils.model.ColorPallet @Composable fun getDominantColor( diff --git a/feature-book-details/src/main/java/ke/don/feature_book_details/domain/states/BookDetailsUiState.kt b/feature-book-details/src/main/java/ke/don/feature_book_details/domain/states/BookDetailsUiState.kt index a47d979..f959f43 100644 --- a/feature-book-details/src/main/java/ke/don/feature_book_details/domain/states/BookDetailsUiState.kt +++ b/feature-book-details/src/main/java/ke/don/feature_book_details/domain/states/BookDetailsUiState.kt @@ -1,7 +1,7 @@ package ke.don.feature_book_details.domain.states import ke.don.feature_book_details.data.model.BookDetailsResponse -import ke.don.shared_domain.screens.utils.color_utils.model.ColorPallet +import ke.don.shared_domain.utils.color_utils.model.ColorPallet data class BookUiState( val bookDetails: BookDetailsResponse = BookDetailsResponse(), diff --git a/feature-book-details/src/main/java/ke/don/feature_book_details/domain/usecase/UseCases.kt b/feature-book-details/src/main/java/ke/don/feature_book_details/domain/usecase/UseCases.kt index 00d6bb1..08eaa88 100644 --- a/feature-book-details/src/main/java/ke/don/feature_book_details/domain/usecase/UseCases.kt +++ b/feature-book-details/src/main/java/ke/don/feature_book_details/domain/usecase/UseCases.kt @@ -1,8 +1,6 @@ package ke.don.feature_book_details.domain.usecase import ke.don.feature_book_details.domain.repositories.BooksRepository -import ke.don.feature_book_details.domain.states.BookUiState -import ke.don.feature_book_details.presentation.screens.search.SearchState class BooksUseCases( private val booksRepository: BooksRepository, diff --git a/feature-book-details/src/main/java/ke/don/feature_book_details/presentation/screens/book_details/BookDetailsViewModel.kt b/feature-book-details/src/main/java/ke/don/feature_book_details/presentation/screens/book_details/BookDetailsViewModel.kt index 8c5079e..e196bdf 100644 --- a/feature-book-details/src/main/java/ke/don/feature_book_details/presentation/screens/book_details/BookDetailsViewModel.kt +++ b/feature-book-details/src/main/java/ke/don/feature_book_details/presentation/screens/book_details/BookDetailsViewModel.kt @@ -9,7 +9,7 @@ import androidx.lifecycle.viewModelScope import dagger.hilt.android.lifecycle.HiltViewModel import ke.don.feature_book_details.domain.usecase.BooksUseCases import ke.don.shared_domain.screens.Screens -import ke.don.shared_domain.screens.logger.Logger +import ke.don.shared_domain.logger.Logger import kotlinx.coroutines.flow.StateFlow import kotlinx.coroutines.launch import javax.inject.Inject diff --git a/feature-book-details/src/main/java/ke/don/feature_book_details/presentation/screens/book_details/components/VolumeDescription.kt b/feature-book-details/src/main/java/ke/don/feature_book_details/presentation/screens/book_details/components/VolumeDescription.kt index 1a6788e..f58d5fb 100644 --- a/feature-book-details/src/main/java/ke/don/feature_book_details/presentation/screens/book_details/components/VolumeDescription.kt +++ b/feature-book-details/src/main/java/ke/don/feature_book_details/presentation/screens/book_details/components/VolumeDescription.kt @@ -19,7 +19,7 @@ import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import ke.don.feature_book_details.data.model.VolumeInfoDet -import ke.don.shared_domain.screens.utils.formatting_utils.formatHtmlToAnnotatedString +import ke.don.shared_domain.utils.formatting_utils.formatHtmlToAnnotatedString @Composable fun AboutVolume( diff --git a/feature-book-details/src/test/java/ke/don/feature_book_details/fake/contracts/FakeColorPaletteExtractor.kt b/feature-book-details/src/test/java/ke/don/feature_book_details/fake/contracts/FakeColorPaletteExtractor.kt index d81199f..1aeb05c 100644 --- a/feature-book-details/src/test/java/ke/don/feature_book_details/fake/contracts/FakeColorPaletteExtractor.kt +++ b/feature-book-details/src/test/java/ke/don/feature_book_details/fake/contracts/FakeColorPaletteExtractor.kt @@ -1,7 +1,7 @@ package ke.don.feature_book_details.fake.contracts -import ke.don.shared_domain.screens.utils.color_utils.ColorPaletteExtractor -import ke.don.shared_domain.screens.utils.color_utils.model.ColorPallet +import ke.don.shared_domain.utils.color_utils.ColorPaletteExtractor +import ke.don.shared_domain.utils.color_utils.model.ColorPallet class FakeColorPaletteExtractor : ColorPaletteExtractor { diff --git a/feature-book-details/src/test/java/ke/don/feature_book_details/fake/data/FakeBookUiState.kt b/feature-book-details/src/test/java/ke/don/feature_book_details/fake/data/FakeBookUiState.kt index e350761..165dc0e 100644 --- a/feature-book-details/src/test/java/ke/don/feature_book_details/fake/data/FakeBookUiState.kt +++ b/feature-book-details/src/test/java/ke/don/feature_book_details/fake/data/FakeBookUiState.kt @@ -2,7 +2,7 @@ package ke.don.feature_book_details.fake.data import ke.don.feature_book_details.domain.states.BookUiState import ke.don.feature_book_details.domain.states.ResultState -import ke.don.shared_domain.screens.utils.color_utils.model.ColorPallet +import ke.don.shared_domain.utils.color_utils.model.ColorPallet import ke.don.feature_book_details.fake.data.FakeBookDetailsDataSource.fakeBookDetailsResponse object FakeBookUiState { diff --git a/feature-book-details/src/test/java/ke/don/feature_book_details/tests/repositories/BooksRepositoryTest.kt b/feature-book-details/src/test/java/ke/don/feature_book_details/tests/repositories/BooksRepositoryTest.kt index 2342f5b..22ca5ff 100644 --- a/feature-book-details/src/test/java/ke/don/feature_book_details/tests/repositories/BooksRepositoryTest.kt +++ b/feature-book-details/src/test/java/ke/don/feature_book_details/tests/repositories/BooksRepositoryTest.kt @@ -1,7 +1,7 @@ package ke.don.feature_book_details.tests.repositories import ke.don.feature_book_details.data.repositoryImpl.BooksRepositoryImpl -import ke.don.shared_domain.screens.logger.Logger +import ke.don.shared_domain.logger.Logger import ke.don.feature_book_details.domain.repositories.BooksRepository import ke.don.feature_book_details.domain.states.ResultState import ke.don.feature_book_details.fake.contracts.FakeColorPaletteExtractor diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 08219a6..0bdb917 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,11 +1,11 @@ [versions] -agp = "8.6.1" +agp = "8.8.0" coilCompose = "2.4.0" coilGif = "2.0.0-rc02" converterGson = "2.9.0" -coreKtxVersion = "1.15.0" coreSplashscreen = "1.0.1" coreTesting = "2.2.0" +credentials = "1.5.0-rc01" foundation = "1.7.6" glide = "4.15.1" hiltAndroid = "2.54" @@ -39,12 +39,15 @@ navigationCompose = "2.8.5" runtimeAndroid = "1.7.6" foundationAndroid = "1.7.6" material3Android = "1.3.1" +googleid = "1.1.1" [libraries] androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" } androidx-core-splashscreen = { module = "androidx.core:core-splashscreen", version.ref = "coreSplashscreen" } androidx-core-testing = { module = "androidx.arch.core:core-testing", version.ref = "coreTesting" } +androidx-credentials = { module = "androidx.credentials:credentials", version.ref = "credentials" } +androidx-credentials-play-services-auth = { module = "androidx.credentials:credentials-play-services-auth", version.ref = "credentials" } androidx-foundation = { module = "androidx.compose.foundation:foundation", version.ref = "foundation" } androidx-hilt-navigation-compose = { module = "androidx.hilt:hilt-navigation-compose", version.ref = "hiltNavigationCompose" } androidx-material-icons-extended = { module = "androidx.compose.material:material-icons-extended", version.ref = "materialIconsExtended" } @@ -89,6 +92,7 @@ androidx-navigation-compose = { group = "androidx.navigation", name = "navigatio androidx-runtime-android = { group = "androidx.compose.runtime", name = "runtime-android", version.ref = "runtimeAndroid" } androidx-foundation-android = { group = "androidx.compose.foundation", name = "foundation-android", version.ref = "foundationAndroid" } androidx-material3-android = { group = "androidx.compose.material3", name = "material3-android", version.ref = "material3Android" } +googleid = { group = "com.google.android.libraries.identity.googleid", name = "googleid", version.ref = "googleid" } [plugins] android-application = { id = "com.android.application", version.ref = "agp" } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 794cd19..a2598e1 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Wed Oct 16 15:52:22 EAT 2024 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/settings.gradle.kts b/settings.gradle.kts index d651abf..839114e 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -24,3 +24,5 @@ include(":app") include(":feature-book-details") include(":common-domain") include(":common-navigation") +include(":common-datasource") +include(":feature-authentication")