Skip to content

Commit

Permalink
Enable R8 for release build
Browse files Browse the repository at this point in the history
  • Loading branch information
JackEblan committed Feb 8, 2024
1 parent 0b70cc7 commit 184c5fc
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 21 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ android {

buildTypes {
release {
isMinifyEnabled = false
isShrinkResources = false
isMinifyEnabled = true
isShrinkResources = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package com.feature.applist

import androidx.annotation.VisibleForTesting
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.ExperimentalLayoutApi
import androidx.compose.foundation.layout.consumeWindowInsets
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.lazy.LazyColumn
Expand Down Expand Up @@ -47,15 +46,15 @@ internal fun AppListRoute(
}

@VisibleForTesting(otherwise = VisibleForTesting.PRIVATE)
@OptIn(ExperimentalMaterial3Api::class, ExperimentalLayoutApi::class)
@OptIn(ExperimentalMaterial3Api::class)
@Composable
internal fun AppListScreen(
modifier: Modifier = Modifier,
appListUiState: AppListUiState,
onItemClick: (String, String) -> Unit,
onSecureSettingsClick: () -> Unit
) {
Scaffold(modifier = modifier.fillMaxSize(), topBar = {
Scaffold(topBar = {
TopAppBar(title = {
Text(text = "Geto")
}, actions = {
Expand All @@ -67,13 +66,13 @@ internal fun AppListScreen(
})
}) { innerPadding ->
Box(
modifier = Modifier
modifier = modifier
.fillMaxSize()
.consumeWindowInsets(innerPadding)
) {
when (appListUiState) {
AppListUiState.Loading -> LoadingPlaceHolderScreen(
modifier = Modifier
modifier = modifier
.fillMaxSize()
.testTag("applist:loadingPlaceHolderScreen")
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ internal fun AppSettingsScreen(
onAddAppSettingsClick: () -> Unit,
onLaunchApp: () -> Unit
) {
Scaffold(modifier = modifier.fillMaxSize(), topBar = {
Scaffold(topBar = {
TopAppBar(title = {
Text(text = appName, maxLines = 1)
}, navigationIcon = {
Expand Down Expand Up @@ -162,9 +162,10 @@ internal fun AppSettingsScreen(
)
}) { innerPadding ->
Box(
modifier = modifier.fillMaxSize()
modifier = modifier
.fillMaxSize()
.consumeWindowInsets(innerPadding)
) {

when (appSettingsUiState) {
AppSettingsUiState.Empty -> {
EmptyListPlaceHolderScreen(
Expand All @@ -185,12 +186,8 @@ internal fun AppSettingsScreen(
}

is AppSettingsUiState.Success -> {

LazyColumn(
modifier = Modifier
.fillMaxSize()
.consumeWindowInsets(innerPadding),
contentPadding = innerPadding
modifier = Modifier.fillMaxSize(), contentPadding = innerPadding
) {
appSettings(
appSettingsList = appSettingsUiState.appSettingsList,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ internal fun SecureSettingsListScreen(
onGlobalDropdownMenuItemClick: () -> Unit,
secureSettingsListUiState: SecureSettingsListUiState
) {
Scaffold(modifier = modifier.fillMaxSize(), topBar = {
Scaffold(topBar = {
TopAppBar(title = {
Text(text = "Settings Database")
}, navigationIcon = {
Expand Down Expand Up @@ -151,7 +151,9 @@ internal fun SecureSettingsListScreen(
)
}) { innerPadding ->
Box(
modifier = Modifier.fillMaxSize()
modifier = modifier
.fillMaxSize()
.consumeWindowInsets(innerPadding)
) {
when (secureSettingsListUiState) {
SecureSettingsListUiState.Loading -> LoadingPlaceHolderScreen(
Expand All @@ -162,10 +164,7 @@ internal fun SecureSettingsListScreen(

is SecureSettingsListUiState.Success -> {
LazyColumn(
modifier = Modifier
.fillMaxSize()
.consumeWindowInsets(innerPadding),
contentPadding = innerPadding
modifier = Modifier.fillMaxSize(), contentPadding = innerPadding
) {
secureSettingItems(
secureSettingsList = secureSettingsListUiState.secureSettingsList,
Expand Down

0 comments on commit 184c5fc

Please sign in to comment.