Skip to content
Closed
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
48 changes: 45 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
plugins {
id 'org.jetbrains.kotlin.android' version '1.9.10'
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id 'org.jetbrains.kotlin.kapt' version '1.9.10'
id 'com.google.dagger.hilt.android'
}

android {
Expand All @@ -18,6 +20,14 @@ android {
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildFeatures {
compose true
}

composeOptions {
kotlinCompilerExtensionVersion = "1.5.3"
}

buildTypes {
release {
minifyEnabled false
Expand Down Expand Up @@ -75,6 +85,38 @@ dependencies {
implementation 'com.google.android.gms:play-services-location:21.0.1'

// ViewModel and LiveData
implementation 'androidx.lifecycle:lifecycle-viewmodel:2.6.2'
implementation 'androidx.lifecycle:lifecycle-livedata:2.6.2'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.7.0'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.7.0'
implementation "androidx.lifecycle:lifecycle-runtime-compose:2.7.0"
implementation "androidx.lifecycle:lifecycle-viewmodel-compose:2.7.0"

// Compose
def composeBom = platform('androidx.compose:compose-bom:2024.02.01')
implementation composeBom
androidTestImplementation composeBom
implementation 'androidx.compose.material3:material3'
implementation 'androidx.compose.ui:ui'
implementation 'androidx.compose.ui:ui-tooling-preview'
debugImplementation 'androidx.compose.ui:ui-tooling'
implementation 'androidx.activity:activity-compose:1.8.2'
implementation 'androidx.compose.material:material-icons-extended'

// Hilt
implementation "com.google.dagger:hilt-android:2.51.1"
kapt "com.google.dagger:hilt-compiler:2.51.1"
implementation 'androidx.hilt:hilt-navigation-compose:1.2.0'
implementation 'androidx.hilt:hilt-work:1.2.0'
kapt 'androidx.hilt:hilt-compiler:1.2.0'
Comment on lines +105 to +109
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For better maintainability and to avoid version mismatches, consider defining Hilt versions in variables, similar to how room_version is defined. This makes it easier to update Hilt-related dependencies together and ensures consistency.

// Hilt
def hilt_version = "2.51.1"
def androidx_hilt_version = "1.2.0"
implementation "com.google.dagger:hilt-android:$hilt_version"
kapt "com.google.dagger:hilt-compiler:$hilt_version"
implementation "androidx.hilt:hilt-navigation-compose:$androidx_hilt_version"
implementation "androidx.hilt:hilt-work:$androidx_hilt_version"
kapt "androidx.hilt:hilt-compiler:$androidx_hilt_version"


// Room
def room_version = "2.6.1"
implementation "androidx.room:room-runtime:$room_version"
implementation "androidx.room:room-ktx:$room_version"
kapt "androidx.room:room-compiler:$room_version"

// Coil
implementation("io.coil-kt:coil-compose:2.6.0")

// DataStore
implementation "androidx.datastore:datastore-preferences:1.0.0"
}
1 change: 1 addition & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<uses-permission android:name="android.permission.health.READ_STEPS" />

<application
android:name=".TheLoopApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
Expand Down
283 changes: 0 additions & 283 deletions app/src/main/java/com/example/theloop/DashboardAdapter.java

This file was deleted.

Loading
Loading