-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from mutkuensert/develop
v2.0.0
- Loading branch information
Showing
61 changed files
with
1,351 additions
and
870 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
import java.io.FileInputStream | ||
import java.util.Properties | ||
|
||
plugins { | ||
alias(libs.plugins.android.application) | ||
alias(libs.plugins.jetbrains.kotlin.android) | ||
alias(libs.plugins.dagger.hilt.android) | ||
alias(libs.plugins.kotlin.ksp) | ||
alias(libs.plugins.compose.compiler.plugin) | ||
alias(libs.plugins.kotlin.serialization) | ||
} | ||
|
||
android { | ||
namespace = "com.mutkuensert.highlightandnote" | ||
compileSdk = 35 | ||
|
||
defaultConfig { | ||
applicationId = "com.mutkuensert.highlightandnote" | ||
minSdk = 23 | ||
targetSdk = 35 | ||
versionCode = 7 | ||
versionName = "2.0.0" | ||
|
||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" | ||
} | ||
|
||
val keystorePropertiesFile = rootProject.file("keystore.properties") | ||
val keystoreProperties = Properties() | ||
keystoreProperties.load(FileInputStream(keystorePropertiesFile)) | ||
|
||
signingConfigs { | ||
create("release") { | ||
keyAlias = keystoreProperties["KEY_ALIAS"] as String | ||
keyPassword = keystoreProperties["KEY_PASSWORD"] as String | ||
storeFile = file(keystoreProperties["STORE_FILE"] as String) | ||
storePassword = keystoreProperties["STORE_PASSWORD"] as String | ||
} | ||
} | ||
|
||
buildTypes { | ||
release { | ||
isMinifyEnabled = true | ||
isShrinkResources = true | ||
|
||
proguardFiles( | ||
getDefaultProguardFile("proguard-android-optimize.txt"), | ||
"proguard-rules.pro" | ||
) | ||
|
||
signingConfig = signingConfigs.getByName("release") | ||
} | ||
} | ||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
} | ||
kotlinOptions { | ||
jvmTarget = "1.8" | ||
} | ||
|
||
buildFeatures { | ||
viewBinding = true | ||
compose = true | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation(libs.androidx.core.ktx) | ||
implementation(libs.androidx.appcompat) | ||
implementation(libs.androidx.activity.compose) | ||
|
||
implementation(platform(libs.compose.bom)) | ||
implementation(libs.compose.material3) | ||
implementation(libs.compose.material.icons) | ||
implementation(libs.compose.preview) | ||
implementation(libs.compose.hilt.navigation) | ||
implementation(libs.compose.navigation) | ||
implementation(libs.compose.view.model) | ||
|
||
implementation(libs.androidx.activity) | ||
testImplementation(libs.junit) | ||
androidTestImplementation(libs.androidx.junit) | ||
androidTestImplementation(libs.androidx.espresso.core) | ||
|
||
implementation(libs.dagger.hilt) | ||
debugImplementation(libs.androidx.ui.tooling) | ||
ksp(libs.dagger.hilt.compiler) | ||
|
||
implementation(libs.navigation.ui) | ||
|
||
implementation(libs.kotlin.serialization) | ||
|
||
implementation(libs.room) | ||
implementation(libs.room.ktx) | ||
ksp(libs.room.compiler) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
app/src/main/java/com/mutkuensert/highlightandnote/HighlightAndNoteApp.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.mutkuensert.highlightandnote | ||
|
||
import android.app.Application | ||
import dagger.hilt.android.HiltAndroidApp | ||
|
||
@HiltAndroidApp | ||
class HighlightAndNoteApp : Application() |
48 changes: 0 additions & 48 deletions
48
app/src/main/java/com/mutkuensert/highlightandnote/adapter/NotesRecyclerAdapter.kt
This file was deleted.
Oops, something went wrong.
23 changes: 23 additions & 0 deletions
23
app/src/main/java/com/mutkuensert/highlightandnote/core/Navigator.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.mutkuensert.highlightandnote.core | ||
|
||
import androidx.navigation.NavHostController | ||
import com.mutkuensert.highlightandnote.main.MainActivity | ||
import javax.inject.Inject | ||
|
||
class Navigator @Inject constructor() { | ||
lateinit var controller: NavHostController | ||
private set | ||
private lateinit var activity: MainActivity | ||
|
||
fun setNavHostController(controller: NavHostController) { | ||
this.controller = controller | ||
} | ||
|
||
fun setActivity(activity: MainActivity) { | ||
this.activity = activity | ||
} | ||
|
||
fun closeApp() { | ||
activity.finish() | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
app/src/main/java/com/mutkuensert/highlightandnote/core/compose/RepeatOnLifecycleEffect.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.mutkuensert.highlightandnote.core.compose | ||
|
||
import androidx.compose.runtime.Composable | ||
import androidx.compose.runtime.LaunchedEffect | ||
import androidx.lifecycle.Lifecycle | ||
import androidx.lifecycle.compose.LocalLifecycleOwner | ||
import androidx.lifecycle.repeatOnLifecycle | ||
import kotlinx.coroutines.CoroutineScope | ||
|
||
@Composable | ||
fun RepeatOnLifecycleEffect( | ||
vararg keys: Any?, | ||
state: Lifecycle.State = Lifecycle.State.RESUMED, | ||
action: CoroutineScope.() -> Unit | ||
) { | ||
val lifecycle = LocalLifecycleOwner.current | ||
|
||
LaunchedEffect(keys) { | ||
lifecycle.repeatOnLifecycle(state, block = action) | ||
} | ||
} |
Oops, something went wrong.