From c7d95884129eae70627f6fab075e9e25aa132b3a Mon Sep 17 00:00:00 2001 From: Igor Escodro Date: Tue, 1 Aug 2023 15:14:41 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A8=20Fix=20build=20warnings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix the `packagingOptions` and `textFieldColors` deprecations --- app/build.gradle.kts | 2 +- .../task/presentation/detail/main/TaskDetail.kt | 12 ++++++++---- features/tracker/build.gradle.kts | 2 +- libraries/test/build.gradle.kts | 2 +- plugins/src/main/java/extension/CommonExtension.kt | 2 +- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 9fda67ab1..611b5ef68 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -67,7 +67,7 @@ android { kotlinCompilerExtensionVersion = libs.versions.compose.compiler.get() } - packagingOptions { + packaging { resources.excludes.apply { add("META-INF/AL2.0") add("META-INF/LGPL2.1") diff --git a/features/task/src/main/java/com/escodro/task/presentation/detail/main/TaskDetail.kt b/features/task/src/main/java/com/escodro/task/presentation/detail/main/TaskDetail.kt index bff1f92ea..abcfc9eef 100644 --- a/features/task/src/main/java/com/escodro/task/presentation/detail/main/TaskDetail.kt +++ b/features/task/src/main/java/com/escodro/task/presentation/detail/main/TaskDetail.kt @@ -177,8 +177,10 @@ private fun TaskTitleTextField(text: String, onTitleChange: (String) -> Unit) { textState.value = it }, textStyle = MaterialTheme.typography.headlineMedium, - colors = TextFieldDefaults.textFieldColors( - containerColor = MaterialTheme.colorScheme.surface, + colors = TextFieldDefaults.colors( + focusedContainerColor = MaterialTheme.colorScheme.surface, + unfocusedContainerColor = MaterialTheme.colorScheme.surface, + disabledContainerColor = MaterialTheme.colorScheme.surface, ), ) } @@ -202,8 +204,10 @@ private fun TaskDescriptionTextField(text: String?, onDescriptionChange: (String textState.value = it }, textStyle = MaterialTheme.typography.bodyLarge, - colors = TextFieldDefaults.textFieldColors( - containerColor = MaterialTheme.colorScheme.surface, + colors = TextFieldDefaults.colors( + focusedContainerColor = MaterialTheme.colorScheme.surface, + unfocusedContainerColor = MaterialTheme.colorScheme.surface, + disabledContainerColor = MaterialTheme.colorScheme.surface, ), ) } diff --git a/features/tracker/build.gradle.kts b/features/tracker/build.gradle.kts index ef04fcce0..94e8aac30 100644 --- a/features/tracker/build.gradle.kts +++ b/features/tracker/build.gradle.kts @@ -11,7 +11,7 @@ android { kotlinCompilerExtensionVersion = libs.versions.compose.compiler.get() } - packagingOptions { + packaging { resources.excludes.apply { add("META-INF/AL2.0") add("META-INF/LGPL2.1") diff --git a/libraries/test/build.gradle.kts b/libraries/test/build.gradle.kts index 13c677c36..a6a1676e6 100644 --- a/libraries/test/build.gradle.kts +++ b/libraries/test/build.gradle.kts @@ -3,7 +3,7 @@ plugins { } android { - packagingOptions { + packaging { resources.excludes.apply { add("META-INF/AL2.0") add("META-INF/LGPL2.1") diff --git a/plugins/src/main/java/extension/CommonExtension.kt b/plugins/src/main/java/extension/CommonExtension.kt index fbed8d583..96dc4174e 100644 --- a/plugins/src/main/java/extension/CommonExtension.kt +++ b/plugins/src/main/java/extension/CommonExtension.kt @@ -27,7 +27,7 @@ fun CommonExtension<*, *, *, *>.composeConfig(libs: VersionCatalog) { kotlinCompilerExtensionVersion = libs.composeVersion } - packagingOptions { + packaging { resources.excludes.apply { add("META-INF/AL2.0") add("META-INF/LGPL2.1")