Skip to content

Commit

Permalink
Merge pull request #5658 from grzesiek2010/v2023.3dependency_updates
Browse files Browse the repository at this point in the history
V2023.3 dependency updates
  • Loading branch information
grzesiek2010 authored Jul 11, 2023
2 parents 01d9fc7 + 4923901 commit 2ff4e28
Show file tree
Hide file tree
Showing 425 changed files with 2,252 additions and 2,285 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ references:
android_config: &android_config
working_directory: ~/work
docker:
- image: cimg/android:2022.12.1
- image: cimg/android:2023.06.1
resource_class: medium+

jobs:
Expand Down
6 changes: 3 additions & 3 deletions analytics/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins {
apply from: '../config/quality.gradle'

android {
compileSdkVersion Versions.android_compile_sdk
compileSdk Versions.android_compile_sdk

defaultConfig {
minSdkVersion Versions.android_min_sdk
Expand All @@ -26,8 +26,8 @@ android {
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

namespace 'org.odk.collect.analytics'
Expand Down
6 changes: 3 additions & 3 deletions androidshared/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ plugins {
apply from: '../config/quality.gradle'

android {
compileSdkVersion Versions.android_compile_sdk
compileSdk Versions.android_compile_sdk

buildFeatures {
viewBinding true
Expand All @@ -32,8 +32,8 @@ android {

compileOptions {
coreLibraryDesugaringEnabled true
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

testOptions {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ class ColorPickerDialog : DialogFragment() {

return MaterialAlertDialogBuilder(requireContext())
.setView(binding.root)
.setTitle(R.string.project_color)
.setNegativeButton(R.string.cancel) { _, _ -> dismiss() }
.setPositiveButton(R.string.ok) { _, _ -> model.pickColor("#${binding.hexColor.text}") }
.setTitle(org.odk.collect.strings.R.string.project_color)
.setNegativeButton(org.odk.collect.strings.R.string.cancel) { _, _ -> dismiss() }
.setPositiveButton(org.odk.collect.strings.R.string.ok) { _, _ -> model.pickColor("#${binding.hexColor.text}") }
.create()
}

Expand Down Expand Up @@ -80,7 +80,7 @@ class ColorPickerDialog : DialogFragment() {
it.getButton(AlertDialog.BUTTON_POSITIVE).isEnabled = true
}
} catch (e: Exception) {
binding.hexColor.error = getString(R.string.invalid_hex_code)
binding.hexColor.error = getString(org.odk.collect.strings.R.string.invalid_hex_code)
(dialog as? AlertDialog)?.also {
it.getButton(AlertDialog.BUTTON_POSITIVE).alpha = 0.3f
it.getButton(AlertDialog.BUTTON_POSITIVE).isEnabled = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package org.odk.collect.androidshared.ui

import android.widget.Button
import androidx.lifecycle.ViewModel
import org.odk.collect.androidshared.R
import org.odk.collect.androidshared.livedata.MutableNonNullLiveData
import org.odk.collect.androidshared.livedata.NonNullLiveData

Expand Down Expand Up @@ -39,9 +38,9 @@ fun updateSelectAll(button: Button, itemCount: Int, selectedCount: Int): Boolean
val allSelected = itemCount > 0 && selectedCount == itemCount

if (allSelected) {
button.setText(R.string.clear_all)
button.setText(org.odk.collect.strings.R.string.clear_all)
} else {
button.setText(R.string.select_all)
button.setText(org.odk.collect.strings.R.string.select_all)
}

return allSelected
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import android.widget.ImageView
import android.widget.LinearLayout
import android.widget.TextView
import com.google.android.material.snackbar.Snackbar
import org.odk.collect.androidshared.R

/**
* Convenience wrapper around Android's [Snackbar] API.
Expand Down Expand Up @@ -71,21 +70,21 @@ object SnackbarUtils {
}

Snackbar.make(parentView, message.trim(), duration).apply {
val textView = view.findViewById<TextView>(R.id.snackbar_text)
val textView = view.findViewById<TextView>(com.google.android.material.R.id.snackbar_text)
textView.isSingleLine = false

if (anchorView?.visibility != View.GONE) {
this.anchorView = anchorView
}

if (displayDismissButton) {
view.findViewById<Button>(R.id.snackbar_action).let {
view.findViewById<Button>(com.google.android.material.R.id.snackbar_action).let {
val dismissButton = ImageView(view.context).apply {
setImageResource(R.drawable.ic_close_24)
setImageResource(org.odk.collect.androidshared.R.drawable.ic_close_24)
setOnClickListener {
dismiss()
}
contentDescription = context.getString(R.string.close_snackbar)
contentDescription = context.getString(org.odk.collect.strings.R.string.close_snackbar)
}

val params = LinearLayout.LayoutParams(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import android.view.ViewGroup
import android.widget.TextView
import android.widget.Toast
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import org.odk.collect.androidshared.R
import org.odk.collect.strings.localization.getLocalizedString

/**
Expand Down Expand Up @@ -103,7 +102,7 @@ object ToastUtils {
} else {
MaterialAlertDialogBuilder(activity)
.setMessage(message)
.setPositiveButton(R.string.ok, null)
.setPositiveButton(org.odk.collect.strings.R.string.ok, null)
.create()
.show()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@ package org.odk.collect.androidshared.utils
import android.app.Activity
import androidx.appcompat.app.AppCompatActivity
import androidx.appcompat.widget.Toolbar
import org.odk.collect.androidshared.R

object AppBarUtils {

@JvmStatic
fun setupAppBarLayout(activity: Activity, title: CharSequence) {
val toolbar = activity.findViewById<Toolbar>(R.id.toolbar)
val toolbar = activity.findViewById<Toolbar>(org.odk.collect.androidshared.R.id.toolbar)
if (toolbar != null && activity is AppCompatActivity) {
toolbar.title = title
activity.setSupportActionBar(toolbar)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
import org.odk.collect.androidshared.ColorPickerDialog
import org.odk.collect.androidshared.R
import org.odk.collect.fragmentstest.FragmentScenarioLauncherRule
import org.odk.collect.testshared.RobolectricHelpers

Expand All @@ -31,7 +30,7 @@ class ColorPickerDialogTest {

@get:Rule
val launcherRule =
FragmentScenarioLauncherRule(defaultThemeResId = R.style.Theme_MaterialComponents)
FragmentScenarioLauncherRule(defaultThemeResId = com.google.android.material.R.style.Theme_MaterialComponents)

@Test
fun `The dialog should be dismissed after clicking on a device back button`() {
Expand Down
6 changes: 3 additions & 3 deletions androidtest/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ apply plugin: 'kotlin-android'
apply from: '../config/quality.gradle'

android {
compileSdkVersion Versions.android_compile_sdk
compileSdk Versions.android_compile_sdk

defaultConfig {
minSdkVersion Versions.android_min_sdk
Expand All @@ -19,8 +19,8 @@ android {

compileOptions {
coreLibraryDesugaringEnabled true
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

buildTypes {
Expand Down
6 changes: 3 additions & 3 deletions async/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ apply plugin: 'kotlin-android'
apply from: '../config/quality.gradle'

android {
compileSdkVersion Versions.android_compile_sdk
compileSdk Versions.android_compile_sdk

defaultConfig {
minSdkVersion Versions.android_min_sdk
Expand All @@ -26,8 +26,8 @@ android {

compileOptions {
coreLibraryDesugaringEnabled true
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

namespace 'org.odk.collect.async'
Expand Down
6 changes: 3 additions & 3 deletions audioclips/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ apply plugin: 'kotlin-android'
apply from: '../config/quality.gradle'

android {
compileSdkVersion Versions.android_compile_sdk
compileSdk Versions.android_compile_sdk

defaultConfig {
minSdkVersion Versions.android_min_sdk
Expand All @@ -19,8 +19,8 @@ android {

compileOptions {
coreLibraryDesugaringEnabled true
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

buildTypes {
Expand Down
6 changes: 3 additions & 3 deletions audiorecorder/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ apply plugin: 'kotlin-kapt'
apply from: '../config/quality.gradle'

android {
compileSdkVersion Versions.android_compile_sdk
compileSdk Versions.android_compile_sdk

defaultConfig {
minSdkVersion Versions.android_min_sdk
Expand All @@ -24,8 +24,8 @@ android {
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

testOptions {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ internal class RecordingForegroundServiceNotification(private val service: Servi

private val notificationIntent = Intent(service, ReturnToAppActivity::class.java)
private val notificationBuilder = NotificationCompat.Builder(service, NOTIFICATION_CHANNEL)
.setContentTitle(service.getLocalizedString(R.string.recording))
.setContentTitle(service.getLocalizedString(org.odk.collect.strings.R.string.recording))
.setContentText(formatLength(0))
.setSmallIcon(R.drawable.ic_notification_small)
.setSmallIcon(org.odk.collect.icons.R.drawable.ic_notification_small)
.setContentIntent(PendingIntent.getActivity(service, 0, notificationIntent, PendingIntent.FLAG_IMMUTABLE))
.setPriority(NotificationCompat.PRIORITY_LOW)

Expand Down Expand Up @@ -52,7 +52,7 @@ internal class RecordingForegroundServiceNotification(private val service: Servi
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
val notificationChannel = NotificationChannel(
NOTIFICATION_CHANNEL,
service.getLocalizedString(R.string.recording_channel),
service.getLocalizedString(org.odk.collect.strings.R.string.recording_channel),
NotificationManager.IMPORTANCE_LOW
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class AudioRecorderServiceTest {
assertThat(notification, not(nullValue()))
assertThat(
shadowOf(notification).contentTitle,
equalTo(application.getString(R.string.recording))
equalTo(application.getString(org.odk.collect.strings.R.string.recording))
)
assertThat(
shadowOf(notification.contentIntent).savedIntent.component?.className,
Expand Down
14 changes: 7 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:7.4.2'
classpath 'com.android.tools.build:gradle:8.0.2'
classpath 'com.google.gms:google-services:4.3.15'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.4'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.10"
classpath "org.jlleitschuh.gradle:ktlint-gradle:11.3.1"
classpath "com.github.ben-manes:gradle-versions-plugin:0.46.0"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.5.3"
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.6'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.22"
classpath "org.jlleitschuh.gradle:ktlint-gradle:11.4.2"
classpath "com.github.ben-manes:gradle-versions-plugin:0.47.0"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.6.0"
classpath "com.google.android.gms:oss-licenses-plugin:0.10.6"
}
}
Expand Down Expand Up @@ -64,7 +64,7 @@ allprojects {
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
freeCompilerArgs = ['-Xjvm-default=all']
jvmTarget = '1.8'
jvmTarget = '17'
}
}
}
Expand Down
Loading

0 comments on commit 2ff4e28

Please sign in to comment.