Skip to content

Commit 2ca6ab0

Browse files
authored
Merge pull request #5 from Fandroid745/dev
Add Material UI support and UI improvements
2 parents 170dc39 + d130fde commit 2ca6ab0

File tree

34 files changed

+658
-416
lines changed

34 files changed

+658
-416
lines changed

.idea/caches/deviceStreaming.xml

Lines changed: 50 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/workspace.xml

Lines changed: 35 additions & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/build.gradle

Lines changed: 37 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,37 @@
11
plugins {
22
id 'com.android.application'
33
id 'org.jetbrains.kotlin.android'
4-
id 'kotlin-kapt'
4+
id 'com.google.devtools.ksp' version '1.9.23-1.0.20'
55
id 'dagger.hilt.android.plugin'
66
}
77

88
android {
99
namespace 'com.opennotes'
1010
compileSdk 35
11-
buildToolsVersion "34.0.0"
1211

1312
defaultConfig {
1413
applicationId "com.opennotes"
1514
minSdk 24
1615
targetSdk 35
17-
versionCode 4
18-
versionName "1.3"
16+
versionCode 5
17+
versionName "1.3.1"
1918

2019
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
21-
vectorDrawables.useSupportLibrary = true
20+
vectorDrawables {
21+
useSupportLibrary true
22+
}
2223
}
2324

24-
2525
dependenciesInfo {
26-
27-
includeInApk = false
28-
29-
includeInBundle = false
26+
includeInApk false
27+
includeInBundle false
3028
}
3129

3230
buildTypes {
3331
release {
3432
minifyEnabled true
3533
shrinkResources true
36-
proguardFiles(
37-
getDefaultProguardFile('proguard-android-optimize.txt'),
38-
'proguard-rules.pro'
39-
)
34+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
4035
}
4136
}
4237

@@ -67,44 +62,48 @@ android {
6762

6863
dependencies {
6964
// Compose BOM
70-
implementation platform("androidx.compose:compose-bom:2024.04.00")
71-
implementation "androidx.compose.ui:ui"
72-
implementation "androidx.compose.material:material"
73-
implementation "androidx.compose.material:material-icons-extended"
74-
implementation "androidx.compose.ui:ui-tooling-preview"
75-
debugImplementation "androidx.compose.ui:ui-tooling"
76-
androidTestImplementation platform("androidx.compose:compose-bom:2024.04.00")
77-
androidTestImplementation "androidx.compose.ui:ui-test-junit4"
78-
79-
implementation "androidx.activity:activity-compose:1.8.2"
80-
implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.6.2"
81-
implementation "androidx.lifecycle:lifecycle-viewmodel-compose:2.6.2"
82-
implementation "androidx.navigation:navigation-compose:2.7.7"
83-
implementation "androidx.hilt:hilt-navigation-compose:1.1.0"
65+
implementation platform('androidx.compose:compose-bom:2024.04.00')
66+
implementation 'androidx.compose.ui:ui'
67+
implementation 'androidx.compose.material:material'
68+
implementation 'androidx.compose.material:material-icons-extended'
69+
implementation 'androidx.compose.ui:ui-tooling-preview'
70+
implementation 'androidx.datastore:datastore-core-android:1.1.7'
71+
implementation 'androidx.datastore:datastore-preferences:1.1.1'
72+
debugImplementation 'androidx.compose.ui:ui-tooling'
73+
androidTestImplementation platform('androidx.compose:compose-bom:2024.04.00')
74+
androidTestImplementation 'androidx.compose.ui:ui-test-junit4'
75+
76+
implementation 'androidx.activity:activity-compose:1.8.2'
77+
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.2'
78+
implementation 'androidx.lifecycle:lifecycle-viewmodel-compose:2.6.2'
79+
implementation 'androidx.navigation:navigation-compose:2.7.7'
80+
implementation 'androidx.hilt:hilt-navigation-compose:1.1.0'
8481

8582
// Material 3
86-
implementation "androidx.compose.material3:material3:1.2.1"
83+
implementation 'androidx.compose.material3:material3:1.2.1'
8784

8885
// Core Android
8986
implementation 'androidx.core:core-ktx:1.13.1'
9087
implementation 'androidx.appcompat:appcompat:1.6.1'
9188
implementation 'com.google.android.material:material:1.11.0'
9289

93-
// Hilt
94-
implementation "com.google.dagger:hilt-android:2.48"
95-
kapt "com.google.dagger:hilt-android-compiler:2.48"
96-
kapt "androidx.hilt:hilt-compiler:1.1.0"
90+
// Hilt with KSP
91+
implementation 'com.google.dagger:hilt-android:2.48'
92+
ksp 'com.google.dagger:hilt-android-compiler:2.48'
93+
ksp 'androidx.hilt:hilt-compiler:1.1.0'
9794

98-
// Room
99-
implementation "androidx.room:room-runtime:2.6.1"
100-
kapt "androidx.room:room-compiler:2.6.1"
101-
implementation "androidx.room:room-ktx:2.6.1"
95+
// Room with KSP - Compatible with Kotlin 1.9.23
96+
implementation 'androidx.room:room-runtime:2.6.1'
97+
implementation 'androidx.room:room-ktx:2.6.1'
98+
ksp 'androidx.room:room-compiler:2.6.1'
10299

103100
// Coroutines
104101
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3'
105102
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3'
106103

107-
implementation("com.google.code.gson:gson:2.10.1")
104+
implementation 'com.google.code.gson:gson:2.10.1'
105+
106+
implementation 'androidx.core:core-splashscreen:1.0.1'
108107

109108
// Testing
110109
testImplementation 'junit:junit:4.13.2'

app/src/main/java/com/opennotes/di/AppModule.kt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package com.opennotes.di
22

33
import android.app.Application
4-
import androidx.room.Room
4+
55
import com.opennotes.feature_node.data.data_source.NoteDatabase
66
import com.opennotes.feature_node.data.repository.AndroidFileHandler
77
import com.opennotes.feature_node.data.repository.FileHandler
@@ -13,6 +13,7 @@ import com.opennotes.feature_node.domain.use_case.AddNote
1313
import com.opennotes.feature_node.domain.use_case.DeleteNote
1414
import com.opennotes.feature_node.domain.use_case.ExportUseCases
1515
import com.opennotes.feature_node.domain.use_case.GetNote
16+
import androidx.room.Room
1617
import com.opennotes.feature_node.domain.use_case.GetNotes
1718
import com.opennotes.feature_node.domain.use_case.ImportUseCases
1819
import com.opennotes.feature_node.domain.use_case.NoteUseCases
@@ -58,7 +59,7 @@ object AppModule {
5859
return GsonJsonHandler()
5960
}
6061

61-
// CORRECTED: Now takes all necessary dependencies as parameters
62+
6263
@Provides
6364
@Singleton
6465
fun provideNoteUseCaseId(
@@ -67,12 +68,12 @@ object AppModule {
6768
fileHandler: FileHandler
6869
): NoteUseCases {
6970
return NoteUseCases(
70-
getNotes = GetNotes(repository),
71+
7172
deleteNote = DeleteNote(repository),
7273
addNote = AddNote(repository),
7374
getNote = GetNote(repository),
75+
getNotes = GetNotes(repository),
7476
searchNotes = SearchNotesUseCase(repository),
75-
7677
importNotes = ImportUseCases(repository, fileHandler,jsonHandler),
7778
exportNotes = ExportUseCases(repository, fileHandler,jsonHandler)
7879
)

0 commit comments

Comments
 (0)