Created
February 21, 2022 22:57
-
-
Save nisrulz/b07b6f2442d19a01d4f8a11cfb51c9c0 to your computer and use it in GitHub Desktop.
Revisions
-
nisrulz created this gist
Feb 21, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,32 @@ # [Kotlin Synthetics for View is deprecated](https://android-developers.googleblog.com/2022/02/discontinuing-kotlin-synthetics-for-views.html) ## Find the files where you are using Kotlin Synthetics Run this command at the root of your project ```sh grep -rwl . -e 'kotlinx.android.synthetic' ``` - -r = Recursive - -w = Match the whole word - -l = Output the file name of matching files - -e = Match pattern used during the search ## Output ```sh ❯ grep -rwl . -e 'kotlinx.android.synthetic' ./UsingKotlin/app/src/main/java/nisrulz/github/sample/usingkotlin/MainActivity. ``` ## Find the number of files where Kotlin Synthetics are being used ```sh grep -rwl . -e 'kotlinx.android.synthetic' | wc -l ``` ## Output ```sh ❯ grep -rwl . -e 'kotlinx.android.synthetic' | wc -l 1 ```