diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000..aa724b77
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,15 @@
+*.iml
+.gradle
+/local.properties
+/.idea/caches
+/.idea/libraries
+/.idea/modules.xml
+/.idea/workspace.xml
+/.idea/navEditor.xml
+/.idea/assetWizardSettings.xml
+.DS_Store
+/build
+/captures
+.externalNativeBuild
+.cxx
+local.properties
diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 00000000..26d33521
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml
diff --git a/.idea/.name b/.idea/.name
new file mode 100644
index 00000000..03503a26
--- /dev/null
+++ b/.idea/.name
@@ -0,0 +1 @@
+Recipe Roulette
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
new file mode 100644
index 00000000..b589d56e
--- /dev/null
+++ b/.idea/compiler.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/deploymentTargetSelector.xml b/.idea/deploymentTargetSelector.xml
new file mode 100644
index 00000000..b268ef36
--- /dev/null
+++ b/.idea/deploymentTargetSelector.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
new file mode 100644
index 00000000..0897082f
--- /dev/null
+++ b/.idea/gradle.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 00000000..44ca2d9b
--- /dev/null
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml
new file mode 100644
index 00000000..fdf8d994
--- /dev/null
+++ b/.idea/kotlinc.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/migrations.xml b/.idea/migrations.xml
new file mode 100644
index 00000000..f8051a6f
--- /dev/null
+++ b/.idea/migrations.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 00000000..8978d23d
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/other.xml b/.idea/other.xml
new file mode 100644
index 00000000..a76f1180
--- /dev/null
+++ b/.idea/other.xml
@@ -0,0 +1,329 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 00000000..35eb1ddf
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.gitignore b/app/.gitignore
new file mode 100644
index 00000000..42afabfd
--- /dev/null
+++ b/app/.gitignore
@@ -0,0 +1 @@
+/build
\ No newline at end of file
diff --git a/app/build.gradle.kts b/app/build.gradle.kts
new file mode 100644
index 00000000..85fb4b84
--- /dev/null
+++ b/app/build.gradle.kts
@@ -0,0 +1,85 @@
+plugins {
+ alias(libs.plugins.android.application)
+ alias(libs.plugins.jetbrains.kotlin.android)
+ id("com.google.dagger.hilt.android")
+ id("com.google.devtools.ksp")
+}
+
+android {
+ namespace = "com.example.reciperoulette"
+ compileSdk = 34
+
+ defaultConfig {
+ applicationId = "com.example.reciperoulette"
+ minSdk = 24
+ targetSdk = 34
+ versionCode = 1
+ versionName = "1.0"
+
+ testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
+ vectorDrawables {
+ useSupportLibrary = true
+ }
+ }
+
+ buildTypes {
+ release {
+ isMinifyEnabled = false
+ proguardFiles(
+ getDefaultProguardFile("proguard-android-optimize.txt"),
+ "proguard-rules.pro"
+ )
+ }
+ }
+ compileOptions {
+ sourceCompatibility = JavaVersion.VERSION_1_8
+ targetCompatibility = JavaVersion.VERSION_1_8
+ }
+ kotlinOptions {
+ jvmTarget = "1.8"
+ }
+ buildFeatures {
+ compose = true
+ }
+ composeOptions {
+ kotlinCompilerExtensionVersion = "1.5.1"
+ }
+ packaging {
+ resources {
+ excludes += "/META-INF/{AL2.0,LGPL2.1}"
+ }
+ }
+}
+
+dependencies {
+
+ implementation(libs.androidx.core.ktx)
+ 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.navigation.compose)
+ testImplementation(libs.junit)
+ androidTestImplementation(libs.androidx.junit)
+ androidTestImplementation(libs.androidx.espresso.core)
+ androidTestImplementation(platform(libs.androidx.compose.bom))
+ androidTestImplementation(libs.androidx.ui.test.junit4)
+ debugImplementation(libs.androidx.ui.tooling)
+ debugImplementation(libs.androidx.ui.test.manifest)
+ implementation(libs.androidx.lifecycle.viewmodel.compose)
+
+ implementation(libs.hilt.android.v2481)
+ ksp(libs.dagger.compiler)
+ ksp(libs.hilt.android.compiler.v2481)
+
+ // retrofit
+ implementation(libs.retrofit)
+ // gson converter
+ implementation(libs.converter.gson)
+ implementation(libs.androidx.navigation.compose)
+ implementation(libs.androidx.hilt.navigation.compose)
+ implementation(libs.coil.compose)
+}
\ No newline at end of file
diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro
new file mode 100644
index 00000000..481bb434
--- /dev/null
+++ b/app/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/app/src/androidTest/java/com/example/reciperoulette/ExampleInstrumentedTest.kt b/app/src/androidTest/java/com/example/reciperoulette/ExampleInstrumentedTest.kt
new file mode 100644
index 00000000..5ca0a4df
--- /dev/null
+++ b/app/src/androidTest/java/com/example/reciperoulette/ExampleInstrumentedTest.kt
@@ -0,0 +1,24 @@
+package com.example.reciperoulette
+
+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("com.example.reciperoulette", appContext.packageName)
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
new file mode 100644
index 00000000..19c4e82e
--- /dev/null
+++ b/app/src/main/AndroidManifest.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/java/com/example/reciperoulette/BaseClass.kt b/app/src/main/java/com/example/reciperoulette/BaseClass.kt
new file mode 100644
index 00000000..35b33d14
--- /dev/null
+++ b/app/src/main/java/com/example/reciperoulette/BaseClass.kt
@@ -0,0 +1,8 @@
+package com.example.reciperoulette
+
+import android.app.Application
+import dagger.hilt.android.HiltAndroidApp
+
+@HiltAndroidApp
+class BaseClass:Application() {
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/reciperoulette/MainActivity.kt b/app/src/main/java/com/example/reciperoulette/MainActivity.kt
new file mode 100644
index 00000000..c3ae5a00
--- /dev/null
+++ b/app/src/main/java/com/example/reciperoulette/MainActivity.kt
@@ -0,0 +1,48 @@
+package com.example.reciperoulette
+
+import android.os.Bundle
+import androidx.activity.ComponentActivity
+import androidx.activity.compose.setContent
+import androidx.compose.runtime.Composable
+import androidx.hilt.navigation.compose.hiltViewModel
+import androidx.navigation.compose.NavHost
+import androidx.navigation.compose.composable
+import androidx.navigation.compose.rememberNavController
+import com.example.reciperoulette.data.constants.RECIPE_DETAIL_SCREEN
+import com.example.reciperoulette.data.constants.RECIPE_SCREEN
+import com.example.reciperoulette.screens.recipedetailscree.RecipeDetailScreen
+import com.example.reciperoulette.screens.recipedetailscree.RecipeDetailViewModel
+import com.example.reciperoulette.screens.recipescreen.RecipesScreen
+import com.example.reciperoulette.screens.recipescreen.RecipesViewModel
+import dagger.hilt.android.AndroidEntryPoint
+
+@AndroidEntryPoint
+class MainActivity : ComponentActivity() {
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+// enableEdgeToEdge()
+ setContent {
+ App()
+ }
+ }
+}
+
+
+@Composable
+fun App() {
+ val recipeDetailViewModel:RecipeDetailViewModel = hiltViewModel()
+ val recipesViewModel: RecipesViewModel = hiltViewModel()
+ val navController = rememberNavController()
+ NavHost(navController = navController, startDestination = RECIPE_SCREEN) {
+ composable(route = RECIPE_SCREEN) {
+ RecipesScreen(recipeDetailViewModel = recipeDetailViewModel, recipesViewModel = recipesViewModel){
+ navController.navigate(RECIPE_DETAIL_SCREEN)
+ }
+ }
+ composable(route = RECIPE_DETAIL_SCREEN) {
+ RecipeDetailScreen(recipeDetailViewModel = recipeDetailViewModel){
+ navController.popBackStack()
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/reciperoulette/data/Network/api/RecipeApi.kt b/app/src/main/java/com/example/reciperoulette/data/Network/api/RecipeApi.kt
new file mode 100644
index 00000000..99eddf78
--- /dev/null
+++ b/app/src/main/java/com/example/reciperoulette/data/Network/api/RecipeApi.kt
@@ -0,0 +1,15 @@
+package com.example.reciperoulette.data.Network.api
+
+import com.example.reciperoulette.model.Recipe
+import com.example.reciperoulette.model.RecipeData
+import retrofit2.Response
+import retrofit2.http.GET
+import retrofit2.http.Query
+
+interface RecipeApi {
+ @GET("recipes/random")
+ suspend fun getRecipe(
+ @Query("number") number: Int = 10,
+ @Query("apiKey") apiKey: String = "17f71ccb2a5246caa26f52dd2344172b"
+ ): Response
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/reciperoulette/data/constants/Constants.kt b/app/src/main/java/com/example/reciperoulette/data/constants/Constants.kt
new file mode 100644
index 00000000..9275cd21
--- /dev/null
+++ b/app/src/main/java/com/example/reciperoulette/data/constants/Constants.kt
@@ -0,0 +1,4 @@
+package com.example.reciperoulette.data.constants
+
+const val RECIPE_SCREEN = "RecipeScreen"
+const val RECIPE_DETAIL_SCREEN = "RecipeDetailScreen"
\ No newline at end of file
diff --git a/app/src/main/java/com/example/reciperoulette/data/local/LocalData.kt b/app/src/main/java/com/example/reciperoulette/data/local/LocalData.kt
new file mode 100644
index 00000000..b0226f74
--- /dev/null
+++ b/app/src/main/java/com/example/reciperoulette/data/local/LocalData.kt
@@ -0,0 +1,13 @@
+package com.example.reciperoulette.data.local
+
+fun getSummary(): String =
+ "Madeleine Thien is a Canadian writer whose work explores the trans-cultural world of Asian art, politics, and family life within Canada’s diasporic Asian Communities. She was born in 1974 to a Malaysian Chinese father and a Hong Kong Chinese mother. Thien studied contemporary dance but switched to creative writing as an undergraduate in college. She earned her MFA in writing from the University of British Columbia."
+
+fun getGradiantList(): List = listOf("abc", "pqr", "wxy", "aps", "stu", "brq", "has")
+
+fun getInstruction(): String =
+ "Madeleine Thien is a Canadian writer whose work explores the trans-cultural world of Asian art, politics, and family life within Canada’s diasporic Asian Communities. She was born in 1974 to a Malaysian Chinese father and a Hong Kong Chinese mother. Thien studied contemporary dance but switched to creative writing as an undergraduate in college. She earned her MFA in writing from the University of British Columbia."
+
+fun getAllRecipeList():List = listOf("Mutton","Panner","Dal Tadka","Chiken","Mashroom","Chiken Kabab")
+fun getVegRecipeList():List = listOf("Dhokla","Panner","Dal Tadka","Mix Veg","Mashroom")
+fun getNonVegRecipeList():List = listOf("Mutton","Chiken Tikka","Chiken Fry","Mutto Botty","Mutton Soup","Chiken Kabab")
\ No newline at end of file
diff --git a/app/src/main/java/com/example/reciperoulette/data/repositoryimpl/RecipesRepositoryImpl.kt b/app/src/main/java/com/example/reciperoulette/data/repositoryimpl/RecipesRepositoryImpl.kt
new file mode 100644
index 00000000..d6d38848
--- /dev/null
+++ b/app/src/main/java/com/example/reciperoulette/data/repositoryimpl/RecipesRepositoryImpl.kt
@@ -0,0 +1,19 @@
+package com.example.reciperoulette.data.repositoryimpl
+
+import android.util.Log
+import com.example.reciperoulette.data.Network.api.RecipeApi
+import com.example.reciperoulette.domain.repository.RecipesRepository
+import com.example.reciperoulette.model.Recipe
+import com.example.reciperoulette.model.RecipeData
+import javax.inject.Inject
+
+class RecipesRepositoryImpl @Inject constructor(private val recipeApi: RecipeApi):RecipesRepository {
+ override suspend fun getRecipesList(): RecipeData? {
+ val recipeListResponse = recipeApi.getRecipe()
+ if (recipeListResponse.isSuccessful) {
+ Log.d("RecipesRepositoryImpl", "#ak inside getRecipesList: ${recipeListResponse.body()}")
+ return recipeListResponse.body()!!
+ }
+ return null
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/reciperoulette/di/NetworkModule.kt b/app/src/main/java/com/example/reciperoulette/di/NetworkModule.kt
new file mode 100644
index 00000000..52671bc4
--- /dev/null
+++ b/app/src/main/java/com/example/reciperoulette/di/NetworkModule.kt
@@ -0,0 +1,38 @@
+package com.example.reciperoulette.di
+
+import com.example.reciperoulette.data.Network.api.RecipeApi
+import com.example.reciperoulette.data.repositoryimpl.RecipesRepositoryImpl
+import com.example.reciperoulette.domain.repository.RecipesRepository
+import com.example.reciperoulette.screens.recipescreen.RecipesViewModel
+import dagger.Module
+import dagger.Provides
+import dagger.hilt.InstallIn
+import dagger.hilt.components.SingletonComponent
+import retrofit2.Retrofit
+import retrofit2.converter.gson.GsonConverterFactory
+import javax.inject.Singleton
+
+@Module
+@InstallIn(SingletonComponent::class)
+class NetworkModule {
+ @Singleton
+ @Provides
+ fun providesRetrofit(): Retrofit {
+ return Retrofit.Builder()
+ .baseUrl("https://api.spoonacular.com")
+ .addConverterFactory(GsonConverterFactory.create())
+ .build()
+ }
+
+ @Singleton
+ @Provides
+ fun provideRecipeApi(retrofit: Retrofit): RecipeApi {
+ return retrofit.create(RecipeApi::class.java)
+ }
+
+ @Singleton
+ @Provides
+ fun provideRecipe(recipeApi: RecipeApi): RecipesRepository {
+ return RecipesRepositoryImpl(recipeApi)
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/reciperoulette/domain/recipesUseCase/RecipesUseCase.kt b/app/src/main/java/com/example/reciperoulette/domain/recipesUseCase/RecipesUseCase.kt
new file mode 100644
index 00000000..83a3ed2a
--- /dev/null
+++ b/app/src/main/java/com/example/reciperoulette/domain/recipesUseCase/RecipesUseCase.kt
@@ -0,0 +1,23 @@
+package com.example.reciperoulette.domain.recipesUseCase
+
+import com.example.reciperoulette.data.repositoryimpl.RecipesRepositoryImpl
+import com.example.reciperoulette.domain.repository.RecipesRepository
+import com.example.reciperoulette.model.Recipe
+import javax.inject.Inject
+
+class RecipesUseCase @Inject constructor(private val repositoryImpl: RecipesRepository) {
+ lateinit var recipeData: List
+
+ suspend fun getRecipeData(): List {
+ recipeData = repositoryImpl.getRecipesList()?.recipes ?: emptyList()
+ return recipeData
+ }
+
+ fun getVegData():List{
+ return recipeData.filter { it.vegetarian == true }
+ }
+
+ fun getNonVegData():List{
+ return recipeData.filter { it.vegetarian == false }
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/reciperoulette/domain/repository/RecipesRepository.kt b/app/src/main/java/com/example/reciperoulette/domain/repository/RecipesRepository.kt
new file mode 100644
index 00000000..a8cc268f
--- /dev/null
+++ b/app/src/main/java/com/example/reciperoulette/domain/repository/RecipesRepository.kt
@@ -0,0 +1,8 @@
+package com.example.reciperoulette.domain.repository
+
+import com.example.reciperoulette.model.Recipe
+import com.example.reciperoulette.model.RecipeData
+
+interface RecipesRepository {
+ suspend fun getRecipesList(): RecipeData?
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/reciperoulette/model/AnalyzedInstruction.kt b/app/src/main/java/com/example/reciperoulette/model/AnalyzedInstruction.kt
new file mode 100644
index 00000000..bdeafa33
--- /dev/null
+++ b/app/src/main/java/com/example/reciperoulette/model/AnalyzedInstruction.kt
@@ -0,0 +1,6 @@
+package com.example.reciperoulette.model
+
+data class AnalyzedInstruction(
+ val name: String,
+ val steps: List
+)
\ No newline at end of file
diff --git a/app/src/main/java/com/example/reciperoulette/model/Equipment.kt b/app/src/main/java/com/example/reciperoulette/model/Equipment.kt
new file mode 100644
index 00000000..75fa8550
--- /dev/null
+++ b/app/src/main/java/com/example/reciperoulette/model/Equipment.kt
@@ -0,0 +1,9 @@
+package com.example.reciperoulette.model
+
+data class Equipment(
+ val id: Int,
+ val image: String,
+ val localizedName: String,
+ val name: String,
+ val temperature: Temperature
+)
\ No newline at end of file
diff --git a/app/src/main/java/com/example/reciperoulette/model/ExtendedIngredient.kt b/app/src/main/java/com/example/reciperoulette/model/ExtendedIngredient.kt
new file mode 100644
index 00000000..757b7ead
--- /dev/null
+++ b/app/src/main/java/com/example/reciperoulette/model/ExtendedIngredient.kt
@@ -0,0 +1,16 @@
+package com.example.reciperoulette.model
+
+data class ExtendedIngredient(
+ val aisle: String,
+ val amount: Double,
+ val consistency: String,
+ val id: Int,
+ val image: String,
+ val measures: Measures,
+ val meta: List,
+ val name: String,
+ val nameClean: String,
+ val original: String,
+ val originalName: String,
+ val unit: String
+)
\ No newline at end of file
diff --git a/app/src/main/java/com/example/reciperoulette/model/Ingredient.kt b/app/src/main/java/com/example/reciperoulette/model/Ingredient.kt
new file mode 100644
index 00000000..78e8f04c
--- /dev/null
+++ b/app/src/main/java/com/example/reciperoulette/model/Ingredient.kt
@@ -0,0 +1,8 @@
+package com.example.reciperoulette.model
+
+data class Ingredient(
+ val id: Int,
+ val image: String,
+ val localizedName: String,
+ val name: String
+)
\ No newline at end of file
diff --git a/app/src/main/java/com/example/reciperoulette/model/Length.kt b/app/src/main/java/com/example/reciperoulette/model/Length.kt
new file mode 100644
index 00000000..34c9b589
--- /dev/null
+++ b/app/src/main/java/com/example/reciperoulette/model/Length.kt
@@ -0,0 +1,6 @@
+package com.example.reciperoulette.model
+
+data class Length(
+ val number: Int,
+ val unit: String
+)
\ No newline at end of file
diff --git a/app/src/main/java/com/example/reciperoulette/model/Measures.kt b/app/src/main/java/com/example/reciperoulette/model/Measures.kt
new file mode 100644
index 00000000..085b84d4
--- /dev/null
+++ b/app/src/main/java/com/example/reciperoulette/model/Measures.kt
@@ -0,0 +1,6 @@
+package com.example.reciperoulette.model
+
+data class Measures(
+ val metric: Metric,
+ val us: Us
+)
\ No newline at end of file
diff --git a/app/src/main/java/com/example/reciperoulette/model/Metric.kt b/app/src/main/java/com/example/reciperoulette/model/Metric.kt
new file mode 100644
index 00000000..d700a0f8
--- /dev/null
+++ b/app/src/main/java/com/example/reciperoulette/model/Metric.kt
@@ -0,0 +1,7 @@
+package com.example.reciperoulette.model
+
+data class Metric(
+ val amount: Double,
+ val unitLong: String,
+ val unitShort: String
+)
\ No newline at end of file
diff --git a/app/src/main/java/com/example/reciperoulette/model/Recipe.kt b/app/src/main/java/com/example/reciperoulette/model/Recipe.kt
new file mode 100644
index 00000000..6e60c330
--- /dev/null
+++ b/app/src/main/java/com/example/reciperoulette/model/Recipe.kt
@@ -0,0 +1,41 @@
+package com.example.reciperoulette.model
+
+data class Recipe(
+ val aggregateLikes: Int? = null,
+ val analyzedInstructions: List = emptyList(),
+ val cheap: Boolean? = null,
+ val cookingMinutes: Int? = null,
+ val creditsText: String? = null,
+ val cuisines: List = emptyList(),
+ val dairyFree: Boolean? = null,
+ val diets: List = emptyList(),
+ val dishTypes: List = emptyList(),
+ val extendedIngredients: List = emptyList(),
+ val gaps: String? = null,
+ val glutenFree: Boolean? = null,
+ val healthScore: Int? = null,
+ val id: Int? = null,
+ val image: String? = null,
+ val imageType: String? = null,
+ val instructions: String? = null,
+ val license: String? = null,
+ val lowFodmap: Boolean? = null,
+ val occasions: List = emptyList(),
+ val originalId: Any? = null,
+ val preparationMinutes: Int? = null,
+ val pricePerServing: Double? = null,
+ val readyInMinutes: Int? = null,
+ val servings: Int? = null,
+ val sourceName: String? = null,
+ val sourceUrl: String? = null,
+ val spoonacularScore: Double? = null,
+ val spoonacularSourceUrl: String? = null,
+ val summary: String? = null,
+ val sustainable: Boolean? = null,
+ val title: String? = null,
+ val vegan: Boolean? = null,
+ val vegetarian: Boolean? = null,
+ val veryHealthy: Boolean? = null,
+ val veryPopular: Boolean? = null,
+ val weightWatcherSmartPoints: Int? = null
+)
\ No newline at end of file
diff --git a/app/src/main/java/com/example/reciperoulette/model/RecipeData.kt b/app/src/main/java/com/example/reciperoulette/model/RecipeData.kt
new file mode 100644
index 00000000..69d8a752
--- /dev/null
+++ b/app/src/main/java/com/example/reciperoulette/model/RecipeData.kt
@@ -0,0 +1,5 @@
+package com.example.reciperoulette.model
+
+data class RecipeData(
+ val recipes: List
+)
\ No newline at end of file
diff --git a/app/src/main/java/com/example/reciperoulette/model/Step.kt b/app/src/main/java/com/example/reciperoulette/model/Step.kt
new file mode 100644
index 00000000..92f9cb0c
--- /dev/null
+++ b/app/src/main/java/com/example/reciperoulette/model/Step.kt
@@ -0,0 +1,9 @@
+package com.example.reciperoulette.model
+
+data class Step(
+ val equipment: List,
+ val ingredients: List,
+ val length: Length,
+ val number: Int,
+ val step: String
+)
\ No newline at end of file
diff --git a/app/src/main/java/com/example/reciperoulette/model/Temperature.kt b/app/src/main/java/com/example/reciperoulette/model/Temperature.kt
new file mode 100644
index 00000000..61a96c43
--- /dev/null
+++ b/app/src/main/java/com/example/reciperoulette/model/Temperature.kt
@@ -0,0 +1,6 @@
+package com.example.reciperoulette.model
+
+data class Temperature(
+ val number: Int,
+ val unit: String
+)
\ No newline at end of file
diff --git a/app/src/main/java/com/example/reciperoulette/model/Us.kt b/app/src/main/java/com/example/reciperoulette/model/Us.kt
new file mode 100644
index 00000000..efa31169
--- /dev/null
+++ b/app/src/main/java/com/example/reciperoulette/model/Us.kt
@@ -0,0 +1,7 @@
+package com.example.reciperoulette.model
+
+data class Us(
+ val amount: Double,
+ val unitLong: String,
+ val unitShort: String
+)
\ No newline at end of file
diff --git a/app/src/main/java/com/example/reciperoulette/screens/recipedetailscree/RecipeDetailScree.kt b/app/src/main/java/com/example/reciperoulette/screens/recipedetailscree/RecipeDetailScree.kt
new file mode 100644
index 00000000..17a3960b
--- /dev/null
+++ b/app/src/main/java/com/example/reciperoulette/screens/recipedetailscree/RecipeDetailScree.kt
@@ -0,0 +1,223 @@
+package com.example.reciperoulette.screens.recipedetailscree
+
+import android.annotation.SuppressLint
+import android.view.ViewStructure.HtmlInfo
+import androidx.compose.foundation.Image
+import androidx.compose.foundation.background
+import androidx.compose.foundation.clickable
+import androidx.compose.foundation.layout.Arrangement
+import androidx.compose.foundation.layout.Box
+import androidx.compose.foundation.layout.Column
+import androidx.compose.foundation.layout.PaddingValues
+import androidx.compose.foundation.layout.Row
+import androidx.compose.foundation.layout.Spacer
+import androidx.compose.foundation.layout.fillMaxSize
+import androidx.compose.foundation.layout.fillMaxWidth
+import androidx.compose.foundation.layout.height
+import androidx.compose.foundation.layout.padding
+import androidx.compose.foundation.layout.size
+import androidx.compose.foundation.layout.width
+import androidx.compose.foundation.lazy.LazyRow
+import androidx.compose.foundation.lazy.items
+import androidx.compose.foundation.rememberScrollState
+import androidx.compose.foundation.shape.RoundedCornerShape
+import androidx.compose.foundation.verticalScroll
+import androidx.compose.material.icons.Icons
+import androidx.compose.material.icons.filled.ArrowBack
+import androidx.compose.material3.MaterialTheme
+import androidx.compose.material3.Text
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.collectAsState
+import androidx.compose.runtime.getValue
+import androidx.compose.runtime.remember
+import androidx.compose.ui.Alignment
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.draw.clip
+import androidx.compose.ui.draw.drawBehind
+import androidx.compose.ui.geometry.Offset
+import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.graphics.ColorFilter
+import androidx.compose.ui.layout.ContentScale
+import androidx.compose.ui.res.painterResource
+import androidx.compose.ui.text.TextStyle
+import androidx.compose.ui.text.font.FontWeight
+import androidx.compose.ui.tooling.preview.Preview
+import androidx.compose.ui.unit.dp
+import androidx.compose.ui.unit.sp
+import androidx.core.text.HtmlCompat
+import androidx.core.text.toSpanned
+import androidx.lifecycle.viewmodel.compose.viewModel
+import coil.compose.rememberAsyncImagePainter
+import com.example.reciperoulette.R
+import com.example.reciperoulette.model.ExtendedIngredient
+
+//@Preview
+@Composable
+fun RecipeDetailScreen(
+ modifier: Modifier = Modifier,
+ recipeDetailViewModel: RecipeDetailViewModel,
+ onBackPress:()->Unit = {}
+) {
+ val data by recipeDetailViewModel.recipeData.collectAsState()
+ val painter = rememberAsyncImagePainter(model = data.recipeImage, placeholder = painterResource(id = R.drawable.recipe) )
+ Box(
+ modifier = modifier
+ .fillMaxSize()
+ .background(color = Color(0xFF0D0D0D))
+ ) {
+ Column(
+ verticalArrangement = Arrangement.spacedBy(16.dp),
+ modifier = Modifier.verticalScroll(rememberScrollState())
+ ) {
+ RecipeDetailToolBar(onBackPress = onBackPress)
+ HeadingUi(headingName = data.recipeName?:"Recipe Name")
+ Image(
+ painter = painter,
+ contentDescription = null,
+ contentScale = ContentScale.FillBounds,
+ modifier = Modifier
+ .fillMaxWidth()
+ .height(300.dp)
+ .padding(horizontal = 16.dp)
+ .clip(RoundedCornerShape(20.dp))
+ )
+
+ HeadingUi(headingName = "Gradiant")
+ GradiantListScreen(gradiantList = data.gradiant)
+ HeadingUi(headingName = "Summary")
+ SummaryScreen(summary = data.summary ?: "")
+ HeadingUi(headingName = "Instruction")
+ InstructionScreen(instruction = data.instruction?:"")
+ }
+ }
+}
+
+@Preview
+@Composable
+private fun RecipeDetailToolBar(modifier: Modifier = Modifier,onBackPress: () -> Unit = {}) {
+ Box(
+ modifier = modifier
+ .fillMaxWidth()
+ .background(color = Color(0xFF0D0D0D))
+ .drawBehind {
+ val borderSize = 1.dp.toPx()
+ val x = size.width
+ val y = size.height
+ drawLine(
+ color = Color(0xFF333333),
+ start = Offset(0f, y),
+ end = Offset(x, y),
+ strokeWidth = borderSize
+ )
+ }
+ .padding(16.dp)
+ ) {
+ Row(
+ modifier
+ .fillMaxWidth(),
+ verticalAlignment = Alignment.CenterVertically
+ ) {
+ Image(
+ imageVector = Icons.Default.ArrowBack,
+ contentDescription = null,
+ colorFilter = ColorFilter.tint(color = Color.White),
+ modifier = Modifier.clickable {
+ onBackPress()
+ }
+ )
+ Spacer(modifier = Modifier.width(16.dp))
+ Text(
+ text = "Recipe Roulette",
+ style = TextStyle(
+ fontSize = 20.sp,
+ fontWeight = FontWeight(600),
+ color = Color(0xFFEEEEEE),
+ )
+ )
+ }
+ }
+}
+
+@Preview
+@Composable
+private fun HeadingUi(modifier: Modifier = Modifier, headingName: String = "Recipe Name") {
+ Text(
+ modifier = modifier.padding(horizontal = 16.dp),
+ text = headingName,
+ style = MaterialTheme.typography.headlineMedium,
+ color = Color(0xFFFEFEFE)
+ )
+}
+
+//@Preview
+@Composable
+private fun GradiantListItem(modifier: Modifier = Modifier,gradiantName:String = "",gradiantImage:String ) {
+// val imageUrl = "https://img.spoonacular.com/$gradiantImage"
+ val painter = rememberAsyncImagePainter(model = gradiantImage)
+ Box(
+ modifier = modifier
+
+ ) {
+ Column(
+ verticalArrangement = Arrangement.Center,
+ horizontalAlignment = Alignment.CenterHorizontally
+ ) {
+ Image(
+ painter = painterResource(id = R.drawable.recipe),
+ contentDescription = null,
+ contentScale = ContentScale.FillBounds,
+ modifier = Modifier
+ .size(50.dp)
+ .clip(RoundedCornerShape(8.dp))
+ )
+ Spacer(modifier = Modifier.height(4.dp))
+ Text(
+ text = gradiantName,
+ style = TextStyle(
+ fontSize = 12.sp,
+ lineHeight = 10.4.sp,
+ fontWeight = FontWeight(300),
+ color = Color(0xFFFEFEFE)
+ )
+ )
+
+ }
+
+ }
+}
+
+//@Preview
+@Composable
+private fun GradiantListScreen(modifier: Modifier = Modifier,gradiantList:List) {
+ LazyRow(
+ modifier = modifier.fillMaxWidth(),
+ horizontalArrangement = Arrangement.spacedBy(16.dp),
+ contentPadding = PaddingValues(horizontal = 16.dp)
+ ) {
+ items(gradiantList) {
+ GradiantListItem(gradiantName = it.name,gradiantImage = it.image)
+ }
+ }
+}
+
+@SuppressLint("RememberReturnType")
+@Preview
+@Composable
+private fun SummaryScreen(modifier: Modifier = Modifier, summary: String = "") {
+ Text(
+ text = summary,
+ color = Color.White,
+ modifier = modifier.padding(horizontal = 16.dp)
+ )
+}
+
+@Preview
+@Composable
+private fun InstructionScreen(modifier: Modifier = Modifier,instruction:String = "") {
+ Text(
+ text = instruction,
+ color = Color.White,
+ modifier = modifier.padding(horizontal = 16.dp)
+ )
+
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/reciperoulette/screens/recipedetailscree/RecipeDetailState.kt b/app/src/main/java/com/example/reciperoulette/screens/recipedetailscree/RecipeDetailState.kt
new file mode 100644
index 00000000..2e12fda5
--- /dev/null
+++ b/app/src/main/java/com/example/reciperoulette/screens/recipedetailscree/RecipeDetailState.kt
@@ -0,0 +1,11 @@
+package com.example.reciperoulette.screens.recipedetailscree
+
+import com.example.reciperoulette.model.ExtendedIngredient
+
+data class RecipeDetailState(
+ var summary: String? = null,
+ var instruction: String? = null,
+ var gradiant: List = emptyList(),
+ var recipeName:String? = null,
+ var recipeImage:String? = null
+)
\ No newline at end of file
diff --git a/app/src/main/java/com/example/reciperoulette/screens/recipedetailscree/RecipeDetailViewModel.kt b/app/src/main/java/com/example/reciperoulette/screens/recipedetailscree/RecipeDetailViewModel.kt
new file mode 100644
index 00000000..7f045327
--- /dev/null
+++ b/app/src/main/java/com/example/reciperoulette/screens/recipedetailscree/RecipeDetailViewModel.kt
@@ -0,0 +1,32 @@
+package com.example.reciperoulette.screens.recipedetailscree
+
+import androidx.lifecycle.ViewModel
+import com.example.reciperoulette.data.local.getGradiantList
+import com.example.reciperoulette.data.local.getInstruction
+import com.example.reciperoulette.data.local.getSummary
+import com.example.reciperoulette.model.Recipe
+import kotlinx.coroutines.flow.MutableStateFlow
+import kotlinx.coroutines.flow.StateFlow
+
+
+
+class RecipeDetailViewModel : ViewModel() {
+ private val _recipeData = MutableStateFlow(RecipeDetailState())
+ val recipeData: StateFlow
+ get() = _recipeData
+
+
+// init {
+// _recipeData.value.summary = getSummary()
+// _recipeData.value.instruction = getInstruction()
+// _recipeData.value.gradiant = getGradiantList()
+// }
+
+ fun getRecipe(recipe: Recipe){
+ _recipeData.value.summary = recipe.summary
+ _recipeData.value.instruction = recipe.instructions
+ _recipeData.value.gradiant = recipe.extendedIngredients
+ _recipeData.value.recipeName = recipe.title
+ _recipeData.value.recipeImage = recipe.image
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/reciperoulette/screens/recipescreen/FilterCardEvents.kt b/app/src/main/java/com/example/reciperoulette/screens/recipescreen/FilterCardEvents.kt
new file mode 100644
index 00000000..4cbd7556
--- /dev/null
+++ b/app/src/main/java/com/example/reciperoulette/screens/recipescreen/FilterCardEvents.kt
@@ -0,0 +1,5 @@
+package com.example.reciperoulette.screens.recipescreen
+
+enum class FilterCards {
+ ALL, VEG, NON_VEG
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/reciperoulette/screens/recipescreen/RecipesScreen.kt b/app/src/main/java/com/example/reciperoulette/screens/recipescreen/RecipesScreen.kt
new file mode 100644
index 00000000..d0a0d9d1
--- /dev/null
+++ b/app/src/main/java/com/example/reciperoulette/screens/recipescreen/RecipesScreen.kt
@@ -0,0 +1,270 @@
+package com.example.reciperoulette.screens.recipescreen
+
+import android.util.Log
+import androidx.compose.foundation.Image
+import androidx.compose.foundation.background
+import androidx.compose.foundation.border
+import androidx.compose.foundation.clickable
+import androidx.compose.foundation.layout.Arrangement
+import androidx.compose.foundation.layout.Box
+import androidx.compose.foundation.layout.Column
+import androidx.compose.foundation.layout.PaddingValues
+import androidx.compose.foundation.layout.Row
+import androidx.compose.foundation.layout.Spacer
+import androidx.compose.foundation.layout.fillMaxSize
+import androidx.compose.foundation.layout.fillMaxWidth
+import androidx.compose.foundation.layout.height
+import androidx.compose.foundation.layout.padding
+import androidx.compose.foundation.layout.size
+import androidx.compose.foundation.layout.width
+import androidx.compose.foundation.lazy.LazyColumn
+import androidx.compose.foundation.lazy.items
+import androidx.compose.foundation.shape.RoundedCornerShape
+import androidx.compose.material3.Card
+import androidx.compose.material3.Text
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.LaunchedEffect
+import androidx.compose.runtime.collectAsState
+import androidx.compose.runtime.getValue
+import androidx.compose.runtime.mutableStateOf
+import androidx.compose.runtime.saveable.rememberSaveable
+import androidx.compose.runtime.setValue
+import androidx.compose.ui.Alignment
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.draw.clip
+import androidx.compose.ui.draw.drawBehind
+import androidx.compose.ui.geometry.Offset
+import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.layout.ContentScale
+import androidx.compose.ui.res.painterResource
+import androidx.compose.ui.text.TextStyle
+import androidx.compose.ui.text.font.FontWeight
+import androidx.compose.ui.tooling.preview.Preview
+import androidx.compose.ui.unit.dp
+import androidx.compose.ui.unit.sp
+import androidx.hilt.navigation.compose.hiltViewModel
+import coil.compose.rememberAsyncImagePainter
+import com.example.reciperoulette.R
+import com.example.reciperoulette.model.Recipe
+import com.example.reciperoulette.screens.recipedetailscree.RecipeDetailViewModel
+import kotlin.math.log
+
+
+//@Preview
+@Composable
+fun RecipesScreen(
+ modifier: Modifier = Modifier,
+ recipeDetailViewModel: RecipeDetailViewModel,
+ recipesViewModel:RecipesViewModel,
+ onRecipeClick: () -> Unit = {}
+) {
+ val recipeList by recipesViewModel.recipeList.collectAsState()
+
+ var selectedcard by rememberSaveable {
+ mutableStateOf(FilterCards.ALL)
+ }
+
+ LaunchedEffect(selectedcard) {
+ Log.d("RecipesScreen", "RecipesScreen: #ak inside a launchEffect")
+ recipesViewModel.updateRecipeList(selectedcard)
+ }
+
+ fun selectCard(select: FilterCards) {
+ selectedcard = select
+ }
+ Box(
+ modifier = modifier
+ .fillMaxSize()
+ .background(color = Color(0xFF0D0D0D))
+ ) {
+ Column {
+ ToolBar()
+ Spacer(modifier = Modifier.height(16.dp))
+ Row(
+ Modifier
+ .fillMaxWidth()
+ .padding(horizontal = 16.dp),
+ horizontalArrangement = Arrangement.spacedBy(12.dp)
+ ) {
+ FillterScreen(
+ filterCards = FilterCards.ALL,
+ selectedcard = selectedcard,
+ recipesViewModel = recipesViewModel
+ ) {
+ selectCard(it)
+ }
+ FillterScreen(
+ filterCards = FilterCards.VEG,
+ selectedcard = selectedcard,
+ recipesViewModel = recipesViewModel
+ ) {
+ selectCard(it)
+ }
+ FillterScreen(
+ filterCards = FilterCards.NON_VEG,
+ selectedcard = selectedcard,
+ recipesViewModel = recipesViewModel
+ ) {
+ selectCard(it)
+ }
+ }
+
+ LazyColumn(
+ contentPadding = PaddingValues(16.dp),
+ verticalArrangement = Arrangement.spacedBy(16.dp)
+ ) {
+ items(recipeList) {
+ RecipeListItem(
+ onRecipeClick = onRecipeClick,
+ recipe = it,
+ recipeDetailViewModel = recipeDetailViewModel
+ )
+ }
+ }
+ }
+ }
+}
+
+//@Preview
+@Composable
+private fun FillterScreen(
+ modifier: Modifier = Modifier,
+ filterCards: FilterCards = FilterCards.ALL,
+ selectedcard: FilterCards = FilterCards.ALL,
+ recipesViewModel: RecipesViewModel,
+ onClick: (filterCards: FilterCards) -> Unit = {}
+) {
+ val name = filterCards.name
+ Box(
+ modifier = modifier
+ .background(
+ color = if (filterCards == selectedcard) Color(0xFFFEFEFE) else Color.Black,
+ shape = RoundedCornerShape(size = 23.dp)
+ )
+ .border(
+ width = 1.dp,
+ color = Color(0xFF333333),
+ shape = RoundedCornerShape(size = 23.dp)
+ )
+ .clickable {
+ recipesViewModel.updateRecipeList(filterCards)
+ onClick(filterCards)
+ }
+
+ ) {
+ Row(
+ Modifier.padding(vertical = 8.dp, horizontal = 20.dp),
+ horizontalArrangement = Arrangement.Center,
+ verticalAlignment = Alignment.CenterVertically,
+ ) {
+ Text(
+ text = name,
+ style = TextStyle(
+ fontSize = 16.sp,
+ lineHeight = 22.4.sp,
+ fontWeight = FontWeight(500),
+ color = if (filterCards == selectedcard) Color(0xFF333333) else Color(0xFFFEFEFE)
+ )
+ )
+ }
+ }
+}
+
+
+@Preview
+@Composable
+private fun ToolBar(modifier: Modifier = Modifier) {
+ Box(
+ modifier = modifier
+ .fillMaxWidth()
+ .background(color = Color(0xFF0D0D0D))
+ .drawBehind {
+ val borderSize = 1.dp.toPx()
+ val x = size.width
+ val y = size.height
+ drawLine(
+ color = Color(0xFF333333),
+ start = Offset(0f, y),
+ end = Offset(x, y),
+ strokeWidth = borderSize
+ )
+ }
+ .padding(16.dp)
+ ) {
+ Row(
+ modifier
+ .fillMaxWidth(),
+ verticalAlignment = Alignment.CenterVertically
+ ) {
+ Text(
+ text = "Recipe Roulette",
+ style = TextStyle(
+ fontSize = 20.sp,
+ fontWeight = FontWeight(600),
+ color = Color(0xFFEEEEEE),
+ )
+ )
+ }
+ }
+}
+
+//@Preview
+@Composable
+fun RecipeListItem(
+ modifier: Modifier = Modifier,
+ recipeDetailViewModel: RecipeDetailViewModel,
+ recipe: Recipe,
+ onRecipeClick: () -> Unit = {}
+) {
+ val painter = rememberAsyncImagePainter(model = recipe.image, placeholder = painterResource(id = R.drawable.recipe))
+ Card(modifier = modifier
+ .fillMaxWidth()
+ .clickable {
+ recipeDetailViewModel.getRecipe(recipe)
+ onRecipeClick()
+ }) {
+ Row(
+ Modifier.fillMaxWidth(),
+ verticalAlignment = Alignment.CenterVertically
+ ) {
+ Image(
+ painter = painter,
+ contentDescription = null,
+ modifier = Modifier
+ .size(100.dp)
+ .clip(RoundedCornerShape(8.dp)),
+ contentScale = ContentScale.FillBounds
+ )
+ Spacer(modifier = Modifier.width(16.dp))
+ Column(
+ modifier = Modifier
+ .fillMaxWidth()
+ .weight(1f),
+ verticalArrangement = Arrangement.Center
+ ) {
+ Text(
+ text = recipe.title?:"",
+ style = TextStyle(
+ fontSize = 16.sp,
+ lineHeight = 22.4.sp,
+ fontWeight = FontWeight(500),
+ color = Color(0xFFFEFEFE)
+ )
+ )
+ Spacer(modifier = Modifier.height(8.dp))
+ Text(
+ text = "Recipe Time: ${recipe.readyInMinutes} min",
+ style = TextStyle(
+ fontSize = 16.sp,
+ lineHeight = 22.4.sp,
+ fontWeight = FontWeight(500),
+ color = Color(0xFFFEFEFE)
+ )
+ )
+ }
+
+ }
+
+ }
+
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/reciperoulette/screens/recipescreen/RecipiesViewModel.kt b/app/src/main/java/com/example/reciperoulette/screens/recipescreen/RecipiesViewModel.kt
new file mode 100644
index 00000000..c610140d
--- /dev/null
+++ b/app/src/main/java/com/example/reciperoulette/screens/recipescreen/RecipiesViewModel.kt
@@ -0,0 +1,50 @@
+package com.example.reciperoulette.screens.recipescreen
+
+import androidx.lifecycle.ViewModel
+import androidx.lifecycle.viewModelScope
+import com.example.reciperoulette.data.local.getAllRecipeList
+import com.example.reciperoulette.data.local.getNonVegRecipeList
+import com.example.reciperoulette.data.local.getVegRecipeList
+import com.example.reciperoulette.data.repositoryimpl.RecipesRepositoryImpl
+import com.example.reciperoulette.domain.recipesUseCase.RecipesUseCase
+import com.example.reciperoulette.model.Recipe
+import dagger.hilt.android.lifecycle.HiltViewModel
+import kotlinx.coroutines.flow.MutableStateFlow
+import kotlinx.coroutines.flow.StateFlow
+import kotlinx.coroutines.launch
+import javax.inject.Inject
+
+@HiltViewModel
+class RecipesViewModel @Inject constructor(private val recipesUseCase: RecipesUseCase) :
+ ViewModel() {
+ private val _recipeList = MutableStateFlow(emptyList())
+ val recipeList: StateFlow>
+ get() = _recipeList
+
+ init {
+// getData()
+ }
+
+ fun updateRecipeList(filterCards: FilterCards) {
+ when (filterCards) {
+ FilterCards.ALL -> {
+ viewModelScope.launch {
+ _recipeList.value = recipesUseCase.getRecipeData()
+ }
+
+ }
+
+ FilterCards.VEG -> {
+ viewModelScope.launch {
+ _recipeList.value = recipesUseCase.getVegData()
+ }
+ }
+
+ FilterCards.NON_VEG -> {
+ viewModelScope.launch {
+ _recipeList.value = recipesUseCase.getNonVegData()
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/reciperoulette/ui/theme/Color.kt b/app/src/main/java/com/example/reciperoulette/ui/theme/Color.kt
new file mode 100644
index 00000000..680d3ae3
--- /dev/null
+++ b/app/src/main/java/com/example/reciperoulette/ui/theme/Color.kt
@@ -0,0 +1,11 @@
+package com.example.reciperoulette.ui.theme
+
+import androidx.compose.ui.graphics.Color
+
+val Purple80 = Color(0xFFD0BCFF)
+val PurpleGrey80 = Color(0xFFCCC2DC)
+val Pink80 = Color(0xFFEFB8C8)
+
+val Purple40 = Color(0xFF6650a4)
+val PurpleGrey40 = Color(0xFF625b71)
+val Pink40 = Color(0xFF7D5260)
\ No newline at end of file
diff --git a/app/src/main/java/com/example/reciperoulette/ui/theme/Theme.kt b/app/src/main/java/com/example/reciperoulette/ui/theme/Theme.kt
new file mode 100644
index 00000000..b2d4ef5c
--- /dev/null
+++ b/app/src/main/java/com/example/reciperoulette/ui/theme/Theme.kt
@@ -0,0 +1,58 @@
+package com.example.reciperoulette.ui.theme
+
+import android.app.Activity
+import android.os.Build
+import androidx.compose.foundation.isSystemInDarkTheme
+import androidx.compose.material3.MaterialTheme
+import androidx.compose.material3.darkColorScheme
+import androidx.compose.material3.dynamicDarkColorScheme
+import androidx.compose.material3.dynamicLightColorScheme
+import androidx.compose.material3.lightColorScheme
+import androidx.compose.runtime.Composable
+import androidx.compose.ui.platform.LocalContext
+
+private val DarkColorScheme = darkColorScheme(
+ primary = Purple80,
+ secondary = PurpleGrey80,
+ tertiary = Pink80
+)
+
+private val LightColorScheme = lightColorScheme(
+ primary = Purple40,
+ secondary = PurpleGrey40,
+ tertiary = Pink40
+
+ /* Other default colors to override
+ background = Color(0xFFFFFBFE),
+ surface = Color(0xFFFFFBFE),
+ onPrimary = Color.White,
+ onSecondary = Color.White,
+ onTertiary = Color.White,
+ onBackground = Color(0xFF1C1B1F),
+ onSurface = Color(0xFF1C1B1F),
+ */
+)
+
+@Composable
+fun RecipeRouletteTheme(
+ darkTheme: Boolean = isSystemInDarkTheme(),
+ // Dynamic color is available on Android 12+
+ dynamicColor: Boolean = true,
+ content: @Composable () -> Unit
+) {
+ val colorScheme = when {
+ dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> {
+ val context = LocalContext.current
+ if (darkTheme) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context)
+ }
+
+ darkTheme -> DarkColorScheme
+ else -> LightColorScheme
+ }
+
+ MaterialTheme(
+ colorScheme = colorScheme,
+ typography = Typography,
+ content = content
+ )
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/reciperoulette/ui/theme/Type.kt b/app/src/main/java/com/example/reciperoulette/ui/theme/Type.kt
new file mode 100644
index 00000000..d0cf3612
--- /dev/null
+++ b/app/src/main/java/com/example/reciperoulette/ui/theme/Type.kt
@@ -0,0 +1,34 @@
+package com.example.reciperoulette.ui.theme
+
+import androidx.compose.material3.Typography
+import androidx.compose.ui.text.TextStyle
+import androidx.compose.ui.text.font.FontFamily
+import androidx.compose.ui.text.font.FontWeight
+import androidx.compose.ui.unit.sp
+
+// Set of Material typography styles to start with
+val Typography = Typography(
+ bodyLarge = TextStyle(
+ fontFamily = FontFamily.Default,
+ fontWeight = FontWeight.Normal,
+ fontSize = 16.sp,
+ lineHeight = 24.sp,
+ letterSpacing = 0.5.sp
+ )
+ /* Other default text styles to override
+ titleLarge = TextStyle(
+ fontFamily = FontFamily.Default,
+ fontWeight = FontWeight.Normal,
+ fontSize = 22.sp,
+ lineHeight = 28.sp,
+ letterSpacing = 0.sp
+ ),
+ labelSmall = TextStyle(
+ fontFamily = FontFamily.Default,
+ fontWeight = FontWeight.Medium,
+ fontSize = 11.sp,
+ lineHeight = 16.sp,
+ letterSpacing = 0.5.sp
+ )
+ */
+)
\ No newline at end of file
diff --git a/app/src/main/res/drawable/ic_launcher_background.xml b/app/src/main/res/drawable/ic_launcher_background.xml
new file mode 100644
index 00000000..07d5da9c
--- /dev/null
+++ b/app/src/main/res/drawable/ic_launcher_background.xml
@@ -0,0 +1,170 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/drawable/ic_launcher_foreground.xml b/app/src/main/res/drawable/ic_launcher_foreground.xml
new file mode 100644
index 00000000..2b068d11
--- /dev/null
+++ b/app/src/main/res/drawable/ic_launcher_foreground.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/recipe.jpg b/app/src/main/res/drawable/recipe.jpg
new file mode 100644
index 00000000..40e196fa
Binary files /dev/null and b/app/src/main/res/drawable/recipe.jpg differ
diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
new file mode 100644
index 00000000..6f3b755b
--- /dev/null
+++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
new file mode 100644
index 00000000..6f3b755b
--- /dev/null
+++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/app/src/main/res/mipmap-hdpi/ic_launcher.webp
new file mode 100644
index 00000000..c209e78e
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher.webp differ
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
new file mode 100644
index 00000000..b2dfe3d1
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/app/src/main/res/mipmap-mdpi/ic_launcher.webp
new file mode 100644
index 00000000..4f0f1d64
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher.webp differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
new file mode 100644
index 00000000..62b611da
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
new file mode 100644
index 00000000..948a3070
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher.webp differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
new file mode 100644
index 00000000..1b9a6956
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
new file mode 100644
index 00000000..28d4b77f
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
new file mode 100644
index 00000000..9287f508
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
new file mode 100644
index 00000000..aa7d6427
Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
new file mode 100644
index 00000000..9126ae37
Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp differ
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
new file mode 100644
index 00000000..f8c6127d
--- /dev/null
+++ b/app/src/main/res/values/colors.xml
@@ -0,0 +1,10 @@
+
+
+ #FFBB86FC
+ #FF6200EE
+ #FF3700B3
+ #FF03DAC5
+ #FF018786
+ #FF000000
+ #FFFFFFFF
+
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
new file mode 100644
index 00000000..ad542221
--- /dev/null
+++ b/app/src/main/res/values/strings.xml
@@ -0,0 +1,3 @@
+
+ Recipe Roulette
+
\ No newline at end of file
diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml
new file mode 100644
index 00000000..29f31d77
--- /dev/null
+++ b/app/src/main/res/values/themes.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/xml/backup_rules.xml b/app/src/main/res/xml/backup_rules.xml
new file mode 100644
index 00000000..fa0f996d
--- /dev/null
+++ b/app/src/main/res/xml/backup_rules.xml
@@ -0,0 +1,13 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/xml/data_extraction_rules.xml b/app/src/main/res/xml/data_extraction_rules.xml
new file mode 100644
index 00000000..9ee9997b
--- /dev/null
+++ b/app/src/main/res/xml/data_extraction_rules.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/test/java/com/example/reciperoulette/ExampleUnitTest.kt b/app/src/test/java/com/example/reciperoulette/ExampleUnitTest.kt
new file mode 100644
index 00000000..a6d925db
--- /dev/null
+++ b/app/src/test/java/com/example/reciperoulette/ExampleUnitTest.kt
@@ -0,0 +1,17 @@
+package com.example.reciperoulette
+
+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/build.gradle.kts b/build.gradle.kts
new file mode 100644
index 00000000..56f6850c
--- /dev/null
+++ b/build.gradle.kts
@@ -0,0 +1,7 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+plugins {
+ alias(libs.plugins.android.application) apply false
+ alias(libs.plugins.jetbrains.kotlin.android) apply false
+ id("com.google.dagger.hilt.android") version "2.48.1" apply false
+ id("com.google.devtools.ksp") version "1.9.20-1.0.14" apply false
+}
\ No newline at end of file
diff --git a/gradle.properties b/gradle.properties
new file mode 100644
index 00000000..20e2a015
--- /dev/null
+++ b/gradle.properties
@@ -0,0 +1,23 @@
+# Project-wide Gradle settings.
+# IDE (e.g. Android Studio) users:
+# Gradle settings configured through the IDE *will override*
+# any settings specified in this file.
+# For more details on how to configure your build environment visit
+# http://www.gradle.org/docs/current/userguide/build_environment.html
+# Specifies the JVM arguments used for the daemon process.
+# The setting is particularly useful for tweaking memory settings.
+org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
+# When configured, Gradle will run in incubating parallel mode.
+# This option should only be used with decoupled projects. For more details, visit
+# https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects
+# org.gradle.parallel=true
+# AndroidX package structure to make it clearer which packages are bundled with the
+# Android operating system, and which are packaged with your app's APK
+# https://developer.android.com/topic/libraries/support-library/androidx-rn
+android.useAndroidX=true
+# Kotlin code style for this project: "official" or "obsolete":
+kotlin.code.style=official
+# Enables namespacing of each library's R class so that its R class includes only the
+# resources declared in the library itself and none from the library's dependencies,
+# thereby reducing the size of the R class for that library
+android.nonTransitiveRClass=true
\ No newline at end of file
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
new file mode 100644
index 00000000..fd71a4aa
--- /dev/null
+++ b/gradle/libs.versions.toml
@@ -0,0 +1,47 @@
+[versions]
+agp = "8.5.2"
+coilCompose = "2.7.0"
+kotlin = "1.9.0"
+coreKtx = "1.13.1"
+junit = "4.13.2"
+junitVersion = "1.2.1"
+espressoCore = "3.6.1"
+lifecycleRuntimeKtx = "2.8.6"
+activityCompose = "1.9.2"
+composeBom = "2024.04.01"
+navigationCompose = "2.8.2"
+hiltAndroidVersion = "2.48.1"
+hiltAndroidCompilerVersion = "2.48.1"
+hiltNavigationCompose = "1.2.0"
+converterGson = "2.9.0"
+retrofit = "2.9.0"
+
+[libraries]
+androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
+androidx-lifecycle-viewmodel-compose = { module = "androidx.lifecycle:lifecycle-viewmodel-compose", version.ref = "lifecycleRuntimeKtx" }
+coil-compose = { module = "io.coil-kt:coil-compose", version.ref = "coilCompose" }
+junit = { group = "junit", name = "junit", version.ref = "junit" }
+androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
+androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
+androidx-lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "lifecycleRuntimeKtx" }
+androidx-activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "activityCompose" }
+androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "composeBom" }
+androidx-ui = { group = "androidx.compose.ui", name = "ui" }
+androidx-ui-graphics = { group = "androidx.compose.ui", name = "ui-graphics" }
+androidx-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling" }
+androidx-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview" }
+androidx-ui-test-manifest = { group = "androidx.compose.ui", name = "ui-test-manifest" }
+androidx-ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4" }
+androidx-material3 = { group = "androidx.compose.material3", name = "material3" }
+androidx-navigation-compose = { group = "androidx.navigation", name = "navigation-compose", version.ref = "navigationCompose" }
+dagger-compiler = { module = "com.google.dagger:dagger-compiler", version.ref = "hiltAndroidVersion" }
+hilt-android-compiler-v2481 = { module = "com.google.dagger:hilt-android-compiler", version.ref = "hiltAndroidCompilerVersion" }
+hilt-android-v2481 = { module = "com.google.dagger:hilt-android", version.ref = "hiltAndroidVersion" }
+androidx-hilt-navigation-compose = { module = "androidx.hilt:hilt-navigation-compose", version.ref = "hiltNavigationCompose" }
+converter-gson = { module = "com.squareup.retrofit2:converter-gson", version.ref = "converterGson" }
+retrofit = { module = "com.squareup.retrofit2:retrofit", version.ref = "retrofit" }
+
+[plugins]
+android-application = { id = "com.android.application", version.ref = "agp" }
+jetbrains-kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
+
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 00000000..e708b1c0
Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 00000000..b3dcafee
--- /dev/null
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Thu Oct 03 15:51:36 IST 2024
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
diff --git a/gradlew b/gradlew
new file mode 100644
index 00000000..4f906e0c
--- /dev/null
+++ b/gradlew
@@ -0,0 +1,185 @@
+#!/usr/bin/env sh
+
+#
+# Copyright 2015 the original author or authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn () {
+ echo "$*"
+}
+
+die () {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+ NONSTOP* )
+ nonstop=true
+ ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin or MSYS, switch paths to Windows format before running java
+if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=`expr $i + 1`
+ done
+ case $i in
+ 0) set -- ;;
+ 1) set -- "$args0" ;;
+ 2) set -- "$args0" "$args1" ;;
+ 3) set -- "$args0" "$args1" "$args2" ;;
+ 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Escape application args
+save () {
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+ echo " "
+}
+APP_ARGS=`save "$@"`
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+exec "$JAVACMD" "$@"
diff --git a/gradlew.bat b/gradlew.bat
new file mode 100644
index 00000000..107acd32
--- /dev/null
+++ b/gradlew.bat
@@ -0,0 +1,89 @@
+@rem
+@rem Copyright 2015 the original author or authors.
+@rem
+@rem Licensed under the Apache License, Version 2.0 (the "License");
+@rem you may not use this file except in compliance with the License.
+@rem You may obtain a copy of the License at
+@rem
+@rem https://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing, software
+@rem distributed under the License is distributed on an "AS IS" BASIS,
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@rem See the License for the specific language governing permissions and
+@rem limitations under the License.
+@rem
+
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Resolve any "." and ".." in APP_HOME to make it shorter.
+for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto execute
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto execute
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/settings.gradle.kts b/settings.gradle.kts
new file mode 100644
index 00000000..56206db2
--- /dev/null
+++ b/settings.gradle.kts
@@ -0,0 +1,24 @@
+pluginManagement {
+ repositories {
+ google {
+ content {
+ includeGroupByRegex("com\\.android.*")
+ includeGroupByRegex("com\\.google.*")
+ includeGroupByRegex("androidx.*")
+ }
+ }
+ mavenCentral()
+ gradlePluginPortal()
+ }
+}
+dependencyResolutionManagement {
+ repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
+ repositories {
+ google()
+ mavenCentral()
+ }
+}
+
+rootProject.name = "Recipe Roulette"
+include(":app")
+
\ No newline at end of file