Skip to content

Commit

Permalink
🔧 android build upgrades
Browse files Browse the repository at this point in the history
  • Loading branch information
jforatier committed Oct 14, 2023
1 parent 3b35280 commit b008dd0
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 34 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ plugins {
}

android {
compileSdk = 33
compileSdk = 34

defaultConfig {
applicationId = "fr.boitakub.bogadex"
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ buildscript {
}
dependencies {
// -- Core plugins
classpath("com.android.tools.build:gradle:8.0.2")
classpath("com.android.tools.build:gradle:8.1.2")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")

// -- Application plugins
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ fun TopBar(
}) {
Icon(
imageVector = Icons.Default.ArrowBack,
contentDescription = stringResource(id = R.string.back),
contentDescription = stringResource(id = fr.boitakub.bogadex.common.R.string.back),
tint = MaterialTheme.colorScheme.primary,
)
}
Expand Down Expand Up @@ -194,7 +194,7 @@ private fun GameDetailLinks(
}
},
) {
Text(resources.getString(R.string.link_to_boardgamegeek))
Text(resources.getString(fr.boitakub.bogadex.common.R.string.link_to_boardgamegeek))
}
Button(
modifier = Modifier.padding(4.dp),
Expand All @@ -210,7 +210,7 @@ private fun GameDetailLinks(
}
},
) {
Text(resources.getString(R.string.link_to_bgstats))
Text(resources.getString(fr.boitakub.bogadex.common.R.string.link_to_bgstats))
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ enum class CollectionType(
@StringRes val labelRes: Int,
@DrawableRes val iconRes: Int,
) {
ALL("all", R.string.display_all, R.drawable.ic_clear_all_24),
MY_COLLECTION("collection", R.string.display_collection, R.drawable.ic_outline_all_inbox_24),
WISHLIST("wishlist", R.string.display_wishlist, R.drawable.ic_outline_shopping_cart_24),
SOLO("solo", R.string.display_solo, R.drawable.ic_user_solid),
FILLER("filler", R.string.display_filler, R.drawable.ic_stopwatch_solid),
ALL("all", fr.boitakub.bogadex.common.R.string.display_all, R.drawable.ic_clear_all_24),
MY_COLLECTION("collection", fr.boitakub.bogadex.common.R.string.display_collection, R.drawable.ic_outline_all_inbox_24),
WISHLIST("wishlist", fr.boitakub.bogadex.common.R.string.display_wishlist, R.drawable.ic_outline_shopping_cart_24),
SOLO("solo", fr.boitakub.bogadex.common.R.string.display_solo, fr.boitakub.bogadex.common.R.drawable.ic_user_solid),
FILLER("filler", fr.boitakub.bogadex.common.R.string.display_filler, R.drawable.ic_stopwatch_solid),
;

companion object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ fun BoardGameCollectionScreen(
imageVector = ImageVector.vectorResource(id = R.drawable.ic_filter_solid),
contentDescription = "Add FAB",
)
Text(modifier = Modifier.padding(start = 8.dp), text = stringResource(id = R.string.filters))
Text(modifier = Modifier.padding(start = 8.dp), text = stringResource(id = fr.boitakub.bogadex.common.R.string.filters))
}
},
) { padding ->
Expand Down Expand Up @@ -213,7 +213,7 @@ private fun TopBar(
}) {
Icon(
imageVector = Icons.Default.List,
contentDescription = stringResource(id = R.string.change_display),
contentDescription = stringResource(id = fr.boitakub.bogadex.common.R.string.change_display),
tint = MaterialTheme.colorScheme.primary,
)
}
Expand All @@ -222,7 +222,7 @@ private fun TopBar(
}) {
Icon(
imageVector = Icons.Default.Settings,
contentDescription = stringResource(id = R.string.settings),
contentDescription = stringResource(id = fr.boitakub.bogadex.common.R.string.settings),
tint = MaterialTheme.colorScheme.primary,
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ fun BoardGameRecommendInfo(
Icon(
modifier = Modifier.size(16.dp),
imageVector = ImageVector.vectorResource(id = iconRes),
contentDescription = stringResource(id = R.string.recommended_players),
contentDescription = stringResource(id = fr.boitakub.bogadex.common.R.string.recommended_players),
tint = tintColor,
)
Text(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ fun BoardGameListItem(
Icon(
modifier = Modifier.padding(4.dp).size(16.dp),
imageVector = ImageVector.vectorResource(id = R.drawable.ic_puzzle_piece_solid),
contentDescription = stringResource(id = R.string.expansion_icon),
contentDescription = stringResource(id = fr.boitakub.bogadex.common.R.string.expansion_icon),
tint = MaterialTheme.colorScheme.secondary,
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ fun SearchInputField(
leadingIcon = {
Icon(
imageVector = Icons.Default.Search,
contentDescription = stringResource(id = R.string.decorative_image),
contentDescription = stringResource(id = fr.boitakub.bogadex.common.R.string.decorative_image),
)
},
trailingIcon = {
Expand All @@ -95,7 +95,7 @@ fun SearchInputField(
}) {
Icon(
imageVector = Icons.Default.Close,
contentDescription = stringResource(id = R.string.searchbar_clear),
contentDescription = stringResource(id = fr.boitakub.bogadex.common.R.string.searchbar_clear),
)
}
}
Expand All @@ -106,7 +106,7 @@ fun SearchInputField(
},
maxLines = 1,
singleLine = true,
placeholder = { Text(text = stringResource(id = R.string.searchbar_hint)) },
placeholder = { Text(text = stringResource(id = fr.boitakub.bogadex.common.R.string.searchbar_hint)) },
keyboardOptions = KeyboardOptions(
keyboardType = KeyboardType.Text,
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,24 +139,24 @@ private fun SettingsContent(
verticalArrangement = Arrangement.spacedBy(8.dp),
content = {
ClickableLineComponent(
iconRes = R.drawable.ic_user_solid,
titleRes = R.string.bgg_username,
subtitleRes = R.string.bgg_username_summary,
iconRes = fr.boitakub.bogadex.common.R.drawable.ic_user_solid,
titleRes = fr.boitakub.bogadex.common.R.string.bgg_username,
subtitleRes = fr.boitakub.bogadex.common.R.string.bgg_username_summary,
onClick = onBggUsernameClick,
)
SwitchComponent(
iconRes = R.drawable.ic_person_carry_box_solid,
titleRes = R.string.filter_previously_own,
subtitleRes = R.string.filter_previously_own_summary,
iconRes = fr.boitakub.bogadex.common.R.drawable.ic_person_carry_box_solid,
titleRes = fr.boitakub.bogadex.common.R.string.filter_previously_own,
subtitleRes = fr.boitakub.bogadex.common.R.string.filter_previously_own_summary,
previousState = state.displayPreviouslyOwned,
updateSelection = {
viewModel.updateFilterPreviouslyOwned(it)
},
)
ClickableLineComponent(
iconRes = R.drawable.ic_eclipse_solid,
titleRes = R.string.pref_night_title,
subtitleRes = R.string.pref_night_summary,
iconRes = fr.boitakub.bogadex.common.R.drawable.ic_eclipse_solid,
titleRes = fr.boitakub.bogadex.common.R.string.pref_night_title,
subtitleRes = fr.boitakub.bogadex.common.R.string.pref_night_summary,
onClick = onThemeSelectionClick,
)
},
Expand All @@ -174,7 +174,7 @@ fun BggUsernameTextDialog(
TextDialog(
title = {
Text(
text = stringResource(id = R.string.bgg_username),
text = stringResource(id = fr.boitakub.bogadex.common.R.string.bgg_username),
style = MaterialTheme.typography.headlineSmall,
)
},
Expand Down Expand Up @@ -212,7 +212,7 @@ fun ThemeListDialog(
TextDialog(
title = {
Text(
text = stringResource(id = R.string.pref_night_title),
text = stringResource(id = fr.boitakub.bogadex.common.R.string.pref_night_title),
style = MaterialTheme.typography.headlineSmall,
)
},
Expand Down Expand Up @@ -408,12 +408,12 @@ fun TopBar(
}) {
Icon(
imageVector = Icons.Default.ArrowBack,
contentDescription = stringResource(id = R.string.back),
contentDescription = stringResource(id = fr.boitakub.bogadex.common.R.string.back),
tint = MaterialTheme.colorScheme.primary,
)
}
Text(
text = stringResource(id = R.string.settings),
text = stringResource(id = fr.boitakub.bogadex.common.R.string.settings),
style = MaterialTheme.typography.titleLarge,
textAlign = TextAlign.Start,
maxLines = 1,
Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,15 @@ android.useAndroidX=true
android.enableJetifier=false
android.enableR8.fullMode=true
android.useMinimalKeepRules=true
android.nonTransitiveRClass=true
android.nonFinalResIds=true

# Removes uneccessary default build features
android.defaults.buildfeatures.aidl=false
android.defaults.buildfeatures.renderscript=false
android.defaults.buildfeatures.resvalues=false
android.defaults.buildfeatures.shaders=false
android.defaults.buildfeatures.buildconfig=true

# ----Android Studio---
# Defaults sidebar view to project instead of android
Expand Down Expand Up @@ -68,6 +71,3 @@ androidTestVersion=1.1.1
testCoreVersion=1.5.0
espressoVersion=3.5.1
mockkVersion=1.13.3
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false

0 comments on commit b008dd0

Please sign in to comment.