Skip to content

Commit

Permalink
rever api key change
Browse files Browse the repository at this point in the history
  • Loading branch information
juliocbcotta committed Jun 29, 2016
1 parent e7fd864 commit dcf3158
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
1 change: 0 additions & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ xmlns:android="http://schemas.android.com/apk/res/android">
</config-file>
<config-file parent="/*" target="res/values/strings.xml">
<string name="google_app_id">@string/google_app_id</string>
<string name="google_api_key">@string/google_api_key</string>
</config-file>
<config-file parent="/*" target="AndroidManifest.xml">
<service android:name=".FirebasePluginMessagingService">
Expand Down
10 changes: 0 additions & 10 deletions scripts/after_prepare.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,6 @@ try {
// replace the default value
strings = strings.replace(new RegExp('<string name="google_app_id">([^<]+?)</string>', "i"), '<string name="google_app_id">' + json.client[0].client_info.mobilesdk_app_id + '</string>')


// strip non-default value
strings = strings.replace(new RegExp('<string name="google_api_key">([^@<]+?)</string>', "i"), '')

// strip empty lines
strings = strings.replace(new RegExp('(\r\n|\n|\r)[ \t]*(\r\n|\n|\r)', "gm"), '$1')

// replace the default value
strings = strings.replace(new RegExp('<string name="google_api_key">([^<]+?)</string>', "i"), '<string name="google_app_id">' + json.client[0].api_key.current_key + '</string>')

fs.writeFileSync("platforms/android/res/values/strings.xml", strings);
} catch(err) {
process.stdout.write(err);
Expand Down

0 comments on commit dcf3158

Please sign in to comment.