Skip to content

Commit

Permalink
Merge pull request #462 from igorescodro/renovate/major-android_gradl…
Browse files Browse the repository at this point in the history
…e_plugin

Update dependency com.android.tools.build:gradle to v8
  • Loading branch information
igorescodro authored Apr 26, 2023
2 parents 77a3318 + 2f12d88 commit ca82c0b
Show file tree
Hide file tree
Showing 16 changed files with 28 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/android_tests_aer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Setup Java
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'adopt'

- name: Setup Android SDK
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
- name: Setup Java
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'adopt'

- name: Setup Android SDK
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Setup Java
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'adopt'

- name: Build with Gradle
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- name: Setup Java
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'adopt'

- name: Build with Gradle
Expand All @@ -67,7 +67,7 @@ jobs:
- name: Setup Java
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'adopt'

- name: Build with Gradle
Expand Down
2 changes: 2 additions & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@
}

-keepnames class * implements android.os.Parcelable*

-dontwarn javax.servlet.ServletContainerInitializer
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import com.escodro.domain.usecase.alarm.ScheduleAlarm
import com.escodro.local.model.AlarmInterval
import com.escodro.local.model.Task
import com.escodro.local.provider.DaoProvider
import com.escodro.task.R
import com.escodro.test.rule.DisableAnimationsRule
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.test.runTest
Expand All @@ -30,6 +29,7 @@ import java.util.Calendar
import kotlin.test.assertEquals
import kotlin.test.assertTrue
import com.escodro.alarm.R as AlarmR
import com.escodro.designsystem.R as DesignSystemR

@OptIn(ExperimentalCoroutinesApi::class, ExperimentalTestApi::class)
internal class NotificationFlowTest : KoinTest {
Expand Down Expand Up @@ -102,7 +102,10 @@ internal class NotificationFlowTest : KoinTest {
// Validate the task detail was opened
composeTestRule.onNodeWithText(name).assertIsDisplayed()
composeTestRule
.onNodeWithContentDescription(string(R.string.back_arrow_cd), useUnmergedTree = true)
.onNodeWithContentDescription(
string(DesignSystemR.string.back_arrow_cd),
useUnmergedTree = true,
)
.assertIsDisplayed()
}

Expand Down
3 changes: 2 additions & 1 deletion app/src/androidTest/java/com/escodro/alkaa/TaskFlowTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import org.koin.test.KoinTest
import org.koin.test.inject
import org.koin.test.mock.declare
import java.util.Calendar
import com.escodro.designsystem.R as DesignSystemR
import com.escodro.task.R as TaskR

@OptIn(ExperimentalCoroutinesApi::class, ExperimentalTestApi::class)
Expand Down Expand Up @@ -191,7 +192,7 @@ internal class TaskFlowTest : KoinTest {

private fun pressBack() {
composeTestRule.onNodeWithContentDescription(
string(TaskR.string.back_arrow_cd),
string(DesignSystemR.string.back_arrow_cd),
useUnmergedTree = true,
).performClick()

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ internal class TaskNotification(
private fun buildNotification(task: Task) =
NotificationCompat.Builder(context, channel.getChannelId()).apply {
setSmallIcon(R.drawable.ic_bookmark_check)
setContentTitle(context.getString(R.string.app_name))
setContentTitle(context.getString(R.string.content_app_name))
setContentText(task.title)
setContentIntent(buildPendingIntent(task))
setAutoCancel(true)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package com.escodro.alarm.permission

import android.os.Build
import androidx.annotation.ChecksSdkIntAtLeast

internal class AndroidVersionImpl : AndroidVersion {

@ChecksSdkIntAtLeast(extension = Build.VERSION_CODES.N)
override val currentVersion: Int = Build.VERSION.SDK_INT
}
3 changes: 3 additions & 0 deletions features/alarm/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<resources>
<!-- Notification app name -->
<string name="content_app_name" translatable="false">Alkaa</string>

<!-- Task notification channel -->
<string name="channel_task_name">Task alarms</string>
<string name="channel_task_description">Notifications for reminders</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ internal class AboutTest {
loadView()

// Then the items are shown
val appName = context.getString(R.string.app_name)
val appName = context.getString(R.string.about_title)
val description = context.getString(R.string.about_description)
val button = context.getString(R.string.about_button_project)
composeTestRule.onNodeWithText(text = appName, ignoreCase = true).assertExists()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ private fun ContentHeader() {
.height(200.dp)
.background(color = color),
) {
val appName = stringResource(id = R.string.app_name).lowercase(Locale.getDefault())
val appName = stringResource(id = R.string.about_title).lowercase(Locale.getDefault())
Text(
text = appName,
style = MaterialTheme.typography.displayLarge.copy(
Expand Down
2 changes: 2 additions & 0 deletions features/preference/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<string name="preference_title_about">About</string>
<string name="preference_title_version">Version</string>
<string name="preference_title_tracker">Task Tracker</string>

<string name="about_title" translatable="false">Alkaa</string>
<string name="about_description">Alkaa (to begin, to start in Finnish) is a simple to-do list to make your life easier.\n\nIt all started when I created a project to learn and keep me updated about the latest Android components and libraries. And now it is available on it Jetpack Compose version! If you\'re a developer or an enthusiast feel free to access, copy and updated the open-source code.\n\nThanks a lot for using my app! </string>
<string name="about_button_project">Visit project on GitHub</string>
<string name="about_cd_github" translatable="false">GitHub</string>
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[versions]
# Project
android_gradle_plugin = "7.4.2"
android_gradle_plugin = "8.0.0"
kotlin = "1.8.10"

# Plugins
Expand Down
4 changes: 2 additions & 2 deletions plugins/src/main/java/AlkaaVersions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ object AlkaaVersions {
const val compileSdk = 33
const val targetSdk = 33
const val minSdk = 24
val javaCompileVersion = JavaVersion.VERSION_11
val javaLanguageVersion: JavaLanguageVersion = JavaLanguageVersion.of(11)
val javaCompileVersion = JavaVersion.VERSION_17
val javaLanguageVersion: JavaLanguageVersion = JavaLanguageVersion.of(17)
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ android {
androidConfig()
proguardConfig()
kotlin {
jvmToolchain(JavaLanguageVersion.of(11).asInt())
jvmToolchain(AlkaaVersions.javaLanguageVersion.asInt())
}
}

Expand Down

0 comments on commit ca82c0b

Please sign in to comment.