Skip to content

Commit

Permalink
ff
Browse files Browse the repository at this point in the history
  • Loading branch information
OmarLkhalil committed Oct 4, 2023
1 parent 12d1c61 commit 0c12c9d
Show file tree
Hide file tree
Showing 32 changed files with 413 additions and 181 deletions.
1 change: 1 addition & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ plugins {
alias(libs.plugins.androidApplication)
alias(libs.plugins.kotlinAndroid)
alias(libs.plugins.kotlinKapt)
alias(libs.plugins.firebase)
alias(libs.plugins.hilt)
}

Expand Down Expand Up @@ -66,6 +67,7 @@ dependencies {
implementation(project(mapOf("path" to ":core:data")))
implementation(project(mapOf("path" to ":core:domain")))
implementation(project(mapOf("path" to ":ui:auth")))
implementation(project(mapOf("path" to ":common-ui")))
testImplementation(libs.junit)
androidTestImplementation(libs.androidx.test.ext.junit)
androidTestImplementation(libs.espresso.core)
Expand Down
12 changes: 6 additions & 6 deletions app/google-services.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"project_info": {
"project_number": "155013614979",
"project_id": "destigo-c2512",
"storage_bucket": "destigo-c2512.appspot.com"
"project_number": "236121183205",
"project_id": "destigo-84de1",
"storage_bucket": "destigo-84de1.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:155013614979:android:3b65b7e373253307613ab6",
"mobilesdk_app_id": "1:236121183205:android:16af806d79ade5fbfb950c",
"android_client_info": {
"package_name": "com.example.auth"
"package_name": "com.mobilebreakero.destigo"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyCv6LIbxjRtBl7HL8qfa_cA9euQOzOE4Es"
"current_key": "AIzaSyB7n1nj6mHCGMT7xwdzGffnjsvmHaWZkfU"
}
],
"services": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Surface
import androidx.compose.ui.Modifier
import com.example.auth.MainAuthScreen
import com.example.data.viewmodels.AuthViewModel
import com.mobilebreakero.common_ui.viewmodels.AuthViewModel
import com.mobilebreakero.destigo.ui.theme.DestiGoTheme
import dagger.hilt.android.AndroidEntryPoint

Expand Down
24 changes: 18 additions & 6 deletions app/src/main/java/com/mobilebreakero/destigo/ui/theme/Color.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,22 @@ package com.mobilebreakero.destigo.ui.theme

import androidx.compose.ui.graphics.Color

val Purple80 = Color(0xFFD0BCFF)
val PurpleGrey80 = Color(0xFFCCC2DC)
val Pink80 = Color(0xFFEFB8C8)
val Blue80 = Color(0xFF4F80FF)
val Grey80 = Color(0xFFB0B0B0)

val Purple40 = Color(0xFF6650a4)
val PurpleGrey40 = Color(0xFF625b71)
val Pink40 = Color(0xFF7D5260)
val tertiary80 = Color(
(Blue80.red + Grey80.red) / 2,
(Blue80.green + Grey80.green) / 2,
(Blue80.blue + Grey80.blue) / 2,
(Blue80.alpha + Grey80.alpha) / 2
)

val Blue40 = Color(0xFFD5E1FF)
val BlueGrey40 = Color(0xFFEDF1FD)

val tertiary40 = Color(
(Blue40.red + BlueGrey40.red) / 2,
(Blue40.green + BlueGrey40.green) / 2,
(Blue40.blue + BlueGrey40.blue) / 2,
(Blue40.alpha + BlueGrey40.alpha) / 2
)
21 changes: 6 additions & 15 deletions app/src/main/java/com/mobilebreakero/destigo/ui/theme/Theme.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,16 @@ import androidx.compose.ui.platform.LocalView
import androidx.core.view.WindowCompat

private val DarkColorScheme = darkColorScheme(
primary = Purple80,
secondary = PurpleGrey80,
tertiary = Pink80
primary = Blue80,
secondary = Grey80,
tertiary = tertiary80
)

private val LightColorScheme = lightColorScheme(
primary = Purple40,
secondary = PurpleGrey40,
tertiary = Pink40
primary = Blue40,
secondary = BlueGrey40,
tertiary = tertiary40

/* 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
Expand Down
29 changes: 12 additions & 17 deletions app/src/main/java/com/mobilebreakero/destigo/ui/theme/Type.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,28 @@ package com.mobilebreakero.destigo.ui.theme

import androidx.compose.material3.Typography
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.Font
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.sp
import com.mobilebreakero.destigo.R

// 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
)
*/

)

val RobotoFont = FontFamily(
Font(R.font.robot),
)

val arialrounded = FontFamily(
Font(R.font.araa),
)
Binary file added app/src/main/res/font/araa.ttf
Binary file not shown.
Binary file added app/src/main/res/font/robot.ttf
Binary file not shown.
1 change: 1 addition & 0 deletions common-ui/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
61 changes: 61 additions & 0 deletions common-ui/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
@Suppress("DSL_SCOPE_VIOLATION") // TODO: Remove once KTIJ-19369 is fixed
plugins {
alias(libs.plugins.androidlibrary)
alias(libs.plugins.kotlinAndroid)
alias(libs.plugins.kotlinKapt)
alias(libs.plugins.firebase)
alias(libs.plugins.hilt)
}


android {
namespace = "com.mobilebreakero.common_ui"
compileSdk = 33

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_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}
}

