Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ dependencies {
implementation(project(":core:feature:feature-product"))
implementation(project(":core:feature:feature-cart"))
implementation(project(":core:feature:feature-search"))
implementation(project(":core:feature:feature-auth"))
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.activity.compose)
implementation(platform(libs.androidx.compose.bom))
Expand Down
24 changes: 23 additions & 1 deletion app/src/main/java/com/sa/commercex/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import androidx.compose.material3.Surface
import androidx.compose.runtime.*
import androidx.compose.ui.Modifier
import com.sa.feature.cart.ui.CartScreenMockup
import com.sa.feature.auth.ui.LoginScreenMockup
import com.sa.feature.auth.ui.ProfileScreenMockup
import com.sa.feature.product.ui.HomeScreenMockup
import com.sa.feature.product.ui.ProductDetailMockup
import com.sa.feature.search.ui.SearchScreenDefaultMockup
Expand All @@ -31,12 +33,31 @@ class MainActivity : ComponentActivity() {
var showProductDetail by remember { mutableStateOf(false) }
var showCart by remember { mutableStateOf(false) }
var showSearch by remember { mutableStateOf(false) }
var showProfile by remember { mutableStateOf(false) }
var showLogin by remember { mutableStateOf(false) }

Surface(
modifier = Modifier.fillMaxSize(),
color = MaterialTheme.colorScheme.background
) {
when {
showLogin -> {
LoginScreenMockup(
onSignInClick = {
showLogin = false
showProfile = true
}
)
}
showProfile -> {
ProfileScreenMockup(
onBackClick = { showProfile = false },
onLogoutClick = {
showProfile = false
showLogin = true
}
)
}
showSearch -> {
SearchScreenDefaultMockup()
}
Expand All @@ -54,7 +75,8 @@ class MainActivity : ComponentActivity() {
HomeScreenMockup(
onProductClick = { showProductDetail = true },
onCartClick = { showCart = true },
onSearchClick = { showSearch = true }
onSearchClick = { showSearch = true },
onProfileClick = { showProfile = true }
)
}
}
Expand Down
53 changes: 53 additions & 0 deletions core/feature/feature-auth/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.compose)
}

android {
namespace = "com.sa.feature.auth"
compileSdk {
version = release(36)
}

defaultConfig {
minSdk = 28
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
buildFeatures {
compose = true
}
}

dependencies {
implementation(project(":core:ui"))
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.compose.ui)
implementation(libs.androidx.compose.ui.graphics)
implementation(libs.androidx.compose.ui.tooling.preview)
implementation(libs.androidx.compose.material3)
implementation(libs.androidx.compose.material.icons.extended)
testImplementation(libs.junit)
androidTestImplementation(libs.androidx.junit)
androidTestImplementation(libs.androidx.espresso.core)
androidTestImplementation(platform(libs.androidx.compose.bom))
androidTestImplementation(libs.androidx.compose.ui.test.junit4)
debugImplementation(libs.androidx.compose.ui.tooling)
debugImplementation(libs.androidx.compose.ui.test.manifest)
}
2 changes: 2 additions & 0 deletions core/feature/feature-auth/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" />
Loading