Skip to content

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.

0 comments on commit 727ac1d

Please sign in to comment.