-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
plugins { | ||
id("com.android.application") | ||
id("org.jetbrains.kotlin.android") | ||
id("com.google.dagger.hilt.android") | ||
id("com.google.devtools.ksp") | ||
} | ||
|
||
android { | ||
namespace = "com.example.studysmart" | ||
compileSdk = 34 | ||
|
||
defaultConfig { | ||
applicationId = "com.example.studysmart" | ||
minSdk = 21 | ||
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 { | ||
isCoreLibraryDesugaringEnabled = true | ||
sourceCompatibility = JavaVersion.VERSION_17 | ||
targetCompatibility = JavaVersion.VERSION_17 | ||
} | ||
kotlinOptions { | ||
jvmTarget = "17" | ||
} | ||
buildFeatures { | ||
compose = true | ||
} | ||
composeOptions { | ||
kotlinCompilerExtensionVersion = "1.5.3" | ||
} | ||
packaging { | ||
resources { | ||
excludes += "/META-INF/{AL2.0,LGPL2.1}" | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
|
||
implementation("androidx.core:core-ktx:1.12.0") | ||
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.2") | ||
implementation("androidx.activity:activity-compose:1.8.0") | ||
implementation(platform("androidx.compose:compose-bom:2023.10.00")) | ||
implementation("androidx.compose.ui:ui") | ||
implementation("androidx.compose.ui:ui-graphics") | ||
implementation("androidx.compose.ui:ui-tooling-preview") | ||
implementation("androidx.compose.material3:material3") | ||
testImplementation("junit:junit:4.13.2") | ||
androidTestImplementation("androidx.test.ext:junit:1.1.5") | ||
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1") | ||
androidTestImplementation(platform("androidx.compose:compose-bom:2023.10.00")) | ||
androidTestImplementation("androidx.compose.ui:ui-test-junit4") | ||
debugImplementation("androidx.compose.ui:ui-tooling") | ||
debugImplementation("androidx.compose.ui:ui-test-manifest") | ||
|
||
implementation("androidx.lifecycle:lifecycle-runtime-compose:2.7.0-alpha02") | ||
|
||
//compose destination | ||
val destinationVersion = "1.9.52" | ||
implementation("io.github.raamcosta.compose-destinations:core:$destinationVersion") | ||
ksp("io.github.raamcosta.compose-destinations:ksp:$destinationVersion") | ||
|
||
// Room | ||
val roomVersion = "2.5.2" | ||
implementation("androidx.room:room-runtime:$roomVersion") | ||
ksp("androidx.room:room-compiler:$roomVersion") | ||
implementation("androidx.room:room-ktx:$roomVersion") | ||
|
||
//Dagger-Hilt | ||
implementation("com.google.dagger:hilt-android:2.48") | ||
ksp("com.google.dagger:hilt-android-compiler:2.48") | ||
ksp("androidx.hilt:hilt-compiler:1.0.0") | ||
implementation("androidx.hilt:hilt-navigation-compose:1.0.0") | ||
|
||
//fonts | ||
implementation("androidx.compose.ui:ui-text-google-fonts:1.5.3") | ||
|
||
//Desugaring | ||
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.0.3") | ||
} |
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 | ||
# 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 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.example.studysmart | ||
|
||
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.studysmart", appContext.packageName) | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools"> | ||
|
||
<application | ||
android:allowBackup="true" | ||
android:dataExtractionRules="@xml/data_extraction_rules" | ||
android:fullBackupContent="@xml/backup_rules" | ||
android:icon="@mipmap/ic_launcher" | ||
android:label="@string/app_name" | ||
android:roundIcon="@mipmap/ic_launcher_round" | ||
android:supportsRtl="true" | ||
android:theme="@style/Theme.StudySmart" | ||
tools:targetApi="31"> | ||
<activity | ||
android:name=".MainActivity" | ||
android:exported="true" | ||
android:label="@string/app_name" | ||
android:theme="@style/Theme.StudySmart"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
|
||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
</application> | ||
|
||
</manifest> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package com.example.studysmart | ||
|
||
import android.os.Bundle | ||
import androidx.activity.ComponentActivity | ||
import androidx.activity.compose.setContent | ||
import androidx.compose.foundation.layout.fillMaxSize | ||
import androidx.compose.material3.MaterialTheme | ||
import androidx.compose.material3.Surface | ||
import androidx.compose.material3.Text | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.tooling.preview.Preview | ||
import com.example.studysmart.ui.theme.StudySmartTheme | ||
|
||
class MainActivity : ComponentActivity() { | ||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
setContent { | ||
StudySmartTheme { | ||
// A surface container using the 'background' color from the theme | ||
Surface( | ||
modifier = Modifier.fillMaxSize(), | ||
color = MaterialTheme.colorScheme.background | ||
) { | ||
Greeting("Android") | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
@Composable | ||
fun Greeting(name: String, modifier: Modifier = Modifier) { | ||
Text( | ||
text = "Hello $name!", | ||
modifier = modifier | ||
) | ||
} | ||
|
||
@Preview(showBackground = true) | ||
@Composable | ||
fun GreetingPreview() { | ||
StudySmartTheme { | ||
Greeting("Android") | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
package com.example.studysmart.ui.theme | ||
|
||
import androidx.compose.ui.graphics.Color | ||
|
||
val md_theme_light_primary = Color(0xFF185ABE) | ||
val md_theme_light_onPrimary = Color(0xFFFFFFFF) | ||
val md_theme_light_primaryContainer = Color(0xFFD8E2FF) | ||
val md_theme_light_onPrimaryContainer = Color(0xFF001A43) | ||
val md_theme_light_secondary = Color(0xFF575E71) | ||
val md_theme_light_onSecondary = Color(0xFFFFFFFF) | ||
val md_theme_light_secondaryContainer = Color(0xFFDBE2F9) | ||
val md_theme_light_onSecondaryContainer = Color(0xFF141B2C) | ||
val md_theme_light_tertiary = Color(0xFF715573) | ||
val md_theme_light_onTertiary = Color(0xFFFFFFFF) | ||
val md_theme_light_tertiaryContainer = Color(0xFFFCD7FB) | ||
val md_theme_light_onTertiaryContainer = Color(0xFF2A132D) | ||
val md_theme_light_error = Color(0xFFBA1A1A) | ||
val md_theme_light_errorContainer = Color(0xFFFFDAD6) | ||
val md_theme_light_onError = Color(0xFFFFFFFF) | ||
val md_theme_light_onErrorContainer = Color(0xFF410002) | ||
val md_theme_light_background = Color(0xFFFEFBFF) | ||
val md_theme_light_onBackground = Color(0xFF1B1B1F) | ||
val md_theme_light_surface = Color(0xFFFEFBFF) | ||
val md_theme_light_onSurface = Color(0xFF1B1B1F) | ||
val md_theme_light_surfaceVariant = Color(0xFFE1E2EC) | ||
val md_theme_light_onSurfaceVariant = Color(0xFF44474F) | ||
val md_theme_light_outline = Color(0xFF757780) | ||
val md_theme_light_inverseOnSurface = Color(0xFFF2F0F4) | ||
val md_theme_light_inverseSurface = Color(0xFF303034) | ||
val md_theme_light_inversePrimary = Color(0xFFAEC6FF) | ||
val md_theme_light_shadow = Color(0xFF000000) | ||
val md_theme_light_surfaceTint = Color(0xFF185ABE) | ||
val md_theme_light_outlineVariant = Color(0xFFC5C6D0) | ||
val md_theme_light_scrim = Color(0xFF000000) | ||
|
||
val md_theme_dark_primary = Color(0xFFAEC6FF) | ||
val md_theme_dark_onPrimary = Color(0xFF002E6C) | ||
val md_theme_dark_primaryContainer = Color(0xFF004397) | ||
val md_theme_dark_onPrimaryContainer = Color(0xFFD8E2FF) | ||
val md_theme_dark_secondary = Color(0xFFBFC6DC) | ||
val md_theme_dark_onSecondary = Color(0xFF293041) | ||
val md_theme_dark_secondaryContainer = Color(0xFF3F4759) | ||
val md_theme_dark_onSecondaryContainer = Color(0xFFDBE2F9) | ||
val md_theme_dark_tertiary = Color(0xFFDFBBDE) | ||
val md_theme_dark_onTertiary = Color(0xFF402843) | ||
val md_theme_dark_tertiaryContainer = Color(0xFF583E5A) | ||
val md_theme_dark_onTertiaryContainer = Color(0xFFFCD7FB) | ||
val md_theme_dark_error = Color(0xFFFFB4AB) | ||
val md_theme_dark_errorContainer = Color(0xFF93000A) | ||
val md_theme_dark_onError = Color(0xFF690005) | ||
val md_theme_dark_onErrorContainer = Color(0xFFFFDAD6) | ||
val md_theme_dark_background = Color(0xFF1B1B1F) | ||
val md_theme_dark_onBackground = Color(0xFFE3E2E6) | ||
val md_theme_dark_surface = Color(0xFF1B1B1F) | ||
val md_theme_dark_onSurface = Color(0xFFE3E2E6) | ||
val md_theme_dark_surfaceVariant = Color(0xFF44474F) | ||
val md_theme_dark_onSurfaceVariant = Color(0xFFC5C6D0) | ||
val md_theme_dark_outline = Color(0xFF8E9099) | ||
val md_theme_dark_inverseOnSurface = Color(0xFF1B1B1F) | ||
val md_theme_dark_inverseSurface = Color(0xFFE3E2E6) | ||
val md_theme_dark_inversePrimary = Color(0xFF185ABE) | ||
val md_theme_dark_shadow = Color(0xFF000000) | ||
val md_theme_dark_surfaceTint = Color(0xFFAEC6FF) | ||
val md_theme_dark_outlineVariant = Color(0xFF44474F) | ||
val md_theme_dark_scrim = Color(0xFF000000) |