diff --git a/.gitignore b/.gitignore index 10cfdbf..54fb2e8 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ /local.properties /.idea .DS_Store +/app/release /build /captures .externalNativeBuild diff --git a/app/build.gradle b/app/build.gradle index 9254eec..77b3ec6 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,19 +1,28 @@ plugins { - id 'com.android.application' - id 'org.jetbrains.kotlin.android' - id 'org.jetbrains.kotlin.kapt' - id 'org.jetbrains.kotlin.plugin.serialization' + alias(libs.plugins.android.application) + alias(libs.plugins.devtools.ksp) + alias(libs.plugins.kotlin.android) + alias(libs.plugins.kotlin.serialization) } android { - compileSdk 33 + compileSdk 34 defaultConfig { applicationId "com.github.capntrips.kernelflasher" - minSdk 30 - targetSdk 33 - versionCode 14 - versionName "1.0.0-alpha14" + minSdk 29 + targetSdk 34 + versionCode 15 + versionName "1.0.0-alpha15" + + javaCompileOptions { + annotationProcessorOptions { + arguments += [ + "room.schemaLocation": "$projectDir/schemas".toString(), + "room.incremental": "true" + ] + } + } vectorDrawables { useSupportLibrary true @@ -25,18 +34,21 @@ android { minifyEnabled false } } + buildFeatures { + aidl true + } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 } kotlinOptions { - jvmTarget = '1.8' + jvmTarget = '17' } buildFeatures { compose true } composeOptions { - kotlinCompilerExtensionVersion compiler_version + kotlinCompilerExtensionVersion libs.versions.compose.compiler.get() } packagingOptions { resources { @@ -47,26 +59,25 @@ android { } dependencies { - implementation "androidx.activity:activity-compose:$activity_version" - implementation "androidx.appcompat:appcompat:$appcompat_version" - implementation "androidx.compose.material3:material3:$material3_version" - implementation "androidx.compose.foundation:foundation:$compose_version" - implementation "androidx.compose.ui:ui:$compose_version" - implementation "androidx.core:core-ktx:$core_version" - implementation "androidx.core:core-splashscreen:$splashscreen_version" - implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycle_version" - implementation "androidx.lifecycle:lifecycle-viewmodel-compose:$lifecycle_version" - implementation "androidx.navigation:navigation-compose:$nav_version" - implementation "androidx.room:room-runtime:$room_version" - annotationProcessor "androidx.room:room-compiler:$room_version" - kapt "androidx.room:room-compiler:$room_version" - implementation "com.github.topjohnwu.libsu:core:$libsu_version" - implementation "com.github.topjohnwu.libsu:io:$libsu_version" - implementation "com.github.topjohnwu.libsu:nio:$libsu_version" - implementation "com.github.topjohnwu.libsu:service:$libsu_version" - implementation "com.google.accompanist:accompanist-navigation-animation:$accompanist_version" - implementation "com.google.accompanist:accompanist-swiperefresh:$accompanist_version" - implementation "com.google.android.material:material:$material_version" - implementation("com.squareup.okhttp3:okhttp:$okhttp_version") - implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:$serialization_version" + implementation(libs.androidx.activity.compose) + implementation(libs.androidx.appcompat) + implementation(libs.androidx.compose.material) + implementation(libs.androidx.compose.material3) + implementation(libs.androidx.compose.foundation) + implementation(libs.androidx.compose.ui) + implementation(libs.androidx.core.ktx) + implementation(libs.androidx.core.splashscreen) + implementation(libs.androidx.lifecycle.runtime.ktx) + implementation(libs.androidx.lifecycle.viewmodel.compose) + implementation(libs.androidx.navigation.compose) + implementation(libs.androidx.room.runtime) + annotationProcessor(libs.androidx.room.compiler) + ksp(libs.androidx.room.compiler) + implementation(libs.libsu.core) + implementation(libs.libsu.io) + implementation(libs.libsu.nio) + implementation(libs.libsu.service) + implementation(libs.material) + implementation(libs.okhttp) + implementation(libs.kotlinx.serialization.json) } \ No newline at end of file diff --git a/app/src/main/java/com/github/capntrips/kernelflasher/MainActivity.kt b/app/src/main/java/com/github/capntrips/kernelflasher/MainActivity.kt index 92c14b3..f3e3ace 100644 --- a/app/src/main/java/com/github/capntrips/kernelflasher/MainActivity.kt +++ b/app/src/main/java/com/github/capntrips/kernelflasher/MainActivity.kt @@ -16,6 +16,7 @@ import androidx.activity.compose.BackHandler import androidx.activity.compose.setContent import androidx.compose.animation.AnimatedVisibilityScope import androidx.compose.animation.ExperimentalAnimationApi +import androidx.compose.material.ExperimentalMaterialApi import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.runtime.Composable import androidx.compose.ui.res.stringResource @@ -26,6 +27,9 @@ import androidx.core.view.WindowCompat import androidx.lifecycle.ViewModelProvider import androidx.lifecycle.viewmodel.compose.viewModel import androidx.navigation.NavBackStackEntry +import androidx.navigation.compose.NavHost +import androidx.navigation.compose.composable +import androidx.navigation.compose.rememberNavController import com.github.capntrips.kernelflasher.ui.screens.RefreshableScreen import com.github.capntrips.kernelflasher.ui.screens.backups.BackupsContent import com.github.capntrips.kernelflasher.ui.screens.backups.SlotBackupsContent @@ -40,9 +44,6 @@ import com.github.capntrips.kernelflasher.ui.screens.updates.UpdatesChangelogCon import com.github.capntrips.kernelflasher.ui.screens.updates.UpdatesContent import com.github.capntrips.kernelflasher.ui.screens.updates.UpdatesViewContent import com.github.capntrips.kernelflasher.ui.theme.KernelFlasherTheme -import com.google.accompanist.navigation.animation.AnimatedNavHost -import com.google.accompanist.navigation.animation.composable -import com.google.accompanist.navigation.animation.rememberAnimatedNavController import com.topjohnwu.superuser.Shell import com.topjohnwu.superuser.ipc.RootService import com.topjohnwu.superuser.nio.FileSystemManager @@ -50,10 +51,11 @@ import kotlinx.serialization.ExperimentalSerializationApi import java.io.File +@ExperimentalAnimationApi +@ExperimentalMaterialApi +@ExperimentalMaterial3Api @ExperimentalSerializationApi @ExperimentalUnitApi -@ExperimentalMaterial3Api -@ExperimentalAnimationApi class MainActivity : ComponentActivity() { companion object { const val TAG: String = "MainActivity" @@ -164,7 +166,7 @@ class MainActivity : ComponentActivity() { } } setContent { - val navController = rememberAnimatedNavController() + val navController = rememberNavController() viewModel = viewModel { val application = checkNotNull(get(ViewModelProvider.AndroidViewModelFactory.APPLICATION_KEY)) MainViewModel(application, fileSystemManager, navController) @@ -200,7 +202,7 @@ class MainActivity : ComponentActivity() { SlotBackupsContent(slotViewModel, backupsViewModel, slotSuffix, navController) } } - AnimatedNavHost(navController = navController, startDestination = "main") { + NavHost(navController = navController, startDestination = "main") { composable("main") { RefreshableScreen(mainViewModel, navController, swipeEnabled = true) { MainContent(mainViewModel, navController) diff --git a/app/src/main/java/com/github/capntrips/kernelflasher/common/PartitionUtil.kt b/app/src/main/java/com/github/capntrips/kernelflasher/common/PartitionUtil.kt index 19a33fc..d94830d 100644 --- a/app/src/main/java/com/github/capntrips/kernelflasher/common/PartitionUtil.kt +++ b/app/src/main/java/com/github/capntrips/kernelflasher/common/PartitionUtil.kt @@ -6,7 +6,6 @@ import com.github.capntrips.kernelflasher.common.types.partitions.FstabEntry import com.topjohnwu.superuser.Shell import com.topjohnwu.superuser.nio.ExtendedFile import com.topjohnwu.superuser.nio.FileSystemManager -import kotlinx.serialization.decodeFromString import kotlinx.serialization.json.Json import java.io.File import java.security.DigestOutputStream @@ -27,13 +26,13 @@ object PartitionUtil { val AvailablePartitions = mutableListOf() private var fileSystemManager: FileSystemManager? = null - private var bootDevice: File? = null + private var bootParent: File? = null fun init(context: Context, fileSystemManager: FileSystemManager) { this.fileSystemManager = fileSystemManager val fstabEntry = findPartitionFstabEntry(context, "boot") if (fstabEntry != null) { - bootDevice = File(fstabEntry.blkDevice).parentFile + bootParent = File(fstabEntry.blkDevice).parentFile } val activeSlotSuffix = Shell.cmd("getprop ro.boot.slot_suffix").exec().out[0] for (partitionName in PartitionNames) { @@ -67,10 +66,13 @@ object PartitionUtil { } } else { blockDevice = fileSystemManager!!.getFile(fstabEntry.blkDevice) + if (blockDevice.name != "$partitionName$slotSuffix") { + blockDevice = fileSystemManager!!.getFile(blockDevice.parentFile, "$partitionName$slotSuffix") + } } } - if (blockDevice == null) { - val siblingDevice = if (bootDevice != null) fileSystemManager!!.getFile(bootDevice!!, partitionName) else null + if (blockDevice == null || !blockDevice.exists()) { + val siblingDevice = if (bootParent != null) fileSystemManager!!.getFile(bootParent!!, "$partitionName$slotSuffix") else null val physicalDevice = fileSystemManager!!.getFile("/dev/block/by-name/$partitionName$slotSuffix") val logicalDevice = fileSystemManager!!.getFile("/dev/block/mapper/$partitionName$slotSuffix") if (siblingDevice?.exists() == true) { diff --git a/app/src/main/java/com/github/capntrips/kernelflasher/common/extensions/ExtendedFile.kt b/app/src/main/java/com/github/capntrips/kernelflasher/common/extensions/ExtendedFile.kt index 79e8cc2..d6a2a47 100644 --- a/app/src/main/java/com/github/capntrips/kernelflasher/common/extensions/ExtendedFile.kt +++ b/app/src/main/java/com/github/capntrips/kernelflasher/common/extensions/ExtendedFile.kt @@ -16,9 +16,7 @@ object ExtendedFile { @Suppress("unused") fun ExtendedFile.writeText(text: String, charset: Charset = Charsets.UTF_8): Unit = writeBytes(text.toByteArray(charset)) - @Suppress("MemberVisibilityCanBePrivate") fun ExtendedFile.inputStream(): InputStream = newInputStream() - @Suppress("MemberVisibilityCanBePrivate") fun ExtendedFile.outputStream(): OutputStream = newOutputStream() } diff --git a/app/src/main/java/com/github/capntrips/kernelflasher/common/types/partitions/Partitions.kt b/app/src/main/java/com/github/capntrips/kernelflasher/common/types/partitions/Partitions.kt index b611f1f..3c7112b 100644 --- a/app/src/main/java/com/github/capntrips/kernelflasher/common/types/partitions/Partitions.kt +++ b/app/src/main/java/com/github/capntrips/kernelflasher/common/types/partitions/Partitions.kt @@ -7,10 +7,10 @@ data class Partitions( val boot: String? = null, val vbmeta: String? = null, val dtbo: String? = null, - val vendor_boot: String? = null, - val vendor_kernel_boot: String? = null, - val vendor_dlkm: String? = null, - val init_boot: String? = null, + @Suppress("PropertyName") val vendor_boot: String? = null, + @Suppress("PropertyName") val vendor_kernel_boot: String? = null, + @Suppress("PropertyName") val vendor_dlkm: String? = null, + @Suppress("PropertyName") val init_boot: String? = null, val recovery: String? = null ) { companion object { diff --git a/app/src/main/java/com/github/capntrips/kernelflasher/ui/components/FlashButton.kt b/app/src/main/java/com/github/capntrips/kernelflasher/ui/components/FlashButton.kt index ce9610b..6e4d26b 100644 --- a/app/src/main/java/com/github/capntrips/kernelflasher/ui/components/FlashButton.kt +++ b/app/src/main/java/com/github/capntrips/kernelflasher/ui/components/FlashButton.kt @@ -6,6 +6,7 @@ import androidx.activity.result.contract.ActivityResultContracts import androidx.compose.animation.ExperimentalAnimationApi import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material.ExperimentalMaterialApi import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.OutlinedButton import androidx.compose.material3.Text @@ -18,9 +19,10 @@ import androidx.compose.ui.unit.ExperimentalUnitApi import androidx.compose.ui.unit.dp import com.github.capntrips.kernelflasher.MainActivity -@ExperimentalUnitApi @ExperimentalAnimationApi +@ExperimentalMaterialApi @ExperimentalMaterial3Api +@ExperimentalUnitApi @Composable fun FlashButton( buttonText: String, diff --git a/app/src/main/java/com/github/capntrips/kernelflasher/ui/components/FlashList.kt b/app/src/main/java/com/github/capntrips/kernelflasher/ui/components/FlashList.kt index 3b3996f..00b8c05 100644 --- a/app/src/main/java/com/github/capntrips/kernelflasher/ui/components/FlashList.kt +++ b/app/src/main/java/com/github/capntrips/kernelflasher/ui/components/FlashList.kt @@ -16,6 +16,7 @@ import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableIntStateOf import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember import androidx.compose.runtime.setValue @@ -85,10 +86,9 @@ fun Modifier.scrollbar( width: Dp = 6.dp ): Modifier = composed { var visibleItemsCountChanged = false - var visibleItemsCount by remember { mutableStateOf(state.layoutInfo.visibleItemsInfo.size) } + var visibleItemsCount by remember { mutableIntStateOf(state.layoutInfo.visibleItemsInfo.size) } if (visibleItemsCount != state.layoutInfo.visibleItemsInfo.size) { visibleItemsCountChanged = true - @Suppress("UNUSED_VALUE") visibleItemsCount = state.layoutInfo.visibleItemsInfo.size } diff --git a/app/src/main/java/com/github/capntrips/kernelflasher/ui/components/SlotCard.kt b/app/src/main/java/com/github/capntrips/kernelflasher/ui/components/SlotCard.kt index a761567..7dfeddf 100644 --- a/app/src/main/java/com/github/capntrips/kernelflasher/ui/components/SlotCard.kt +++ b/app/src/main/java/com/github/capntrips/kernelflasher/ui/components/SlotCard.kt @@ -4,7 +4,7 @@ import androidx.compose.animation.AnimatedVisibility import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable -import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.mutableIntStateOf import androidx.compose.runtime.remember import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.font.FontFamily @@ -34,7 +34,7 @@ fun SlotCard( } } ) { - val cardWidth = remember { mutableStateOf(0) } + val cardWidth = remember { mutableIntStateOf(0) } DataRow( label = stringResource(R.string.boot_sha1), value = viewModel.sha1.substring(0, 8), diff --git a/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/RefreshableScreen.kt b/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/RefreshableScreen.kt index 815fa40..7955fde 100644 --- a/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/RefreshableScreen.kt +++ b/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/RefreshableScreen.kt @@ -17,8 +17,12 @@ import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.statusBars import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.verticalScroll +import androidx.compose.material.ExperimentalMaterialApi import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.ArrowBack +import androidx.compose.material.pullrefresh.PullRefreshIndicator +import androidx.compose.material.pullrefresh.pullRefresh +import androidx.compose.material.pullrefresh.rememberPullRefreshState import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.Icon import androidx.compose.material3.IconButton @@ -34,10 +38,8 @@ import androidx.compose.ui.unit.dp import androidx.navigation.NavController import com.github.capntrips.kernelflasher.R import com.github.capntrips.kernelflasher.ui.screens.main.MainViewModel -import com.google.accompanist.swiperefresh.SwipeRefresh -import com.google.accompanist.swiperefresh.SwipeRefreshIndicator -import com.google.accompanist.swiperefresh.rememberSwipeRefreshState +@ExperimentalMaterialApi @ExperimentalMaterial3Api @Composable fun RefreshableScreen( @@ -48,6 +50,10 @@ fun RefreshableScreen( ) { val statusBar = WindowInsets.statusBars.only(WindowInsetsSides.Top).asPaddingValues() val navigationBars = WindowInsets.navigationBars.asPaddingValues() + val context = LocalContext.current + val state = rememberPullRefreshState(viewModel.isRefreshing, onRefresh = { + viewModel.refresh(context) + }) Scaffold( topBar = { Box( @@ -85,24 +91,11 @@ fun RefreshableScreen( } } ) { paddingValues -> - val context = LocalContext.current - SwipeRefresh( + Box( modifier = Modifier .padding(paddingValues) + .pullRefresh(state, swipeEnabled) .fillMaxSize(), - state = rememberSwipeRefreshState(viewModel.isRefreshing), - swipeEnabled = swipeEnabled, - // TODO: move onRefresh to signature? - onRefresh = { viewModel.refresh(context) }, - indicator = { state, trigger -> - SwipeRefreshIndicator( - state = state, - refreshTriggerDistance = trigger, - backgroundColor = MaterialTheme.colorScheme.background, - contentColor = MaterialTheme.colorScheme.primaryContainer, - scale = true - ) - } ) { Column( modifier = Modifier @@ -111,6 +104,14 @@ fun RefreshableScreen( .verticalScroll(rememberScrollState()), content = content ) + PullRefreshIndicator( + viewModel.isRefreshing, + state = state, + modifier = Modifier.align(Alignment.TopCenter), + backgroundColor = MaterialTheme.colorScheme.background, + contentColor = MaterialTheme.colorScheme.primaryContainer, + scale = true + ) } } } diff --git a/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/backups/BackupsContent.kt b/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/backups/BackupsContent.kt index d6e0022..2f4cc3c 100644 --- a/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/backups/BackupsContent.kt +++ b/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/backups/BackupsContent.kt @@ -12,7 +12,7 @@ import androidx.compose.material3.MaterialTheme import androidx.compose.material3.OutlinedButton import androidx.compose.material3.Text import androidx.compose.runtime.Composable -import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.mutableIntStateOf import androidx.compose.runtime.remember import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalContext @@ -39,7 +39,7 @@ fun ColumnScope.BackupsContent( val context = LocalContext.current if (viewModel.currentBackup != null && viewModel.backups.containsKey(viewModel.currentBackup)) { DataCard (viewModel.currentBackup!!) { - val cardWidth = remember { mutableStateOf(0) } + val cardWidth = remember { mutableIntStateOf(0) } val currentBackup = viewModel.backups.getValue(viewModel.currentBackup!!) DataRow(stringResource(R.string.backup_type), currentBackup.type, mutableMaxWidth = cardWidth) DataRow(stringResource(R.string.kernel_version), currentBackup.kernelVersion, mutableMaxWidth = cardWidth, clickable = true) @@ -54,7 +54,7 @@ fun ColumnScope.BackupsContent( mutableMaxWidth = cardWidth ) if (currentBackup.hashes != null) { - val hashWidth = remember { mutableStateOf(0) } + val hashWidth = remember { mutableIntStateOf(0) } DataSet(stringResource(R.string.hashes)) { for (partitionName in PartitionUtil.PartitionNames) { val hash = currentBackup.hashes.get(partitionName) @@ -118,7 +118,7 @@ fun ColumnScope.BackupsContent( } } ) { - val cardWidth = remember { mutableStateOf(0) } + val cardWidth = remember { mutableIntStateOf(0) } if (currentBackup.type == "raw") { DataRow( label = stringResource(R.string.boot_sha1), diff --git a/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/backups/BackupsViewModel.kt b/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/backups/BackupsViewModel.kt index 73a1956..e9a9470 100644 --- a/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/backups/BackupsViewModel.kt +++ b/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/backups/BackupsViewModel.kt @@ -24,7 +24,6 @@ import com.topjohnwu.superuser.nio.FileSystemManager import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch import kotlinx.coroutines.withContext -import kotlinx.serialization.decodeFromString import kotlinx.serialization.encodeToString import kotlinx.serialization.json.Json import java.io.File @@ -61,7 +60,6 @@ class BackupsViewModel( var wasRestored: Boolean? = null private val _backupPartitions: SnapshotStateMap = mutableStateMapOf() private val hashAlgorithm: String = "SHA-256" - @Suppress("PropertyName") @Deprecated("Backup migration will be removed in the first stable release") private var _needsMigration: MutableState = mutableStateOf(false) @@ -73,7 +71,6 @@ class BackupsViewModel( get() = _isRefreshing.value val backups: Map get() = _backups - @Suppress("DeprecatedCallableAddReplaceWith") @Deprecated("Backup migration will be removed in the first stable release") val needsMigration: Boolean get() = _needsMigration.value @@ -281,14 +278,12 @@ class BackupsViewModel( propFile.delete() val dest = backupsDir.getChildFile(child.name) - @Suppress("BlockingMethodInNonBlockingContext") Shell.cmd("mv $child $dest").exec() if (!dest.exists()) { throw Error("Too slow") } val jsonFile = dest.getChildFile("backup.json") val backup = Backup(name, type, kernelVersion, bootSha1, filename) - @Suppress("BlockingMethodInNonBlockingContext") jsonFile.outputStream().use { it.write(indentedJson.encodeToString(backup).toByteArray(Charsets.UTF_8)) } _backups[name] = backup } diff --git a/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/backups/SlotBackupsContent.kt b/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/backups/SlotBackupsContent.kt index e4b3e58..cb61652 100644 --- a/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/backups/SlotBackupsContent.kt +++ b/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/backups/SlotBackupsContent.kt @@ -16,7 +16,7 @@ import androidx.compose.material3.MaterialTheme import androidx.compose.material3.OutlinedButton import androidx.compose.material3.Text import androidx.compose.runtime.Composable -import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.mutableIntStateOf import androidx.compose.runtime.remember import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier @@ -41,8 +41,8 @@ import com.github.capntrips.kernelflasher.ui.components.SlotCard import com.github.capntrips.kernelflasher.ui.components.ViewButton import com.github.capntrips.kernelflasher.ui.screens.slot.SlotViewModel -@ExperimentalUnitApi @ExperimentalMaterial3Api +@ExperimentalUnitApi @Composable fun ColumnScope.SlotBackupsContent( slotViewModel: SlotViewModel, @@ -63,7 +63,7 @@ fun ColumnScope.SlotBackupsContent( if (backupsViewModel.currentBackup != null && backupsViewModel.backups.containsKey(backupsViewModel.currentBackup)) { val currentBackup = backupsViewModel.backups.getValue(backupsViewModel.currentBackup!!) DataCard(backupsViewModel.currentBackup!!) { - val cardWidth = remember { mutableStateOf(0) } + val cardWidth = remember { mutableIntStateOf(0) } DataRow(stringResource(R.string.backup_type), currentBackup.type, mutableMaxWidth = cardWidth) DataRow(stringResource(R.string.kernel_version), currentBackup.kernelVersion, mutableMaxWidth = cardWidth, clickable = true) if (currentBackup.type == "raw") { @@ -77,7 +77,7 @@ fun ColumnScope.SlotBackupsContent( mutableMaxWidth = cardWidth ) if (currentBackup.hashes != null) { - val hashWidth = remember { mutableStateOf(0) } + val hashWidth = remember { mutableIntStateOf(0) } DataSet(stringResource(R.string.hashes)) { for (partitionName in PartitionUtil.PartitionNames) { val hash = currentBackup.hashes.get(partitionName) diff --git a/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/main/MainContent.kt b/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/main/MainContent.kt index 0417a83..71abeec 100644 --- a/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/main/MainContent.kt +++ b/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/main/MainContent.kt @@ -11,7 +11,7 @@ import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.OutlinedButton import androidx.compose.material3.Text import androidx.compose.runtime.Composable -import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.mutableIntStateOf import androidx.compose.runtime.remember import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalContext @@ -31,7 +31,7 @@ fun ColumnScope.MainContent( ) { val context = LocalContext.current DataCard (title = stringResource(R.string.device)) { - val cardWidth = remember { mutableStateOf(0) } + val cardWidth = remember { mutableIntStateOf(0) } DataRow(stringResource(R.string.model), "${Build.MODEL} (${Build.DEVICE})", mutableMaxWidth = cardWidth) DataRow(stringResource(R.string.build_number), Build.ID, mutableMaxWidth = cardWidth) DataRow(stringResource(R.string.kernel_version), viewModel.kernelVersion, mutableMaxWidth = cardWidth, clickable = true) diff --git a/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/reboot/RebootContent.kt b/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/reboot/RebootContent.kt index 785bbed..11abebf 100644 --- a/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/reboot/RebootContent.kt +++ b/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/reboot/RebootContent.kt @@ -1,5 +1,6 @@ package com.github.capntrips.kernelflasher.ui.screens.reboot +import android.os.Build import android.os.PowerManager import androidx.compose.foundation.layout.ColumnScope import androidx.compose.foundation.layout.fillMaxWidth @@ -14,11 +15,11 @@ import androidx.compose.ui.unit.dp import androidx.navigation.NavController import com.github.capntrips.kernelflasher.R -@Suppress("unused") +@Suppress("UnusedReceiverParameter") @Composable fun ColumnScope.RebootContent( viewModel: RebootViewModel, - @Suppress("UNUSED_PARAMETER") navController: NavController + @Suppress("UNUSED_PARAMETER") ignoredNavController: NavController ) { val context = LocalContext.current OutlinedButton( @@ -29,7 +30,7 @@ fun ColumnScope.RebootContent( ) { Text(stringResource(R.string.reboot)) } - if (context.getSystemService(PowerManager::class.java)?.isRebootingUserspaceSupported == true) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R && context.getSystemService(PowerManager::class.java)?.isRebootingUserspaceSupported == true) { OutlinedButton( modifier = Modifier .fillMaxWidth(), diff --git a/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/reboot/RebootViewModel.kt b/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/reboot/RebootViewModel.kt index 5e9439b..ce48337 100644 --- a/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/reboot/RebootViewModel.kt +++ b/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/reboot/RebootViewModel.kt @@ -13,7 +13,7 @@ import kotlinx.coroutines.launch import kotlinx.coroutines.withContext class RebootViewModel( - @Suppress("unused", "UNUSED_PARAMETER") context: Context, + @Suppress("UNUSED_PARAMETER") ignoredContext: Context, @Suppress("unused") private val fileSystemManager: FileSystemManager, private val navController: NavController, private val _isRefreshing: MutableState diff --git a/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/slot/SlotContent.kt b/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/slot/SlotContent.kt index c88a3b9..0838987 100644 --- a/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/slot/SlotContent.kt +++ b/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/slot/SlotContent.kt @@ -21,9 +21,9 @@ import androidx.navigation.NavController import com.github.capntrips.kernelflasher.R import com.github.capntrips.kernelflasher.ui.components.SlotCard -@ExperimentalUnitApi @ExperimentalAnimationApi @ExperimentalMaterial3Api +@ExperimentalUnitApi @Composable fun ColumnScope.SlotContent( viewModel: SlotViewModel, diff --git a/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/slot/SlotFlashContent.kt b/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/slot/SlotFlashContent.kt index 021c0cf..5f1159d 100644 --- a/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/slot/SlotFlashContent.kt +++ b/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/slot/SlotFlashContent.kt @@ -10,6 +10,7 @@ import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.offset import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material.ExperimentalMaterialApi import androidx.compose.material3.ButtonDefaults import androidx.compose.material3.Checkbox import androidx.compose.material3.ExperimentalMaterial3Api @@ -34,8 +35,9 @@ import com.github.capntrips.kernelflasher.ui.components.FlashList import com.github.capntrips.kernelflasher.ui.components.SlotCard @ExperimentalAnimationApi -@ExperimentalUnitApi +@ExperimentalMaterialApi @ExperimentalMaterial3Api +@ExperimentalUnitApi @Composable fun ColumnScope.SlotFlashContent( viewModel: SlotViewModel, diff --git a/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/slot/SlotViewModel.kt b/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/slot/SlotViewModel.kt index 4b4ff18..9295941 100644 --- a/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/slot/SlotViewModel.kt +++ b/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/slot/SlotViewModel.kt @@ -38,7 +38,7 @@ import java.util.zip.ZipFile class SlotViewModel( context: Context, - @Suppress("unused") private val fileSystemManager: FileSystemManager, + private val fileSystemManager: FileSystemManager, private val navController: NavController, private val _isRefreshing: MutableState, val isActive: Boolean, @@ -50,13 +50,11 @@ class SlotViewModel( const val TAG: String = "KernelFlasher/SlotState" } - @Suppress("PropertyName") private var _sha1: String? = null var kernelVersion: String? = null var hasVendorDlkm: Boolean = false var isVendorDlkmMapped: Boolean = false var isVendorDlkmMounted: Boolean = false - @Suppress("PropertyName") private val _flashOutput: SnapshotStateList = mutableStateListOf() private val _wasFlashSuccess: MutableState = mutableStateOf(null) private val _backupPartitions: SnapshotStateMap = mutableStateMapOf() @@ -67,6 +65,7 @@ class SlotViewModel( private var inInit = true private var _error: String? = null + @Suppress("PrivatePropertyName") private val STOCK_MAGISKBOOT = "/data/adb/magisk/magiskboot" private var magiskboot: String = STOCK_MAGISKBOOT @@ -175,6 +174,7 @@ class SlotViewModel( } } + @Suppress("SameParameterValue") private fun uiPrint(message: String) { viewModelScope.launch(Dispatchers.Main) { _flashOutput.add("ui_print $message") @@ -392,7 +392,6 @@ class SlotViewModel( val jsonFile = backupDir.getChildFile("backup.json") val backup = Backup(now, "raw", currentKernelVersion!!, sha1, null, hashes, hashAlgorithm) val indentedJson = Json { prettyPrint = true } - @Suppress("BlockingMethodInNonBlockingContext") jsonFile.outputStream().use { it.write(indentedJson.encodeToString(backup).toByteArray(Charsets.UTF_8)) } _backups[now] = backup addMessage("Backup $now saved") @@ -402,7 +401,6 @@ class SlotViewModel( fun backupZip(context: Context, callback: () -> Unit) { launch { - @Suppress("BlockingMethodInNonBlockingContext") val source = context.contentResolver.openInputStream(flashUri!!) if (source != null) { _getKernel(context) @@ -411,11 +409,9 @@ class SlotViewModel( val jsonFile = backupDir.getChildFile("backup.json") val backup = Backup(now, "ak3", kernelVersion!!, null, flashFilename) val indentedJson = Json { prettyPrint = true } - @Suppress("BlockingMethodInNonBlockingContext") jsonFile.outputStream().use { it.write(indentedJson.encodeToString(backup).toByteArray(Charsets.UTF_8)) } val destination = backupDir.getChildFile(flashFilename!!) source.use { inputStream -> - @Suppress("BlockingMethodInNonBlockingContext") destination.outputStream().use { outputStream -> inputStream.copyTo(outputStream) } @@ -473,9 +469,7 @@ class SlotViewModel( } val source = backupDir.getChildFile(flashFilename!!) val zip = File(context.filesDir, flashFilename!!) - @Suppress("BlockingMethodInNonBlockingContext") source.newInputStream().use { inputStream -> - @Suppress("BlockingMethodInNonBlockingContext") zip.outputStream().use { outputStream -> inputStream.copyTo(outputStream) } @@ -490,7 +484,6 @@ class SlotViewModel( val name = cursor.getColumnIndex(OpenableColumns.DISPLAY_NAME) return@use cursor.getString(name) } ?: "ak3.zip" - @Suppress("BlockingMethodInNonBlockingContext") val source = context.contentResolver.openInputStream(uri) val file = File(context.filesDir, flashFilename!!) source.use { inputStream -> diff --git a/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/updates/UpdatesAddContent.kt b/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/updates/UpdatesAddContent.kt index 5717dd0..060ed43 100644 --- a/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/updates/UpdatesAddContent.kt +++ b/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/updates/UpdatesAddContent.kt @@ -22,9 +22,9 @@ import androidx.navigation.NavController import com.github.capntrips.kernelflasher.R import kotlinx.serialization.ExperimentalSerializationApi -@Suppress("unused") -@ExperimentalSerializationApi +@Suppress("UnusedReceiverParameter") @ExperimentalMaterial3Api +@ExperimentalSerializationApi @Composable fun ColumnScope.UpdatesAddContent( viewModel: UpdatesViewModel, diff --git a/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/updates/UpdatesChangelogContent.kt b/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/updates/UpdatesChangelogContent.kt index ff74fe1..eaf25be 100644 --- a/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/updates/UpdatesChangelogContent.kt +++ b/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/updates/UpdatesChangelogContent.kt @@ -16,13 +16,13 @@ import androidx.compose.ui.unit.dp import androidx.navigation.NavController import com.github.capntrips.kernelflasher.ui.components.DataCard -@Suppress("unused") -@ExperimentalUnitApi +@Suppress("UnusedReceiverParameter") @ExperimentalMaterial3Api +@ExperimentalUnitApi @Composable fun ColumnScope.UpdatesChangelogContent( viewModel: UpdatesViewModel, - @Suppress("UNUSED_PARAMETER") navController: NavController + @Suppress("UNUSED_PARAMETER") ignoredNavController: NavController ) { viewModel.currentUpdate?.let { currentUpdate -> DataCard(currentUpdate.kernelName) diff --git a/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/updates/UpdatesContent.kt b/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/updates/UpdatesContent.kt index a4c2908..d2938a5 100644 --- a/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/updates/UpdatesContent.kt +++ b/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/updates/UpdatesContent.kt @@ -12,7 +12,7 @@ import androidx.compose.material3.MaterialTheme import androidx.compose.material3.OutlinedButton import androidx.compose.material3.Text import androidx.compose.runtime.Composable -import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.mutableIntStateOf import androidx.compose.runtime.remember import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalContext @@ -49,7 +49,7 @@ fun ColumnScope.UpdatesContent( } } ) { - val cardWidth = remember { mutableStateOf(0) } + val cardWidth = remember { mutableIntStateOf(0) } DataRow(stringResource(R.string.version), update.kernelVersion, mutableMaxWidth = cardWidth) DataRow(stringResource(R.string.date_released), DateSerializer.formatter.format(update.kernelDate), mutableMaxWidth = cardWidth) DataRow( diff --git a/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/updates/UpdatesViewContent.kt b/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/updates/UpdatesViewContent.kt index 0f2bc32..39a9a09 100644 --- a/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/updates/UpdatesViewContent.kt +++ b/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/updates/UpdatesViewContent.kt @@ -12,7 +12,7 @@ import androidx.compose.material3.MaterialTheme import androidx.compose.material3.OutlinedButton import androidx.compose.material3.Text import androidx.compose.runtime.Composable -import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.mutableIntStateOf import androidx.compose.runtime.remember import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalContext @@ -26,8 +26,8 @@ import com.github.capntrips.kernelflasher.ui.components.DataCard import com.github.capntrips.kernelflasher.ui.components.DataRow import kotlinx.serialization.ExperimentalSerializationApi -@ExperimentalSerializationApi @ExperimentalMaterial3Api +@ExperimentalSerializationApi @Composable fun ColumnScope.UpdatesViewContent( viewModel: UpdatesViewModel, @@ -36,7 +36,7 @@ fun ColumnScope.UpdatesViewContent( val context = LocalContext.current viewModel.currentUpdate?.let { currentUpdate -> DataCard(currentUpdate.kernelName) { - val cardWidth = remember { mutableStateOf(0) } + val cardWidth = remember { mutableIntStateOf(0) } DataRow(stringResource(R.string.version), currentUpdate.kernelVersion, mutableMaxWidth = cardWidth) DataRow(stringResource(R.string.date_released), DateSerializer.formatter.format(currentUpdate.kernelDate), mutableMaxWidth = cardWidth) DataRow( diff --git a/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/updates/UpdatesViewModel.kt b/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/updates/UpdatesViewModel.kt index e4f8bea..df2a6ef 100644 --- a/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/updates/UpdatesViewModel.kt +++ b/app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/updates/UpdatesViewModel.kt @@ -1,6 +1,5 @@ package com.github.capntrips.kernelflasher.ui.screens.updates -import android.annotation.SuppressLint import android.content.ContentValues import android.content.Context import android.net.Uri @@ -33,6 +32,7 @@ import java.util.Locale import kotlin.io.path.Path import kotlin.io.path.name +@ExperimentalSerializationApi class UpdatesViewModel( context: Context, @Suppress("unused") private val fileSystemManager: FileSystemManager, @@ -40,7 +40,6 @@ class UpdatesViewModel( private val _isRefreshing: MutableState ) : ViewModel() { companion object { - @Suppress("unused") const val TAG: String = "KernelFlasher/UpdatesState" val lastUpdatedFormatter = SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.US) } @@ -105,8 +104,6 @@ class UpdatesViewModel( changelog = null } - @ExperimentalSerializationApi - @Suppress("BlockingMethodInNonBlockingContext") fun add(url: String, callback: (updateId: Int) -> Unit) { launch { val request = Request.Builder() @@ -128,8 +125,6 @@ class UpdatesViewModel( } } - @ExperimentalSerializationApi - @Suppress("BlockingMethodInNonBlockingContext") fun update() { launch { val request = Request.Builder() @@ -158,8 +153,6 @@ class UpdatesViewModel( } } - @ExperimentalSerializationApi - @Suppress("BlockingMethodInNonBlockingContext") fun downloadChangelog(callback: () -> Unit) { launch { val request = Request.Builder() @@ -185,9 +178,6 @@ class UpdatesViewModel( return resolver.insert(MediaStore.Files.getContentUri("external"), values) } - @SuppressLint("SdCardPath") - @ExperimentalSerializationApi - @Suppress("BlockingMethodInNonBlockingContext") fun downloadKernel(context: Context) { launch { val remoteUri = Uri.parse(currentUpdate!!.kernelLink) diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml index 6b78462..b3e26b4 100644 --- a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -2,4 +2,5 @@ + diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml index 6b78462..b3e26b4 100644 --- a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -2,4 +2,5 @@ + diff --git a/build.gradle b/build.gradle index c53574d..51cd315 100644 --- a/build.gradle +++ b/build.gradle @@ -1,31 +1,10 @@ -buildscript { - ext { - accompanist_version = '0.25.0' - activity_version = '1.6.0' - appcompat_version = '1.7.0-alpha01' - compose_version = '1.3.0-rc01' - compiler_version = '1.3.0' - core_version = '1.9.0-rc01' - libsu_version = '5.0.2' - lifecycle_version = '2.5.1' - material_version = '1.8.0-alpha01' - material3_version = '1.0.0-rc01' - nav_version = '2.5.2' - okhttp_version = '4.10.0' - room_version = '2.4.3' - serialization_version = '1.4.0-RC' - splashscreen_version = '1.0.0' - } -} - plugins { - id 'com.android.application' version '7.3.1' apply false - id 'com.android.library' version '7.3.1' apply false - id 'org.jetbrains.kotlin.android' version '1.7.10' apply false - id 'org.jetbrains.kotlin.kapt' version '1.7.10' apply false - id 'org.jetbrains.kotlin.plugin.serialization' version '1.7.10' apply false + alias(libs.plugins.android.application) apply false + alias(libs.plugins.devtools.ksp) apply false + alias(libs.plugins.kotlin.android) apply false + alias(libs.plugins.kotlin.serialization) apply false } -task clean(type: Delete) { +tasks.register('clean', Delete) { delete rootProject.buildDir } \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 0000000..0f6332e --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,51 @@ +[versions] +kotlin = "1.9.10" +compose-compiler = "1.5.3" + +androidx-activity-compose = "1.7.2" +androidx-appcompat = "1.6.1" +androidx-compose = "1.5.2" +androidx-compose-material3 = "1.1.2" +androidx-core-ktx = "1.12.0" +androidx-core-splashscreen = "1.0.1" +androidx-fragment = "1.6.1" +androidx-lifecycle = "2.6.2" +androidx-navigation-compose = "2.7.3" +androidx-room = "2.5.2" +kotlinx-serialization-json = "1.5.1" +libsu = "5.2.1" +material = "1.9.0" +okhttp = "4.11.0" + +android-application = "8.1.2" +devtools-ksp = "1.9.10-1.0.13" + +[libraries] +compose-compiler = { module = "androidx.compose.compiler:compiler", version.ref = "compose-compiler" } + +androidx-activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "androidx-activity-compose" } +androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "androidx-appcompat" } +androidx-compose-foundation = { group = "androidx.compose.foundation", name = "foundation", version.ref = "androidx-compose" } +androidx-compose-material = { group = "androidx.compose.material", name = "material", version.ref = "androidx-compose" } +androidx-compose-material3 = { group = "androidx.compose.material3", name = "material3", version.ref = "androidx-compose-material3" } +androidx-compose-ui = { group = "androidx.compose.ui", name="ui", version.ref = "androidx-compose" } +androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "androidx-core-ktx" } +androidx-core-splashscreen = { group = "androidx.core", name = "core-splashscreen", version.ref = "androidx-core-splashscreen" } +androidx-lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "androidx-lifecycle" } +androidx-lifecycle-viewmodel-compose = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-compose", version.ref = "androidx-lifecycle" } +androidx-navigation-compose = { group = "androidx.navigation", name = "navigation-compose", version.ref = "androidx-navigation-compose" } +androidx-room-compiler = { group = "androidx.room", name = "room-compiler", version.ref = "androidx-room" } +androidx-room-runtime = { group = "androidx.room", name = "room-runtime", version.ref = "androidx-room" } +kotlinx-serialization-json = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version.ref = "kotlinx-serialization-json" } +libsu-core = { group = "com.github.topjohnwu.libsu", name = "core", version.ref = "libsu" } +libsu-io = { group = "com.github.topjohnwu.libsu", name = "io", version.ref = "libsu" } +libsu-nio = { group = "com.github.topjohnwu.libsu", name = "nio", version.ref = "libsu" } +libsu-service = { group = "com.github.topjohnwu.libsu", name = "service", version.ref = "libsu" } +material = { group = "com.google.android.material", name = "material", version.ref = "material" } +okhttp = { group = "com.squareup.okhttp3", name = "okhttp", version.ref = "okhttp" } + +[plugins] +android-application = { id = "com.android.application", version.ref = "android-application" } +devtools-ksp = { id = "com.google.devtools.ksp", version.ref = "devtools-ksp" } +kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } +kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index bfaabff..b043ebd 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Wed Apr 06 09:30:10 CDT 2022 +#Fri Apr 14 13:36:42 CDT 2023 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip distributionPath=wrapper/dists -zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists