Skip to content
Merged
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
10 changes: 4 additions & 6 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ android {
applicationId = "com.ratik.uttam.prod"
minSdk = 24
targetSdk = 37
versionCode = 21
versionName = "4.4"
versionCode = 22
versionName = "4.5"

buildConfigField(
"String",
Expand Down Expand Up @@ -116,11 +116,9 @@ dependencies {
// Compose
val composeBom = platform(libs.androidx.compose.bom)
implementation(composeBom)
androidTestImplementation(composeBom)
api(libs.bundles.compose.core)
implementation(libs.bundles.compose.core)
implementation(libs.androidx.activity.compose)
implementation(libs.androidx.hilt.navigation.compose)
implementation(libs.coil)
implementation(libs.coil.compose)
implementation(libs.androidx.compose.tooling.preview)
debugImplementation(libs.androidx.compose.tooling)
Expand All @@ -136,7 +134,7 @@ dependencies {
ksp(libs.hilt.compiler)

// Logging
api(libs.timber)
implementation(libs.timber)

// Testing
testImplementation(libs.junit)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import android.annotation.SuppressLint
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.remember
import androidx.compose.ui.platform.LocalLifecycleOwner
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.compose.LocalLifecycleOwner
import androidx.lifecycle.flowWithLifecycle
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.flowOn
Expand Down
27 changes: 13 additions & 14 deletions app/src/main/kotlin/com/ratik/uttam/ui/feature/home/HomeScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,9 @@ import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.core.content.FileProvider.getUriForFile
import androidx.core.net.toUri
import androidx.hilt.navigation.compose.hiltViewModel
import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel
import coil.request.ImageRequest
import com.ratik.uttam.R
import com.ratik.uttam.core.Ignored
import com.ratik.uttam.core.MessageState.Snack
import com.ratik.uttam.core.contract.ViewEvent.DisplayMessage
import com.ratik.uttam.core.contract.ViewEvent.Effect
Expand Down Expand Up @@ -92,7 +91,7 @@ internal fun HomeScreen(
Toast.makeText(context, event.message.message, Toast.LENGTH_SHORT).show()
}

else -> Ignored
else -> Unit
}
}

Expand All @@ -117,10 +116,18 @@ internal fun HomeScreen(
}
}

else -> Ignored
else -> Unit
}
}

val wallpaperShareText =
stringResource(
R.string.wallpaper_share_text,
state.currentWallpaper?.photographer?.name.orEmpty(),
state.currentWallpaper?.shareUrl.orEmpty(),
)
val shareLabel = stringResource(R.string.share_label)

Box(
modifier =
Modifier
Expand Down Expand Up @@ -151,17 +158,9 @@ internal fun HomeScreen(
refreshWallpaper = { viewModel.onViewAction(RefreshWallpaper) },
shareWallpaper = {
val shareIntent = Intent(Intent.ACTION_SEND)
val shareText =
String.format(
context.getString(R.string.wallpaper_share_text),
state.currentWallpaper?.photographer?.name.orEmpty(),
state.currentWallpaper?.shareUrl.orEmpty(),
)
shareIntent.setType("text/plain")
shareIntent.putExtra(Intent.EXTRA_TEXT, shareText)
context.startActivity(
createChooser(shareIntent, context.getString(R.string.share_label)),
)
shareIntent.putExtra(Intent.EXTRA_TEXT, wallpaperShareText)
context.startActivity(createChooser(shareIntent, shareLabel))
},
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.layout.ContentScale.Companion.Crop
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.hilt.navigation.compose.hiltViewModel
import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel
import com.ratik.uttam.R
import com.ratik.uttam.core.Ignored
import com.ratik.uttam.core.contract.ViewEvent.Navigate
import com.ratik.uttam.ui.components.UttamButton
import com.ratik.uttam.ui.extensions.collectAsEffect
Expand All @@ -44,7 +43,7 @@ internal fun LandingScreen(
is Onboarding -> navigateToOnboarding()
}
}
else -> Ignored
else -> Unit
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,10 @@ import androidx.compose.ui.graphics.Color.Companion.White
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.hilt.navigation.compose.hiltViewModel
import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel
import com.google.accompanist.permissions.ExperimentalPermissionsApi
import com.google.accompanist.permissions.rememberPermissionState
import com.ratik.uttam.R
import com.ratik.uttam.core.Ignored
import com.ratik.uttam.core.contract.ViewEvent.Navigate
import com.ratik.uttam.ui.components.UttamText
import com.ratik.uttam.ui.components.VerticalSpacer
Expand Down Expand Up @@ -107,7 +106,7 @@ internal fun OnboardingScreen(
}
}