dependencies {
implementation(project(mapOf("path" to ":core:domain")))

implementation(libs.core.ktx)
implementation(libs.appcompat)
implementation(libs.material)
testImplementation(libs.junit)
androidTestImplementation(libs.androidx.test.ext.junit)
androidTestImplementation(libs.espresso.core)

// firebase
implementation(platform(libs.firebase.bom))
implementation(libs.firebase.product)
implementation(libs.firebase.auth)
implementation(platform("com.google.firebase:firebase-bom:32.3.1"))

// hilt
implementation(libs.hilt.android)
implementation(libs.hilt.navigation)
implementation(libs.hilt.navigation.compose)
kapt(libs.hilt.android.compiler)
}
Empty file added common-ui/consumer-rules.pro
Empty file.
29 changes: 29 additions & 0 deletions common-ui/google-services.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"project_info": {
"project_number": "236121183205",
"project_id": "destigo-84de1",
"storage_bucket": "destigo-84de1.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:236121183205:android:16af806d79ade5fbfb950c",
"android_client_info": {
"package_name": "com.mobilebreakero.common_ui"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyB7n1nj6mHCGMT7xwdzGffnjsvmHaWZkfU"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": []
}
}
}
],
"configuration_version": "1"
}
21 changes: 21 additions & 0 deletions common-ui/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -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
# https://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
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.mobilebreakero.common_ui

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](https://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.mobilebreakero.common_ui.test", appContext.packageName)
}
}
4 changes: 4 additions & 0 deletions common-ui/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="https://schemas.android.com/apk/res/android">

</manifest>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.example.data.viewmodels
package com.mobilebreakero.common_ui.viewmodels

import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.mobilebreakero.common_ui

import org.junit.Test

import org.junit.Assert.*

/**
* Example local unit test, which will execute on the development machine (host).
*
* See [testing documentation](https://d.android.com/tools/testing).
*/
class ExampleUnitTest {
@Test
fun addition_isCorrect() {
assertEquals(4, 2 + 2)
}
}
2 changes: 1 addition & 1 deletion core/data/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
plugins {
alias(libs.plugins.androidlibrary)
alias(libs.plugins.kotlinAndroid)
alias(libs.plugins.firebase)
alias(libs.plugins.kotlinKapt)
alias(libs.plugins.hilt)
alias(libs.plugins.firebase)
}

android {
Expand Down
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ include(":ui:auth")
include(":core:domain")
include(":core:data")
include(":ui:home")
include(":common-ui")
1 change: 1 addition & 0 deletions ui/auth/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ dependencies {
implementation(project(mapOf("path" to ":core:domain")))
implementation(project(mapOf("path" to ":ui:home")))
implementation(project(mapOf("path" to ":core:data")))
implementation(project(mapOf("path" to ":common-ui")))
testImplementation(libs.junit)
androidTestImplementation(libs.androidx.test.ext.junit)
androidTestImplementation(libs.espresso.core)
Expand Down
3 changes: 1 addition & 2 deletions ui/auth/src/main/java/com/example/auth/MainAuthScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ import androidx.navigation.compose.rememberNavController
import com.example.auth.login.LoginScreen
import com.example.auth.signup.SignUpScreen
import com.example.auth.start.StartAuthScreen
import com.example.data.viewmodels.AuthViewModel
import com.example.domain.util.Resource
import com.example.home.HomeScreen
import com.google.firebase.auth.ktx.auth
import com.google.firebase.ktx.Firebase
import com.mobilebreakero.common_ui.viewmodels.AuthViewModel

@Composable
fun MainAuthScreen(
Expand Down
Loading

0 comments on commit 0c12c9d

Please sign in to comment.