Permalink
Browse files

Updating generation code. Closes #9

  • Loading branch information...
1 parent 2c4b5de commit d2a1030cedbbe45ca8087fe2214c79b93735f631 @donnfelker donnfelker committed Jan 14, 2013
Showing with 9 additions and 1 deletion.
  1. +9 −1 routes/generate.js
View
@@ -197,7 +197,8 @@ function generateFile(file, packageName, appName, callback) {
data = replacePackageName(data, packageName);
data = replaceAuthToken(data, packageName);
data = replaceAppName(data, appName);
- data = replaceHyphenatedNames(data, packageName)
+ data = replaceHyphenatedNames(data, packageName);
+ data = replaceProguardValues(data, packageName);
// Finally all done doing replacing, save this bad mother.
fs.writeFileSync(file, data);
@@ -252,3 +253,10 @@ function replaceHyphenatedNames(fileContents, newPackageName) {
return fileContents.replace(hyphenatedRegExp, newHyphenatedName);
}
+
+function replaceProguardValues(fileContents, newPackageName) {
+ var newValue = newPackageName + '.';
+ var valueToFind = new RegExp("com.donnfelker.android.", 'g');
+
+ return fileContents.replace(valueToFind, newValue);
+}

0 comments on commit d2a1030

Please sign in to comment.