Update dependencies
This commit is contained in:
parent
766a798977
commit
2943535c55
9 changed files with 3855 additions and 118 deletions
|
|
@ -1,21 +1,21 @@
|
|||
val accompanistVersion = "0.24.7-alpha"
|
||||
val composeVersion = "1.2.0-alpha08"
|
||||
val ktorVersion = "2.0.0"
|
||||
val accompanistVersion = "0.24.13-rc"
|
||||
val composeVersion = "1.3.0-alpha01"
|
||||
val ktorVersion = "2.0.3"
|
||||
|
||||
plugins {
|
||||
id("com.android.application")
|
||||
id("kotlin-android")
|
||||
id("com.google.devtools.ksp") version "1.6.20-1.0.4"
|
||||
kotlin("plugin.serialization") version "1.6.20"
|
||||
id("com.google.devtools.ksp") version "1.7.0-1.0.6"
|
||||
kotlin("plugin.serialization") version "1.6.21"
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdk = 31
|
||||
compileSdk = 33
|
||||
|
||||
defaultConfig {
|
||||
applicationId = "com.aliucord.manager"
|
||||
minSdk = 24
|
||||
targetSdk = 31
|
||||
targetSdk = 33
|
||||
versionCode = 1
|
||||
versionName = "0.0.1"
|
||||
|
||||
|
|
@ -51,17 +51,17 @@ android {
|
|||
}
|
||||
|
||||
buildFeatures.compose = true
|
||||
composeOptions.kotlinCompilerExtensionVersion = composeVersion
|
||||
composeOptions.kotlinCompilerExtensionVersion = "1.2.0"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(fileTree("./libs"))
|
||||
|
||||
// core dependencies
|
||||
implementation("androidx.appcompat:appcompat:1.4.1")
|
||||
implementation("androidx.core:core-ktx:1.7.0")
|
||||
implementation("androidx.core:core-splashscreen:1.0.0-beta02")
|
||||
implementation("com.android:zipflinger:7.3.0-alpha09")
|
||||
implementation("androidx.appcompat:appcompat:1.4.2")
|
||||
implementation("androidx.core:core-ktx:1.8.0")
|
||||
implementation("androidx.core:core-splashscreen:1.0.0-rc01")
|
||||
implementation("com.android:zipflinger:7.4.0-alpha07")
|
||||
// implementation("com.github.Aliucord:libzip:1.0.0")
|
||||
|
||||
// compose dependencies
|
||||
|
|
@ -69,22 +69,23 @@ dependencies {
|
|||
implementation("androidx.compose.ui:ui-tooling:${composeVersion}")
|
||||
implementation("androidx.compose.material:material:${composeVersion}")
|
||||
implementation("androidx.compose.material:material-icons-extended:${composeVersion}")
|
||||
implementation("androidx.compose.material3:material3:1.0.0-alpha10")
|
||||
implementation("androidx.paging:paging-compose:1.0.0-alpha14")
|
||||
implementation("androidx.compose.material3:material3:1.0.0-alpha14")
|
||||
implementation("androidx.paging:paging-compose:1.0.0-alpha15")
|
||||
|
||||
// accompanist dependencies
|
||||
implementation("com.google.accompanist:accompanist-systemuicontroller:${accompanistVersion}")
|
||||
implementation("com.google.accompanist:accompanist-permissions:${accompanistVersion}")
|
||||
|
||||
// compose destinations
|
||||
implementation("io.github.raamcosta.compose-destinations:core:1.5.2-beta")
|
||||
ksp("io.github.raamcosta.compose-destinations:ksp:1.5.2-beta")
|
||||
implementation("io.github.raamcosta.compose-destinations:core:1.6.12-beta")
|
||||
ksp("io.github.raamcosta.compose-destinations:ksp:1.6.12-beta")
|
||||
|
||||
// other dependencies
|
||||
implementation("io.coil-kt:coil-compose:2.0.0-rc03")
|
||||
implementation("io.coil-kt:coil-compose:2.1.0")
|
||||
implementation("org.bouncycastle:bcpkix-jdk15on:1.70")
|
||||
implementation("de.upb.cs.swt:axml:2.1.1") // 2.1.2 is broken btw
|
||||
implementation("com.android.tools.build:apksig:7.1.3")
|
||||
implementation("de.upb.cs.swt:axml:2.1.2") // 2.1.2 is broken btw
|
||||
implementation("com.android.tools.build:apksig:7.2.1")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.3")
|
||||
|
||||
// ktor
|
||||
implementation("io.ktor:ktor-client-core:$ktorVersion")
|
||||
|
|
|
|||
|
|
@ -23,9 +23,9 @@ import androidx.navigation.NavController
|
|||
import androidx.navigation.compose.currentBackStackEntryAsState
|
||||
import com.aliucord.manager.BuildConfig
|
||||
import com.aliucord.manager.R
|
||||
import com.aliucord.manager.ui.screens.appDestination
|
||||
import com.aliucord.manager.ui.screens.destinations.*
|
||||
import com.aliucord.manager.ui.screens.navDestination
|
||||
import com.ramcosta.composedestinations.navigation.navigateTo
|
||||
import com.ramcosta.composedestinations.navigation.navigate
|
||||
import com.ramcosta.composedestinations.navigation.popUpTo
|
||||
|
||||
@get:StringRes
|
||||
|
|
@ -41,7 +41,7 @@ private val Destination.title
|
|||
|
||||
@Composable
|
||||
fun AppBar(navController: NavController) {
|
||||
val destination = navController.currentBackStackEntryAsState().value?.navDestination ?: HomeScreenDestination
|
||||
val destination = navController.currentBackStackEntryAsState().value?.appDestination() ?: HomeScreenDestination
|
||||
var isMenuExpanded by remember { mutableStateOf(false) }
|
||||
|
||||
MediumTopAppBar(
|
||||
|
|
@ -60,7 +60,7 @@ fun AppBar(navController: NavController) {
|
|||
|
||||
IconButton(
|
||||
onClick = {
|
||||
navController.navigateTo(StoreScreenDestination) {
|
||||
navController.navigate(StoreScreenDestination) {
|
||||
popUpTo(HomeScreenDestination) { saveState = true }
|
||||
}
|
||||
},
|
||||
|
|
@ -105,7 +105,7 @@ fun AppBar(navController: NavController) {
|
|||
DropdownMenuItem(
|
||||
onClick = {
|
||||
isMenuExpanded = false
|
||||
navController.navigateTo(AboutScreenDestination)
|
||||
navController.navigate(AboutScreenDestination)
|
||||
},
|
||||
leadingIcon = {
|
||||
Icon(
|
||||
|
|
@ -119,7 +119,7 @@ fun AppBar(navController: NavController) {
|
|||
DropdownMenuItem(
|
||||
onClick = {
|
||||
isMenuExpanded = false
|
||||
navController.navigateTo(SettingsScreenDestination)
|
||||
navController.navigate(SettingsScreenDestination)
|
||||
},
|
||||
leadingIcon = {
|
||||
Icon(
|
||||
|
|
|
|||
|
|
@ -24,43 +24,47 @@ import com.google.accompanist.permissions.PermissionState
|
|||
|
||||
@OptIn(ExperimentalPermissionsApi::class)
|
||||
@Composable
|
||||
fun GrantPermission(permissionState: PermissionState) = Column(
|
||||
modifier = Modifier.fillMaxSize(),
|
||||
verticalArrangement = Arrangement.Center,
|
||||
horizontalAlignment = Alignment.CenterHorizontally
|
||||
) {
|
||||
Text(
|
||||
stringResource(R.string.permission_required),
|
||||
style = MaterialTheme.typography.headlineMedium,
|
||||
textAlign = TextAlign.Center
|
||||
)
|
||||
|
||||
Spacer(Modifier.height(8.dp))
|
||||
|
||||
Row {
|
||||
val context = LocalContext.current
|
||||
|
||||
Button(onClick = { permissionState.launchPermissionRequest() }) {
|
||||
Text(stringResource(R.string.permission_grant))
|
||||
}
|
||||
|
||||
Spacer(Modifier.width(8.dp))
|
||||
|
||||
Button(
|
||||
onClick = {
|
||||
context.startActivity(
|
||||
Intent(
|
||||
Settings.ACTION_APPLICATION_DETAILS_SETTINGS,
|
||||
Uri.fromParts("package", BuildConfig.APPLICATION_ID, null)
|
||||
)
|
||||
)
|
||||
},
|
||||
colors = ButtonDefaults.buttonColors(
|
||||
containerColor = MaterialTheme.colorScheme.secondaryContainer,
|
||||
contentColor = MaterialTheme.colorScheme.onSecondaryContainer
|
||||
),
|
||||
fun GrantPermission(permissionState: PermissionState) {
|
||||
Surface {
|
||||
Column(
|
||||
modifier = Modifier.fillMaxSize(),
|
||||
verticalArrangement = Arrangement.Center,
|
||||
horizontalAlignment = Alignment.CenterHorizontally
|
||||
) {
|
||||
Text(stringResource(R.string.open_settings))
|
||||
Text(
|
||||
stringResource(R.string.permission_required),
|
||||
style = MaterialTheme.typography.headlineMedium,
|
||||
textAlign = TextAlign.Center
|
||||
)
|
||||
|
||||
Spacer(Modifier.height(8.dp))
|
||||
|
||||
Row {
|
||||
val context = LocalContext.current
|
||||
|
||||
Button(onClick = { permissionState.launchPermissionRequest() }) {
|
||||
Text(stringResource(R.string.permission_grant))
|
||||
}
|
||||
|
||||
Spacer(Modifier.width(8.dp))
|
||||
|
||||
Button(
|
||||
onClick = {
|
||||
context.startActivity(
|
||||
Intent(
|
||||
Settings.ACTION_APPLICATION_DETAILS_SETTINGS,
|
||||
Uri.fromParts("package", BuildConfig.APPLICATION_ID, null)
|
||||
)
|
||||
)
|
||||
},
|
||||
colors = ButtonDefaults.buttonColors(
|
||||
containerColor = MaterialTheme.colorScheme.secondaryContainer,
|
||||
contentColor = MaterialTheme.colorScheme.onSecondaryContainer
|
||||
),
|
||||
) {
|
||||
Text(stringResource(R.string.open_settings))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
package com.aliucord.manager.ui.components
|
||||
|
||||
import android.Manifest
|
||||
import androidx.compose.animation.ExperimentalAnimationApi
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||
import androidx.compose.material3.Scaffold
|
||||
|
|
@ -21,8 +20,7 @@ import com.ramcosta.composedestinations.rememberNavHostEngine
|
|||
|
||||
@OptIn(
|
||||
ExperimentalMaterial3Api::class,
|
||||
ExperimentalPermissionsApi::class,
|
||||
ExperimentalAnimationApi::class
|
||||
ExperimentalPermissionsApi::class
|
||||
)
|
||||
@Composable
|
||||
fun ManagerScaffold() {
|
||||
|
|
@ -47,5 +45,4 @@ fun ManagerScaffold() {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,16 +5,16 @@
|
|||
|
||||
package com.aliucord.manager.ui.components.about
|
||||
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.foundation.layout.*
|
||||
import androidx.compose.foundation.shape.CircleShape
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.clip
|
||||
import androidx.compose.ui.unit.dp
|
||||
import coil.compose.rememberImagePainter
|
||||
import coil.transform.CircleCropTransformation
|
||||
import coil.compose.AsyncImage
|
||||
|
||||
@Composable
|
||||
fun UserEntry(name: String, roles: String) = Column {
|
||||
|
|
@ -22,19 +22,16 @@ fun UserEntry(name: String, roles: String) = Column {
|
|||
verticalAlignment = Alignment.CenterVertically,
|
||||
horizontalArrangement = Arrangement.spacedBy(8.dp)
|
||||
) {
|
||||
Image(
|
||||
painter = rememberImagePainter(
|
||||
data = "https://github.com/$name.png",
|
||||
builder = {
|
||||
transformations(CircleCropTransformation())
|
||||
}
|
||||
),
|
||||
contentDescription = null,
|
||||
modifier = Modifier.size(54.dp)
|
||||
AsyncImage(
|
||||
modifier = Modifier
|
||||
.size(54.dp)
|
||||
.clip(CircleShape),
|
||||
model = "https://github.com/$name.png",
|
||||
contentDescription = null
|
||||
)
|
||||
Column {
|
||||
Text(
|
||||
name,
|
||||
text = name,
|
||||
style = MaterialTheme.typography.titleLarge
|
||||
)
|
||||
Text(roles)
|
||||
|
|
|
|||
|
|
@ -143,49 +143,48 @@ fun HomeScreen(navigator: DestinationsNavigator) {
|
|||
}
|
||||
|
||||
if (viewModel.installedVersion != "-") {
|
||||
|
||||
Row(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
horizontalArrangement = Arrangement.spacedBy(12.dp)
|
||||
) {
|
||||
Button(
|
||||
modifier = Modifier.weight(1f),
|
||||
colors = ButtonDefaults.buttonColors(containerColor = MaterialTheme.colorScheme.secondaryContainer),
|
||||
onClick = {
|
||||
viewModel.uninstallAliucord()
|
||||
CompositionLocalProvider(
|
||||
LocalContentColor provides MaterialTheme.colorScheme.secondaryContainer
|
||||
) {
|
||||
FilledTonalButton(
|
||||
modifier = Modifier.weight(1f),
|
||||
onClick = {
|
||||
viewModel.uninstallAliucord()
|
||||
}
|
||||
) {
|
||||
Icon(
|
||||
modifier = Modifier.padding(8.dp),
|
||||
imageVector = Icons.Default.Delete,
|
||||
contentDescription = "Uninstall"
|
||||
)
|
||||
}
|
||||
) {
|
||||
Icon(
|
||||
modifier = Modifier.padding(8.dp),
|
||||
imageVector = Icons.Default.Delete,
|
||||
contentDescription = "Uninstall",
|
||||
tint = MaterialTheme.colorScheme.onSecondaryContainer,
|
||||
)
|
||||
}
|
||||
|
||||
Button(
|
||||
modifier = Modifier.weight(1f),
|
||||
onClick = viewModel::launchAliucord,
|
||||
colors = ButtonDefaults.buttonColors(containerColor = MaterialTheme.colorScheme.secondaryContainer)
|
||||
) {
|
||||
Icon(
|
||||
modifier = Modifier.padding(8.dp),
|
||||
painter = painterResource(R.drawable.ic_launch_24dp),
|
||||
contentDescription = "Launch",
|
||||
tint = MaterialTheme.colorScheme.onSecondaryContainer
|
||||
)
|
||||
}
|
||||
FilledTonalButton(
|
||||
modifier = Modifier.weight(1f),
|
||||
onClick = viewModel::launchAliucord
|
||||
) {
|
||||
Icon(
|
||||
modifier = Modifier.padding(8.dp),
|
||||
painter = painterResource(R.drawable.ic_launch_24dp),
|
||||
contentDescription = "Launch"
|
||||
)
|
||||
}
|
||||
|
||||
Button(
|
||||
modifier = Modifier.weight(1f),
|
||||
onClick = { navigator.navigate(CommitsScreenDestination) },
|
||||
colors = ButtonDefaults.buttonColors(containerColor = MaterialTheme.colorScheme.secondaryContainer)
|
||||
) {
|
||||
Icon(
|
||||
modifier = Modifier.padding(8.dp),
|
||||
painter = painterResource(R.drawable.ic_update_24dp),
|
||||
contentDescription = "Commits",
|
||||
tint = MaterialTheme.colorScheme.onSecondaryContainer
|
||||
)
|
||||
FilledTonalButton(
|
||||
modifier = Modifier.weight(1f),
|
||||
onClick = { navigator.navigate(CommitsScreenDestination) }
|
||||
) {
|
||||
Icon(
|
||||
modifier = Modifier.padding(8.dp),
|
||||
painter = painterResource(R.drawable.ic_update_24dp),
|
||||
contentDescription = "Commits"
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ buildscript {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
classpath("com.android.tools.build:gradle:7.1.3")
|
||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.20")
|
||||
classpath("com.android.tools.build:gradle:7.4.0-alpha07")
|
||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.0")
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle.kts files
|
||||
|
|
|
|||
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
|
|
@ -1,6 +1,6 @@
|
|||
#Sat Apr 09 23:53:16 EDT 2022
|
||||
#Mon Jul 04 12:13:32 EDT 2022
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-rc-3-bin.zip
|
||||
distributionPath=wrapper/dists
|
||||
zipStorePath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
|
|
|||
3739
hs_err_pid22279.log
Normal file
3739
hs_err_pid22279.log
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue