Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
ivaniskandar committed Mar 10, 2024
1 parent 1b12185 commit 3119bf3
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 37 deletions.
25 changes: 12 additions & 13 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ plugins {
id 'com.android.application'
id 'kotlin-android'
id 'com.google.android.gms.oss-licenses-plugin'
id "com.google.protobuf" version "0.8.19"
id "com.google.protobuf" version "0.9.4"
}

final def keystorePropertiesFile = rootProject.file("keystore.properties")
Expand All @@ -16,7 +16,7 @@ final def gitCommitHash = { ->
}

android {
compileSdkVersion 33
compileSdk 34
namespace 'xyz.ivaniskandar.shouko'

defaultConfig {
Expand Down Expand Up @@ -76,38 +76,37 @@ android {
}

dependencies {
implementation 'androidx.core:core-ktx:1.10.0'
implementation 'androidx.core:core-ktx:1.12.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.activity:activity-compose:1.7.0'
implementation "androidx.navigation:navigation-compose:2.5.3"
implementation 'androidx.activity:activity-compose:1.8.2'
implementation "androidx.navigation:navigation-compose:2.8.0-alpha04"
implementation "com.github.topjohnwu.libsu:core:5.0.4"
implementation 'com.squareup.logcat:logcat:0.1'
implementation 'com.google.android.gms:play-services-oss-licenses:17.0.0'
implementation 'com.google.android.gms:play-services-oss-licenses:17.0.1'
implementation 'com.github.KieronQuinn:MonetCompat:0.4.1'
implementation "io.github.fornewid:material-motion-compose-core:0.11.1"
implementation "io.github.fornewid:material-motion-compose-core:1.2.0"

implementation platform("androidx.compose:compose-bom:$compose_bom_version")
implementation platform("dev.chrisbanes.compose:compose-bom:$compose_bom_version")
implementation "androidx.compose.ui:ui"
implementation "androidx.compose.material3:material3"
implementation "androidx.compose.material:material"
implementation "androidx.compose.material:material-icons-extended"
implementation "androidx.compose.material3:material3"
implementation "androidx.compose.runtime:runtime-livedata"
implementation "androidx.compose.ui:ui-text-google-fonts"
implementation "androidx.compose.ui:ui-tooling-preview"
debugImplementation "androidx.compose.ui:ui-tooling"

def accompanist_version = "0.30.1"
def accompanist_version = "0.35.0-alpha"
implementation "com.google.accompanist:accompanist-pager:$accompanist_version"
implementation "com.google.accompanist:accompanist-swiperefresh:$accompanist_version"
implementation "com.google.accompanist:accompanist-navigation-material:$accompanist_version"
implementation "com.google.accompanist:accompanist-navigation-animation:$accompanist_version"
implementation "com.google.accompanist:accompanist-systemuicontroller:$accompanist_version"

def coroutines_version = "1.6.4"
def coroutines_version = "1.8.0"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines_version"

def lifecycle_version = "2.6.1"
def lifecycle_version = "2.7.0"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-service:$lifecycle_version"
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/Theme.Shouko">
android:theme="@style/Theme.Shouko"
android:enableOnBackInvokedCallback="true">

<activity
android:name=".activity.MainActivity"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ private fun AppLinkChooserSheet(
modifier = Modifier.size(36.dp),
)
},
headlineText = {
headlineContent = {
Text(
text = item.title,
style = MaterialTheme.typography.bodyLarge,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,14 @@ import androidx.core.content.getSystemService
import androidx.core.view.WindowCompat
import androidx.navigation.NavBackStackEntry
import androidx.navigation.NavController
import androidx.navigation.compose.NavHost
import androidx.navigation.compose.composable
import androidx.navigation.compose.currentBackStackEntryAsState
import com.google.accompanist.navigation.animation.AnimatedNavHost
import com.google.accompanist.navigation.animation.composable
import com.google.accompanist.navigation.animation.rememberAnimatedNavController
import androidx.navigation.compose.rememberNavController
import com.google.accompanist.navigation.material.BottomSheetNavigator
import com.google.accompanist.navigation.material.ModalBottomSheetLayout
import com.google.accompanist.navigation.material.bottomSheet
import com.google.accompanist.navigation.material.rememberBottomSheetNavigator
import com.google.android.gms.oss.licenses.OssLicensesMenuActivity
import kotlinx.coroutines.launch
import logcat.LogPriority
Expand Down Expand Up @@ -95,7 +96,7 @@ class MainActivity : ComponentActivity() {
skipHalfExpanded = true,
)
val bottomSheetNavigator = remember(sheetState) { BottomSheetNavigator(sheetState = sheetState) }
val navController = rememberAnimatedNavController(bottomSheetNavigator)
val navController = rememberNavController(bottomSheetNavigator)
val navBackStackEntry by navController.currentBackStackEntryAsState()
val scrollState = rememberTopAppBarState()
val scrollBehavior = when (navBackStackEntry?.destination?.route) {
Expand Down Expand Up @@ -139,7 +140,7 @@ class MainActivity : ComponentActivity() {
) { innerPadding ->
val rootAvailable = remember { isRootAvailable }
val slideDistance = rememberSlideDistance()
AnimatedNavHost(
NavHost(
navController = navController,
startDestination = Screen.Home.route,
enterTransition = { materialSharedAxisXIn(forward = true, slideDistance) },
Expand Down Expand Up @@ -255,9 +256,7 @@ class MainActivity : ComponentActivity() {
fun getAppBarTitle(navController: NavController, navBackStackEntry: NavBackStackEntry?): String {
return if (navBackStackEntry?.destination is BottomSheetNavigator.Destination) {
// Keep previous destination title when showing bottom sheet
val currentIndex = navController.backQueue.indexOf(navBackStackEntry)
val prevEntry = navController.backQueue[currentIndex - 1]
getAppBarTitle(navController = navController, navBackStackEntry = prevEntry)
getAppBarTitle(navController = navController, navBackStackEntry = navController.previousBackStackEntry)
} else {
when (navBackStackEntry?.destination?.route) {
Screen.AssistantButtonSettings.route -> stringResource(id = R.string.assistant_button_title)
Expand Down Expand Up @@ -310,7 +309,7 @@ fun MainActivityActions(
DropdownMenuItem(
text = {
Text(
text = stringResource(R.string.oss_license_title),
text = stringResource(com.google.android.gms.oss.licenses.R.string.oss_license_title),
overflow = TextOverflow.Ellipsis,
maxLines = 1,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ fun ApplicationRow(item: ApplicationItem, onClick: (ComponentName) -> Unit) {
modifier = Modifier
.clickable(onClick = { onClick.invoke(item.componentName) })
.fillMaxWidth(),
headlineText = { Text(text = item.label) },
headlineContent = { Text(text = item.label) },
leadingContent = {
Image(
bitmap = item.icon,
Expand All @@ -55,8 +55,8 @@ fun ShortcutCreatorRow(item: ShortcutCreatorItem, onClick: (ComponentName) -> Un
modifier = Modifier
.clickable(onClick = { onClick.invoke(item.componentName) })
.fillMaxWidth(),
headlineText = { Text(text = item.label) },
supportingText = { Text(text = item.applicationLabel) },
headlineContent = { Text(text = item.label) },
supportingContent = { Text(text = item.applicationLabel) },
leadingContent = {
Image(
bitmap = item.icon,
Expand All @@ -77,7 +77,7 @@ fun CommonActionRow(
modifier = Modifier
.clickable(onClick = onClick)
.fillMaxWidth(),
headlineText = { Text(text = label) },
headlineContent = { Text(text = label) },
leadingContent = {
Icon(
painter = iconPainter,
Expand All @@ -100,7 +100,7 @@ fun CommonActionRow(
.clickable(onClick = onClick)
.padding(vertical = 2.dp)
.fillMaxWidth(),
headlineText = { Text(text = label) },
headlineContent = { Text(text = label) },
leadingContent = {
Icon(
imageVector = iconVector,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,13 +252,13 @@ fun LinkTargetListItem(item: LinkHandlerAppItem, onClick: () -> Unit) {
modifier = Modifier.size(32.dp),
)
},
headlineText = {
headlineContent = {
Text(
text = item.label,
style = MaterialTheme.typography.titleLarge,
)
},
supportingText = {
supportingContent = {
if (item.isApproved) {
val count = remember { item.verifiedDomains.size + item.userSelectedDomains.size }
Text(
Expand Down
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
kotlin_version = "1.8.10"
compose_bom_version = '2023.04.00'
compose_compiler_version = '1.4.4'
protobuf_version = '3.22.2'
kotlin_version = "1.9.22"
compose_bom_version = '2024.03.00-alpha01'
compose_compiler_version = '1.5.10'
protobuf_version = '3.25.3'
}
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
}
dependencies {
classpath 'com.android.tools.build:gradle:7.4.2'
classpath 'com.android.tools.build:gradle:8.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.android.gms:oss-licenses-plugin:0.10.6'
classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.16.0'
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 Mar 07 12:57:38 ICT 2023
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME

0 comments on commit 3119bf3

Please sign in to comment.