Merge branch 'github/main'

pull/421/head^2
Automerger 2 years ago
commit c03da6e660

@ -2,5 +2,15 @@
"$schema": "https://docs.renovatebot.com/renovate-schema.json", "$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [ "extends": [
"config:base", "group:all", ":dependencyDashboard", "schedule:daily" "config:base", "group:all", ":dependencyDashboard", "schedule:daily"
],
"packageRules": [
{
"matchPackageNames": ["org.objenesis:objenesis"],
"allowedVersions": "<=2.6"
},
{
"matchPackageNames": ["com.google.protobuf"],
"allowedVersions": "<=0.8.19"
}
] ]
} }

@ -26,8 +26,8 @@ plugins {
android { android {
defaultConfig { defaultConfig {
applicationId = "com.google.samples.apps.nowinandroid" applicationId = "com.google.samples.apps.nowinandroid"
versionCode = 1 versionCode = 2
versionName = "0.0.1" // X.Y.Z; X = Major, Y = minor, Z = Patch level versionName = "0.0.2" // X.Y.Z; X = Major, Y = minor, Z = Patch level
// Custom test runner to set up Hilt dependency graph // Custom test runner to set up Hilt dependency graph
testInstrumentationRunner = "com.google.samples.apps.nowinandroid.core.testing.NiaTestRunner" testInstrumentationRunner = "com.google.samples.apps.nowinandroid.core.testing.NiaTestRunner"

@ -31,5 +31,4 @@ plugins {
alias(libs.plugins.kotlin.serialization) apply false alias(libs.plugins.kotlin.serialization) apply false
alias(libs.plugins.hilt) apply false alias(libs.plugins.hilt) apply false
alias(libs.plugins.secrets) apply false alias(libs.plugins.secrets) apply false
id("org.jetbrains.kotlin.android") version "1.7.10" apply false
} }

@ -82,7 +82,7 @@ class SettingsDialogTest {
} }
@Test @Test
fun whenStateIsSuccess_allLegalLinksAreDisplayed() { fun whenStateIsSuccess_allLinksAreDisplayed() {
composeTestRule.setContent { composeTestRule.setContent {
SettingsDialog( SettingsDialog(
settingsUiState = Success( settingsUiState = Success(
@ -100,5 +100,6 @@ class SettingsDialogTest {
composeTestRule.onNodeWithText(getString(R.string.privacy_policy)).assertExists() composeTestRule.onNodeWithText(getString(R.string.privacy_policy)).assertExists()
composeTestRule.onNodeWithText(getString(R.string.licenses)).assertExists() composeTestRule.onNodeWithText(getString(R.string.licenses)).assertExists()
composeTestRule.onNodeWithText(getString(R.string.brand_guidelines)).assertExists() composeTestRule.onNodeWithText(getString(R.string.brand_guidelines)).assertExists()
composeTestRule.onNodeWithText(getString(R.string.feedback)).assertExists()
} }
} }

@ -110,7 +110,7 @@ fun SettingsDialog(
} }
} }
Divider(Modifier.padding(top = 8.dp)) Divider(Modifier.padding(top = 8.dp))
LegalPanel() LinksPanel()
} }
}, },
confirmButton = { confirmButton = {
@ -201,7 +201,7 @@ fun SettingsDialogThemeChooserRow(
} }
@Composable @Composable
private fun LegalPanel() { private fun LinksPanel() {
Row( Row(
modifier = Modifier.padding(top = 16.dp) modifier = Modifier.padding(top = 16.dp)
) { ) {
@ -226,6 +226,11 @@ private fun LegalPanel() {
text = stringResource(string.brand_guidelines), text = stringResource(string.brand_guidelines),
url = BRAND_GUIDELINES_URL url = BRAND_GUIDELINES_URL
) )
Spacer(Modifier.width(16.dp))
TextLink(
text = stringResource(string.feedback),
url = FEEDBACK_URL
)
} }
} }
} }
@ -283,3 +288,4 @@ fun PreviewSettingsDialogLoading() {
private const val PRIVACY_POLICY_URL = "https://policies.google.com/privacy" private const val PRIVACY_POLICY_URL = "https://policies.google.com/privacy"
private const val LICENSES_URL = "https://github.com/android/nowinandroid/blob/main/app/LICENSES.md#open-source-licenses-and-copyright-notices" private const val LICENSES_URL = "https://github.com/android/nowinandroid/blob/main/app/LICENSES.md#open-source-licenses-and-copyright-notices"
private const val BRAND_GUIDELINES_URL = "https://developer.android.com/distribute/marketing-tools/brand-guidelines" private const val BRAND_GUIDELINES_URL = "https://developer.android.com/distribute/marketing-tools/brand-guidelines"
private const val FEEDBACK_URL = "https://goo.gle/nia-app-feedback"

@ -21,6 +21,7 @@
<string name="privacy_policy">Privacy policy</string> <string name="privacy_policy">Privacy policy</string>
<string name="licenses">Licenses</string> <string name="licenses">Licenses</string>
<string name="brand_guidelines">Brand Guidelines</string> <string name="brand_guidelines">Brand Guidelines</string>
<string name="feedback">Feedback</string>
<string name="theme">Theme</string> <string name="theme">Theme</string>
<string name="brand_default">Default</string> <string name="brand_default">Default</string>
<string name="brand_android">Android</string> <string name="brand_android">Android</string>

@ -1,6 +1,6 @@
[versions] [versions]
accompanist = "0.27.0" accompanist = "0.27.0"
androidDesugarJdkLibs = "1.1.5" androidDesugarJdkLibs = "1.2.0"
androidGradlePlugin = "7.3.1" androidGradlePlugin = "7.3.1"
androidxActivity = "1.6.1" androidxActivity = "1.6.1"
androidxAppCompat = "1.5.1" androidxAppCompat = "1.5.1"
@ -12,10 +12,9 @@ androidxCoreSplashscreen = "1.0.0"
androidxDataStore = "1.0.0" androidxDataStore = "1.0.0"
androidxEspresso = "3.4.0" androidxEspresso = "3.4.0"
androidxHiltNavigationCompose = "1.0.0" androidxHiltNavigationCompose = "1.0.0"
# Skipping version 2.6.0-alpha02 due to https://issuetracker.google.com/249686765 androidxLifecycle = "2.6.0-alpha03"
androidxLifecycle = "2.6.0-alpha01"
androidxMacroBenchmark = "1.1.0" androidxMacroBenchmark = "1.1.0"
androidxNavigation = "2.5.2" androidxNavigation = "2.5.3"
androidxMetrics = "1.0.0-alpha03" androidxMetrics = "1.0.0-alpha03"
androidxProfileinstaller = "1.2.0" androidxProfileinstaller = "1.2.0"
androidxStartup = "1.1.1" androidxStartup = "1.1.1"
@ -28,24 +27,24 @@ androidxTracing = "1.1.0"
androidxUiAutomator = "2.2.0" androidxUiAutomator = "2.2.0"
androidxWork = "2.7.1" androidxWork = "2.7.1"
coil = "2.2.2" coil = "2.2.2"
hilt = "2.42" hilt = "2.44"
hiltExt = "1.0.0" hiltExt = "1.0.0"
jacoco = "0.8.7" jacoco = "0.8.7"
junit4 = "4.13.2" junit4 = "4.13.2"
kotlin = "1.7.20" kotlin = "1.7.20"
kotlinxCoroutines = "1.6.4" kotlinxCoroutines = "1.6.4"
kotlinxDatetime = "0.4.0" kotlinxDatetime = "0.4.0"
kotlinxSerializationJson = "1.4.0" kotlinxSerializationJson = "1.4.1"
ksp = "1.7.20-1.0.7" ksp = "1.7.20-1.0.8"
lint = "30.2.2" lint = "30.3.1"
okhttp = "4.10.0" okhttp = "4.10.0"
protobuf = "3.21.9" protobuf = "3.21.9"
protobufPlugin = "0.8.19" protobufPlugin = "0.8.19"
retrofit = "2.9.0" retrofit = "2.9.0"
retrofitKotlinxSerializationJson = "0.8.0" retrofitKotlinxSerializationJson = "0.8.0"
room = "2.5.0-alpha03" room = "2.5.0-beta01"
secrets = "2.0.1" secrets = "2.0.1"
turbine = "0.8.0" turbine = "0.12.1"
[libraries] [libraries]
accompanist-flowlayout = { group = "com.google.accompanist", name = "accompanist-flowlayout", version.ref = "accompanist" } accompanist-flowlayout = { group = "com.google.accompanist", name = "accompanist-flowlayout", version.ref = "accompanist" }

Loading…
Cancel
Save