Skip to content

Commit ab80e71

Browse files
reidbakermboetger
authored andcommitted
Android gradle use lowercase instead of toLowerCase in preparation for removal in v9 (flutter#171397)
partial resolution for flutter#170791 (lowercase but not filemode) This is the first time I have used the experimental api annotation. Most users should have lowercase available without the annotation only the oldest kotlin/agp versions should need the annotation. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing.
1 parent 49fbc81 commit ab80e71

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

packages/flutter_tools/gradle/src/main/kotlin/FlutterPluginUtils.kt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,8 @@ object FlutterPluginUtils {
5858
@Suppress("DEPRECATION")
5959
internal fun capitalize(string: String): String = string.capitalize()
6060

61-
// Kotlin's toLowerCase function is deprecated, but the suggested replacement is not supported
62-
// by the minimum version of Kotlin that we support. Centralize the use to one place, so that
63-
// when our minimum version does support the replacement we can replace by changing a single
64-
// line.
65-
@Suppress("DEPRECATION")
66-
internal fun lowercase(string: String): String = string.toLowerCase()
61+
@OptIn(ExperimentalStdlibApi::class)
62+
internal fun lowercase(string: String): String = string.lowercase()
6763

6864
// compareTo implementation of version strings in the format of ints and periods
6965
// Will not crash on RC candidate strings but considers all RC candidates the same version.

0 commit comments

Comments
 (0)