Instantly share code, notes, and snippets.

Andreas M. AndiMiko

  • San Francisco
View GitHub Profile
@AndiMiko
AndiMiko / migrateAndroidX.py
Created Feb 8, 2019
Replaces the pairs in androidx-class-mapping.csv (get it here: https://developer.android.com/jetpack/androidx/migrate) to migrate Android support to AndroidX
View migrateAndroidX.py
import glob
import csv
dictCSV = "C:/path/to/androidx-class-mapping.csv"
projectPath = "C:/path/to/project/src/"
def replace_all(text, dic):
for i, j in dic.items():
text = text.replace(i, j)
return text