else -> Ignored
else -> Unit
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import androidx.hilt.navigation.compose.hiltViewModel
import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel
import com.ratik.uttam.Constants.EMAIL
import com.ratik.uttam.R
import com.ratik.uttam.ui.components.UttamText
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.painterResource
import androidx.hilt.navigation.compose.hiltViewModel
import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel
import com.ratik.uttam.R
import com.ratik.uttam.core.Ignored
import com.ratik.uttam.core.contract.ViewEvent.Navigate
import com.ratik.uttam.ui.extensions.collectAsEffect
import com.ratik.uttam.ui.feature.splash.SplashNavTarget.Home
Expand All @@ -31,7 +30,7 @@ internal fun SplashScreen(
is Landing -> navigateToLanding()
}
}
else -> Ignored
else -> Unit
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ fun Modifier.shimmerBackground(
end = Offset(translateAnimation + GRADIENT_OFFSET, translateAnimation + GRADIENT_OFFSET),
tileMode = TileMode.Mirror,
)
return@composed this.then(background(brush = brush, shape = shape))
return@composed background(brush = brush, shape = shape)
}

private const val ANIM_DURATION = 1500
Expand Down
24 changes: 11 additions & 13 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
[versions]
# Core
kotlin = "2.2.10"
android-gradle-plugin = "9.1.1"
kotlin = "2.4.10"
android-gradle-plugin = "9.3.1"
hilt = "2.60.1"
ksp = "2.3.7"
ksp = "2.3.11"

# Android X
work-manager = "2.11.2"
hilt-work = "1.3.0"
splashscreen = "1.0.1"
hilt-work = "1.4.0"
splashscreen = "1.2.0"

# Compose
androidx-compose-bom = "2024.08.00"
androidx-activity = "1.9.1"
androidx-hilt-navigation-compose = "1.2.0"
androidx-compose-bom = "2026.08.00"
androidx-activity = "1.13.0"
androidx-hilt-navigation-compose = "1.4.0"
coil = "2.7.0"
accompanist = "0.34.0"
accompanist = "0.37.3"

# Networking
okhttp = "4.12.0"
retrofit = "2.11.0"
retrofit-converter-gson = "2.11.0"

# Testing
junit = "4.13.2"
Expand All @@ -29,7 +28,7 @@ junit = "4.13.2"
timber = "5.0.1"

# Linting
spotless = "7.0.0.BETA2"
spotless = "7.2.1"
ktlint = "0.50.0"

[libraries]
Expand All @@ -50,15 +49,14 @@ androidx-compose-tooling-preview = { group = "androidx.compose.ui", name = "ui-t
androidx-compose-tooling = { group = "androidx.compose.ui", name = "ui-tooling" }
androidx-activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "androidx-activity" }
androidx-hilt-navigation-compose = { group = "androidx.hilt", name = "hilt-navigation-compose", version.ref = "androidx-hilt-navigation-compose" }
coil = { group = "io.coil-kt", name = "coil", version.ref = "coil" }
coil-compose = { group = "io.coil-kt", name = "coil-compose", version.ref = "coil" }

accompanist-permissions = { group = "com.google.accompanist", name = "accompanist-permissions", version.ref = "accompanist" }

# Networking
okhttp-logging-inspector = { group = "com.squareup.okhttp3", name = "logging-interceptor", version.ref = "okhttp" }
retrofit = { group = "com.squareup.retrofit2", name = "retrofit", version.ref = "retrofit" }
retrofit-converter-gson = { group = "com.squareup.retrofit2", name = "converter-gson", version.ref = "retrofit-converter-gson" }
retrofit-converter-gson = { group = "com.squareup.retrofit2", name = "converter-gson", version.ref = "retrofit" }

## DI
hilt-android = { group = "com.google.dagger", name = "hilt-android", version.ref = "hilt" }
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 3 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.7.0-all.zip
networkTimeout=10000
retries=0
retryBackOffMs=500
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
18 changes: 7 additions & 11 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading