Skip to content

Commit

Permalink
Merge pull request #8 from Kamil-Malik/development
Browse files Browse the repository at this point in the history
2.0.1
  • Loading branch information
LeleStacia authored May 14, 2023
2 parents a7fcd6f + 4b56d4b commit 4d1430a
Show file tree
Hide file tree
Showing 16 changed files with 183 additions and 128 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<div align="center">
<img src="https://github.com/Kamil-Malik/lelenime/blob/master/core/common/src/main/res/drawable/lelenime.png" width="480" alt="Centered Image">

![AUR license](https://img.shields.io/aur/license/android-studio?style=for-the-badge)
![GitHub release (latest by date)](https://img.shields.io/github/v/release/Kamil-Malik/lelenime?style=for-the-badge)
![Libraries.io dependency status for GitHub repo](https://img.shields.io/librariesio/github/Kamil-Malik/lelenime?style=for-the-badge)
![GitHub commit activity](https://img.shields.io/github/commit-activity/w/Kamil-Malik/lelenime?style=for-the-badge)
</div>

Lelenime is a mobile app that serves as an Anime Index, providing anime information and details to anime fans. It utilizes the [Jikan API](https://github.com/jikan-me/jikan), which is a community API for anime fans that retrieves data from [MyAnimeList](https://myanimelist.net/).
Expand Down
32 changes: 16 additions & 16 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
id("kotlin-kapt")
id("com.google.dagger.hilt.android")
id("com.google.gms.google-services")
id("com.google.firebase.crashlytics")
id("com.google.firebase.firebase-perf")
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.ktlint)
alias(libs.plugins.kotlin.kapt)
alias(libs.plugins.dagger.hilt.android)
alias(libs.plugins.google.services)
alias(libs.plugins.firebase.crashlytic)
alias(libs.plugins.firebase.performance.monitoring)
}

android {
Expand All @@ -16,8 +17,8 @@ android {
applicationId = "com.lelestacia.lelenime"
minSdk = 26
targetSdk = 33
versionCode = 2
versionName = "2.0"
versionCode = 3
versionName = "2.0.1"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
Expand Down Expand Up @@ -80,10 +81,12 @@ dependencies {
implementation(project(":feature:more"))

// Compose Toolkit
implementation(platform(libs.compose.bom))
val composeBOM = platform(libs.compose.bom)
implementation(composeBOM)
implementation(libs.compose.activity)
implementation(libs.bundles.compose.toolkit)
implementation(libs.compose.navigation)
androidTestImplementation(platform(libs.compose.bom))
androidTestImplementation(composeBOM)
androidTestImplementation(libs.compose.junit)
debugImplementation(libs.bundles.compose.tooling.and.manifest)

Expand All @@ -93,9 +96,6 @@ dependencies {
// Lifecycle
implementation(libs.lifecycle.runtime)

// Activity Compose
implementation(libs.activity.compose)

// Android JUnit
androidTestImplementation(libs.android.junit)

Expand All @@ -115,8 +115,8 @@ dependencies {

// Accompanist
implementation(libs.accompanist.system.ui.controller)
implementation(libs.accompanist.animation.navigation)
implementation(libs.accompanist.bottomsheet.navigation)
implementation(libs.accompanist.navigation.animation)
implementation(libs.accompanist.navigation.bottomsheet)

// Profiler
implementation(libs.baseline.profiler)
Expand Down
4 changes: 2 additions & 2 deletions benchmark/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
alias(libs.plugins.com.android.test)
alias(libs.plugins.kotlin.android.plugin)
alias(libs.plugins.android.test)
alias(libs.plugins.kotlin.android)
}

android {
Expand Down
20 changes: 7 additions & 13 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,16 @@ buildscript {
mavenCentral()
}
dependencies {
classpath(libs.ktlint.gradle.linter)
classpath(libs.gradle)
classpath(libs.google.services)
classpath(libs.firebase.crashlytics.gradle)
classpath(libs.firebase.perf.gradle)
}
}

plugins {
alias(libs.plugins.android.application.plugin) apply false
alias(libs.plugins.android.library.plugin) apply false
alias(libs.plugins.kotlin.android.plugin) apply false
alias(libs.plugins.dagger.hilt.module.plugin) apply false
alias(libs.plugins.com.android.test) apply false
}

allprojects {
apply(plugin = ("org.jlleitschuh.gradle.ktlint"))
alias(libs.plugins.android.application) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.android.test) apply false
alias(libs.plugins.dagger.hilt.android) apply false
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.kotlin.kapt) apply false
alias(libs.plugins.ktlint) apply false
}
10 changes: 6 additions & 4 deletions core/common/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id("com.android.library")
id("org.jetbrains.kotlin.android")
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.ktlint)
}

android {
Expand Down Expand Up @@ -43,10 +44,11 @@ dependencies {
implementation(project(":core:model"))

// Compose Toolkit
implementation(platform(libs.compose.bom))
val composeBOM = platform(libs.compose.bom)
implementation(composeBOM)
implementation(libs.bundles.compose.toolkit)
implementation(libs.compose.navigation)
androidTestImplementation(platform(libs.compose.bom))
androidTestImplementation(composeBOM)
androidTestImplementation(libs.compose.junit)
debugImplementation(libs.bundles.compose.tooling.and.manifest)

Expand Down
9 changes: 5 additions & 4 deletions core/data/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
plugins {
id("com.android.library")
id("org.jetbrains.kotlin.android")
id("kotlin-kapt")
id("com.google.dagger.hilt.android")
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.ktlint)
alias(libs.plugins.kotlin.kapt)
alias(libs.plugins.dagger.hilt.android)
}

android {
Expand Down
9 changes: 5 additions & 4 deletions core/database/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
plugins {
id("com.android.library")
id("org.jetbrains.kotlin.android")
id("kotlin-kapt")
id("com.google.dagger.hilt.android")
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.ktlint)
alias(libs.plugins.kotlin.kapt)
alias(libs.plugins.dagger.hilt.android)
}

android {
Expand Down
9 changes: 5 additions & 4 deletions core/domain/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
plugins {
id("com.android.library")
id("org.jetbrains.kotlin.android")
id("kotlin-kapt")
id("com.google.dagger.hilt.android")
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.ktlint)
alias(libs.plugins.kotlin.kapt)
alias(libs.plugins.dagger.hilt.android)
}

android {
Expand Down
5 changes: 3 additions & 2 deletions core/model/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id("com.android.library")
id("org.jetbrains.kotlin.android")
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.ktlint)
}

android {
Expand Down
9 changes: 5 additions & 4 deletions core/network/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
plugins {
id("com.android.library")
id("org.jetbrains.kotlin.android")
id("kotlin-kapt")
id("com.google.dagger.hilt.android")
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.ktlint)
alias(libs.plugins.kotlin.kapt)
alias(libs.plugins.dagger.hilt.android)
}

android {
Expand Down
14 changes: 8 additions & 6 deletions feature/collection/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
plugins {
id("com.android.library")
id("org.jetbrains.kotlin.android")
id("kotlin-kapt")
id("com.google.dagger.hilt.android")
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.ktlint)
alias(libs.plugins.kotlin.kapt)
alias(libs.plugins.dagger.hilt.android)
}

android {
Expand Down Expand Up @@ -47,10 +48,11 @@ dependencies {
implementation(project(":core:model"))

// Compose Toolkit
implementation(platform(libs.compose.bom))
val composeBOM = platform(libs.compose.bom)
implementation(composeBOM)
implementation(libs.bundles.compose.toolkit)
implementation(libs.compose.navigation)
androidTestImplementation(platform(libs.compose.bom))
androidTestImplementation(composeBOM)
androidTestImplementation(libs.compose.junit)
debugImplementation(libs.bundles.compose.tooling.and.manifest)

Expand Down
16 changes: 9 additions & 7 deletions feature/detail/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
plugins {
id("com.android.library")
id("org.jetbrains.kotlin.android")
id("kotlin-kapt")
id("com.google.dagger.hilt.android")
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.ktlint)
alias(libs.plugins.kotlin.kapt)
alias(libs.plugins.dagger.hilt.android)
}

android {
Expand Down Expand Up @@ -46,11 +47,12 @@ dependencies {
implementation(project(":core:domain"))
implementation(project(":core:model"))

// Compose Toolkit
implementation(platform(libs.compose.bom))
// Compose Toolkit
val composeBOM = platform(libs.compose.bom)
implementation(composeBOM)
implementation(libs.bundles.compose.toolkit)
implementation(libs.compose.navigation)
androidTestImplementation(platform(libs.compose.bom))
androidTestImplementation(composeBOM)
androidTestImplementation(libs.compose.junit)
debugImplementation(libs.bundles.compose.tooling.and.manifest)

Expand Down
14 changes: 8 additions & 6 deletions feature/explore/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
plugins {
id("com.android.library")
id("org.jetbrains.kotlin.android")
id("kotlin-kapt")
id("com.google.dagger.hilt.android")
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.ktlint)
alias(libs.plugins.kotlin.kapt)
alias(libs.plugins.dagger.hilt.android)
}

android {
Expand Down Expand Up @@ -47,10 +48,11 @@ dependencies {
implementation(project(":core:model"))

// Compose Toolkit
implementation(platform(libs.compose.bom))
val composeBOM = platform(libs.compose.bom)
implementation(composeBOM)
implementation(libs.bundles.compose.toolkit)
implementation(libs.compose.navigation)
androidTestImplementation(platform(libs.compose.bom))
androidTestImplementation(composeBOM)
androidTestImplementation(libs.compose.junit)
debugImplementation(libs.bundles.compose.tooling.and.manifest)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,23 @@ class ExplorationScreenViewModel @Inject constructor(
private val searchedAnime: Flow<PagingData<Anime>> = currentSearchQuery
.debounce(0)
.distinctUntilChanged()
.flatMapLatest { useCases.getAnimeSearch(searchQuery = it) }
.flatMapLatest { useCases.getAnimeSearch(searchQuery = it).cachedIn(viewModelScope) }

private val popularAnime: Flow<PagingData<Anime>> =
useCases.getPopularAnime().cachedIn(viewModelScope)

private val airingAnime: Flow<PagingData<Anime>> =
useCases.getAiringAnime().cachedIn(viewModelScope)

private val upcomingAnime: Flow<PagingData<Anime>> =
useCases.getUpcomingAnime().cachedIn(viewModelScope)

private val anime: Flow<PagingData<Anime>> = displayedAnimeType.flatMapLatest { type ->
when (type) {
DisplayType.POPULAR -> useCases.getPopularAnime().cachedIn(viewModelScope)
DisplayType.AIRING -> useCases.getAiringAnime().cachedIn(viewModelScope)
DisplayType.UPCOMING -> useCases.getUpcomingAnime().cachedIn(viewModelScope)
DisplayType.SEARCH -> searchedAnime.cachedIn(viewModelScope)
DisplayType.POPULAR -> popularAnime
DisplayType.AIRING -> airingAnime
DisplayType.UPCOMING -> upcomingAnime
DisplayType.SEARCH -> searchedAnime
}
}

Expand Down
14 changes: 8 additions & 6 deletions feature/more/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
plugins {
id("com.android.library")
id("org.jetbrains.kotlin.android")
id("kotlin-kapt")
id("com.google.dagger.hilt.android")
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.ktlint)
alias(libs.plugins.kotlin.kapt)
alias(libs.plugins.dagger.hilt.android)
}

android {
Expand Down Expand Up @@ -46,10 +47,11 @@ dependencies {
implementation(project(":core:domain"))

// Compose Toolkit
implementation(platform(libs.compose.bom))
val composeBOM = platform(libs.compose.bom)
implementation(composeBOM)
implementation(libs.bundles.compose.toolkit)
implementation(libs.compose.navigation)
androidTestImplementation(platform(libs.compose.bom))
androidTestImplementation(composeBOM)
androidTestImplementation(libs.compose.junit)
debugImplementation(libs.bundles.compose.tooling.and.manifest)

Expand Down
Loading

0 comments on commit 4d1430a

Please sign in to comment.