Skip to content
This repository has been archived by the owner on Sep 10, 2020. It is now read-only.

Commit

Permalink
Extract and change analytics key. Not sure if secret.
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeWharton committed Jan 9, 2015
1 parent 235dcfc commit 727ac1d
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 6 deletions.
13 changes: 13 additions & 0 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
Release Process
===============

Setup
-----

Place the following in `~/.gradle/gradle.properties`:
```
TELECINE_BUGSNAG_KEY=<key>
TELECINE_ANALYTICS_KEY=<key>
```


Release
-------

1. Update the `telecine/build.gradle` versions to whatever you feel conveys the sheer awesomeness
of the update to which you are about to bestow on the masses.

Expand Down
4 changes: 4 additions & 0 deletions telecine/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ buildscript {
def getBugsnagKey() {
return hasProperty('TELECINE_BUGSNAG_KEY') ? TELECINE_BUGSNAG_KEY : ''
}
def getAnalyticsKey() {
return hasProperty('TELECINE_ANALYTICS_KEY') ? TELECINE_ANALYTICS_KEY : ''
}

apply plugin: 'com.android.application'
apply plugin: 'com.neenbedankt.android-apt'
Expand All @@ -32,6 +35,7 @@ android {
versionName "${versionMajor}.${versionMinor}.${versionPatch}"

buildConfigField "String", "BUGSNAG_KEY", "\"${getBugsnagKey()}\""
buildConfigField "String", "ANALYTICS_KEY", "\"${getAnalyticsKey()}\""

// Resource language filters
resConfigs "en"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ final class TelecineModule {

@Provides @Singleton Tracker provideAnalyticsTracker() {
GoogleAnalytics googleAnalytics = GoogleAnalytics.getInstance(app);
return googleAnalytics.newTracker(R.xml.analytics_tracker);
Tracker tracker = googleAnalytics.newTracker(BuildConfig.ANALYTICS_KEY);
tracker.setSessionTimeout(300); // ms? s? better be s.
return tracker;
}

@Provides @Singleton SharedPreferences provideSharedPreferences() {
Expand Down
5 changes: 0 additions & 5 deletions telecine/src/main/res/xml/analytics_tracker.xml

This file was deleted.

4 comments on commit 727ac1d

@kevinpelgrims
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You do realize that this is still here, right?
If you want it to disappear completely, you can follow the steps here: https://help.github.com/articles/remove-sensitive-data/

@JakeWharton
Copy link
Owner Author

@JakeWharton JakeWharton commented on 727ac1d Jan 11, 2015 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kevinpelgrims
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, cool. Just wanted to make sure your key was not out in the open :)

@JakeWharton
Copy link
Owner Author

@JakeWharton JakeWharton commented on 727ac1d Jan 11, 2015 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.