mirror of
https://github.com/AdrianKuta/KahootQuiz.git
synced 2025-09-16 18:14:22 +02:00
feat: Implement initial project structure and network layer
This commit introduces the foundational structure of the Kahoot Quiz application and implements the core network layer. Key changes include: - Added new Gradle modules: `core:network`, `domain`, `model:data`, and `ui:quiz`. - Configured Detekt for static code analysis in the new modules. - Implemented Retrofit and Gson for network communication and JSON parsing. - Defined DTOs for the Kahoot quiz API response, splitting them into logical files (QuizResponseDto, CommonDtos, CoverDtos, QuestionDtos, MetadataDtos, ContentTagsDto) for better organization. - Created `QuizApi` interface with a GET request for fetching quiz data. - Added `QuizService` interface and its initial implementation `QuizServiceImpl`. - Set up Hilt for dependency injection in the network module, providing Retrofit and QuizApi instances. - Included a `sample_quiz.json` file for testing and development. - Added unit tests (`QuizResponseDtoParsingTest`) to verify the correct parsing of the sample JSON into DTOs. - Updated `.gitignore` to exclude additional generated files and IDE specific folders. - Modified `settings.gradle.kts` to include the new modules. - Updated `app/build.gradle.kts` to include dependencies on the new `ui:quiz` and `model:data` modules and removed unused dependencies.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
[versions]
|
||||
retrofit = "3.0.0"
|
||||
targetSdk = "36"
|
||||
compileSdk = "36"
|
||||
minSdk = "23"
|
||||
@@ -115,6 +116,8 @@ kotlinx-serialization-json = { group = "org.jetbrains.kotlinx", name = "kotlinx-
|
||||
material = { group = "com.google.android.material", name = "material", version.ref = "material" }
|
||||
mockk-android = { module = "io.mockk:mockk-android", version.ref = "mockk" }
|
||||
play-services-ads = { module = "com.google.android.gms:play-services-ads", version.ref = "playServicesAds" }
|
||||
retrofit = { group = "com.squareup.retrofit2", name = "retrofit", version.ref = "retrofit" }
|
||||
retrofit-converter-gson = { group = "com.squareup.retrofit2", name = "converter-gson", version.ref = "retrofit" }
|
||||
review-ktx = { module = "com.google.android.play:review-ktx", version.ref = "reviewKtx" }
|
||||
room-compiler = { group = "androidx.room", name = "room-compiler", version.ref = "room" }
|
||||
room-ktx = { group = "androidx.room", name = "room-ktx", version.ref = "room" }
|
||||
|
Reference in New Issue
Block a user