Skip to content

Commit

Permalink
Merge pull request #18 from SaifulSaif007/dependency-update
Browse files Browse the repository at this point in the history
Dependency update
  • Loading branch information
SaifulSaif007 authored May 23, 2024
2 parents f021b5d + b00d86f commit 98e696d
Show file tree
Hide file tree
Showing 10 changed files with 72 additions and 91 deletions.
10 changes: 5 additions & 5 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ plugins {

android {
namespace = "com.saiful.splashgallery"
compileSdk = 33
compileSdk = 34

defaultConfig {
applicationId = "com.saiful.splashgallery"
Expand All @@ -36,17 +36,17 @@ android {
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_19
targetCompatibility = JavaVersion.VERSION_19
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
jvmTarget = JavaVersion.VERSION_19.toString()
}
buildFeatures {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = "1.4.0"
kotlinCompilerExtensionVersion = "1.5.5"
}
packaging {
resources.excludes += "/META-INF/{AL2.0,LGPL2.1}"
Expand Down
8 changes: 4 additions & 4 deletions base_unit_test/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {

android {
namespace = "com.saiful.test.unit"
compileSdk = 33
compileSdk = 34

defaultConfig {
minSdk = 24
Expand All @@ -25,11 +25,11 @@ android {
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_19
targetCompatibility = JavaVersion.VERSION_19
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
jvmTarget = JavaVersion.VERSION_19.toString()
}
}

Expand Down
8 changes: 4 additions & 4 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {

android {
namespace = "com.saiful.core"
compileSdk = 33
compileSdk = 34

defaultConfig {
minSdk = 24
Expand All @@ -30,11 +30,11 @@ android {
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_19
targetCompatibility = JavaVersion.VERSION_19
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
jvmTarget = JavaVersion.VERSION_19.toString()
}
buildFeatures {
buildConfig = true
Expand Down
11 changes: 7 additions & 4 deletions data/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {

android {
namespace = "com.saiful.data"
compileSdk = 33
compileSdk = 34

defaultConfig {
minSdk = 24
Expand All @@ -27,11 +27,14 @@ android {
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_19
targetCompatibility = JavaVersion.VERSION_19
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
jvmTarget = JavaVersion.VERSION_19.toString()
}
testOptions {
unitTests.isReturnDefaultValues = true
}
}

Expand Down
11 changes: 7 additions & 4 deletions domain/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {

android {
namespace = "com.saiful.domain"
compileSdk = 33
compileSdk = 34

defaultConfig {
minSdk = 24
Expand All @@ -27,11 +27,14 @@ android {
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_19
targetCompatibility = JavaVersion.VERSION_19
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
jvmTarget = JavaVersion.VERSION_19.toString()
}
testOptions {
unitTests.isReturnDefaultValues = true
}
}

Expand Down
39 changes: 19 additions & 20 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,36 +1,35 @@
[versions]

agp = "8.1.0"
hilt-navigation-compose = "1.0.0"
agp = "8.4.1"
hilt-navigation-compose = "1.2.0"
kotlinx-coroutines = "1.7.3"
ktx = "1.10.1"
lifecycle = "2.6.2"
activity-compose = "1.7.2"
compose-bom = "2023.06.01"
kotlin-bom = "1.8.0"
ktx = "1.13.1"
lifecycle = "2.8.0"
activity-compose = "1.9.0"
compose-bom = "2024.05.00"
kotlin-bom = "1.9.20"
junit = "4.13.2"
junit-ext = "1.1.5"
espresso = "3.5.1"
compose-test-boom = "2023.06.01"
material = "1.9.0"
hilt = "2.44"
compose-test-boom = "2024.05.00"
hilt = "2.51.1"
hilt-pluging = "2.47"
retrofit = "2.9.0"
moshi = "1.14.0"
robolectric = "4.7"
moshi = "1.15.1"
robolectric = "4.11.1"
timber = "4.7.1"
kotlin-jvm = "1.8.0"
splash-screen = "1.0.1"
naviagtion = "2.5.3"
coroutine-test = "1.7.1"
naviagtion = "2.7.7"
coroutine-test = "1.7.3"
coil = "2.4.0"
mockito = "5.2.0"
mockito = "5.3.1"
mockito-kotlin = "1.5.0"
pagination = "3.2.1"
paging-compose = "1.0.0-alpha20"
google-service = "4.4.0"
crashlytics = "2.9.9"
firebase-bom = "32.7.0"
pagination = "3.3.0"
paging-compose = "3.3.0"
google-service = "4.4.1"
crashlytics = "3.0.1"
firebase-bom = "33.0.0"

[libraries]

Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue Jun 27 15:47:38 BDT 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
11 changes: 6 additions & 5 deletions presentation/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {

android {
namespace = "com.saiful.presentation"
compileSdk = 33
compileSdk = 34

defaultConfig {
minSdk = 24
Expand All @@ -28,22 +28,23 @@ android {
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_19
targetCompatibility = JavaVersion.VERSION_19
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
jvmTarget = JavaVersion.VERSION_19.toString()
}
buildFeatures {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = "1.4.0"
kotlinCompilerExtensionVersion = "1.5.5"
}

testOptions {
unitTests {
isIncludeAndroidResources = true
isReturnDefaultValues = true
}
}
}
Expand Down
20 changes: 8 additions & 12 deletions presentation/src/main/java/com/saiful/presentation/HomeScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,8 @@ import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.pager.HorizontalPager
import androidx.compose.foundation.pager.rememberPagerState
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Tab
import androidx.compose.material3.TabRow
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.material3.*
import androidx.compose.runtime.*
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.text.style.TextAlign
Expand Down Expand Up @@ -42,10 +37,14 @@ fun HomeScreen(
}.collect()
}

val pagerState = rememberPagerState()
val tabs = LocalContext.current.resources.getStringArray(R.array.dashboardTabTitle)
val coroutineScope = rememberCoroutineScope()

val pagerState = rememberPagerState(
initialPage = 0,
pageCount = { tabs.size }
)

Column {
TabRow(
modifier = Modifier,
Expand Down Expand Up @@ -73,10 +72,7 @@ fun HomeScreen(

}

HorizontalPager(
pageCount = tabs.size,
state = pagerState
) { page ->
HorizontalPager(state = pagerState) { page ->
when (page) {
0 -> PhotosScreen(
navigatePhotoDetails = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,31 +1,14 @@
package com.saiful.presentation.profile

import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.pager.HorizontalPager
import androidx.compose.foundation.pager.rememberPagerState
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.ArrowBack
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Tab
import androidx.compose.material3.TabRow
import androidx.compose.material3.Text
import androidx.compose.material3.TopAppBar
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.material.icons.automirrored.filled.ArrowBack
import androidx.compose.material3.*
import androidx.compose.runtime.*
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
Expand All @@ -51,11 +34,7 @@ import com.saiful.presentation.composables.nestedscroll.rememberNestedScrollView
import com.saiful.presentation.profile.collection.ProfileCollectionScreen
import com.saiful.presentation.profile.likes.ProfileLikesScreen
import com.saiful.presentation.profile.photos.ProfilePhotoScreen
import com.saiful.presentation.theme.collectionInfoSubTitle
import com.saiful.presentation.theme.photoDetailsInfo
import com.saiful.presentation.theme.primaryText
import com.saiful.presentation.theme.titleText
import com.saiful.presentation.theme.toolbarText
import com.saiful.presentation.theme.*
import com.saiful.presentation.utils.TestTags
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.flow.onEach
Expand Down Expand Up @@ -91,7 +70,7 @@ internal fun ProfileScreen(
viewModel.setEvent(ProfileContract.Event.NavigateBack)
}) {
Icon(
Icons.Filled.ArrowBack,
Icons.AutoMirrored.Filled.ArrowBack,
contentDescription = "",
)
}
Expand Down Expand Up @@ -164,8 +143,11 @@ private fun PagerSection(
event: (ProfileContract.Event) -> Unit
) {
val coroutineScope = rememberCoroutineScope()
val pagerState = rememberPagerState()
val tabs = profileInfo.visibleTabs
val pagerState = rememberPagerState(
initialPage = 0,
pageCount = { tabs.size }
)

Column {
TabRow(selectedTabIndex = pagerState.currentPage) {
Expand All @@ -189,10 +171,7 @@ private fun PagerSection(
}
}

HorizontalPager(
pageCount = tabs.size,
state = pagerState
) { page ->
HorizontalPager(state = pagerState) { page ->
when (tabs[page]) {
PHOTOS -> ProfilePhotoScreen(userName,
navigateToPhotoDetails = { photoId ->
Expand Down

0 comments on commit 98e696d

Please sign in to comment.