Created
January 11, 2016 05:48
-
-
Save bitristan/4a56963f740f0c2234a7 to your computer and use it in GitHub Desktop.
Replace str in file with groovy.
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 characters
import groovy.io.FileType | |
def source = "import android.support.wearable" | |
def dest = "import ticwear.support.wearable" | |
def dir = new File("res") | |
dir.eachFileRecurse (FileType.FILES) { f -> | |
def fileText = f.text | |
fileText = (fileText =~ /${source}/).replaceAll(dest) | |
f.write(fileText) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment