Skip to content

Instantly share code, notes, and snippets.

@nisrulz
Created February 21, 2022 22:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nisrulz/b07b6f2442d19a01d4f8a11cfb51c9c0 to your computer and use it in GitHub Desktop.
Save nisrulz/b07b6f2442d19a01d4f8a11cfb51c9c0 to your computer and use it in GitHub Desktop.
Find the files where you are using Kotlin Synthetics

Find the files where you are using Kotlin Synthetics

Run this command at the root of your project

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

❯ 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

grep -rwl . -e 'kotlinx.android.synthetic' | wc -l

Output

❯ grep -rwl . -e 'kotlinx.android.synthetic' | wc -l
       1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment