Fix withAnalytics build issues

This commit is contained in:
Moez Bhatti
2018-06-20 17:39:52 -04:00
parent 53e8c01d88
commit aee60a5cae
5 changed files with 13 additions and 11 deletions
+4
View File
@@ -10,6 +10,9 @@ android {
defaultConfig { defaultConfig {
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 28 targetSdkVersion 28
buildConfigField "String", "AMPLITUDE_API_KEY", "\"${System.getenv("AMPLITUDE_API_KEY")}\""
buildConfigField "String", "MIXPANEL_API_KEY", "\"${System.getenv("MIXPANEL_API_KEY")}\""
} }
productFlavors { productFlavors {
@@ -27,6 +30,7 @@ dependencies {
// dagger // dagger
implementation "com.google.dagger:dagger:$dagger_version" implementation "com.google.dagger:dagger:$dagger_version"
implementation "com.google.dagger:dagger-android-support:$dagger_version" implementation "com.google.dagger:dagger-android-support:$dagger_version"
kapt "com.google.dagger:dagger-android-processor:$dagger_version"
kapt "com.google.dagger:dagger-compiler:$dagger_version" kapt "com.google.dagger:dagger-compiler:$dagger_version"
compileOnly "javax.annotation:jsr250-api:1.0" compileOnly "javax.annotation:jsr250-api:1.0"
@@ -16,9 +16,8 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.common.util package com.moez.QKSMS.manager
import com.moez.QKSMS.manager.AnalyticsManager
import javax.inject.Inject import javax.inject.Inject
import javax.inject.Singleton import javax.inject.Singleton
@@ -16,15 +16,14 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.moez.QKSMS.common.util package com.moez.QKSMS.manager
import android.content.Context import android.content.Context
import com.amplitude.api.Amplitude import com.amplitude.api.Amplitude
import com.amplitude.api.AmplitudeClient import com.amplitude.api.AmplitudeClient
import com.amplitude.api.Identify import com.amplitude.api.Identify
import com.mixpanel.android.mpmetrics.MixpanelAPI import com.mixpanel.android.mpmetrics.MixpanelAPI
import com.moez.QKSMS.BuildConfig import com.moez.QKSMS.data.BuildConfig
import com.moez.QKSMS.manager.AnalyticsManager
import org.json.JSONArray import org.json.JSONArray
import org.json.JSONObject import org.json.JSONObject
import timber.log.Timber import timber.log.Timber
@@ -48,9 +47,9 @@ class AnalyticsManagerImpl @Inject constructor(context: Context) : AnalyticsMana
amplitude.logEvent(event, propertiesJson) amplitude.logEvent(event, propertiesJson)
synchronized(mixpanel, { synchronized(mixpanel) {
mixpanel.track(event, propertiesJson) mixpanel.track(event, propertiesJson)
}) }
} }
override fun setUserProperty(key: String, value: Any) { override fun setUserProperty(key: String, value: Any) {
+3 -3
View File
@@ -17,9 +17,7 @@ android {
versionName "3.3.3" versionName "3.3.3"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
buildConfigField "String", "AMPLITUDE_API_KEY", "\"${System.getenv("AMPLITUDE_API_KEY")}\""
buildConfigField "String", "BUGSNAG_API_KEY", "\"${System.getenv("BUGSNAG_API_KEY")}\"" buildConfigField "String", "BUGSNAG_API_KEY", "\"${System.getenv("BUGSNAG_API_KEY")}\""
buildConfigField "String", "MIXPANEL_API_KEY", "\"${System.getenv("MIXPANEL_API_KEY")}\""
} }
signingConfigs { signingConfigs {
@@ -101,7 +99,9 @@ dependencies {
// exoplayer // exoplayer
implementation "com.google.android.exoplayer:exoplayer-core:$exoplayer_version" implementation "com.google.android.exoplayer:exoplayer-core:$exoplayer_version"
implementation "com.google.android.exoplayer:exoplayer-ui:$exoplayer_version" implementation("com.google.android.exoplayer:exoplayer-ui:$exoplayer_version", {
exclude group: "com.android.support", module: "support-media-compat"
})
// rxbinding // rxbinding
implementation "com.jakewharton.rxbinding2:rxbinding-kotlin:$rxbinding_version" implementation "com.jakewharton.rxbinding2:rxbinding-kotlin:$rxbinding_version"
@@ -25,9 +25,9 @@ import android.content.Context
import android.preference.PreferenceManager import android.preference.PreferenceManager
import com.f2prateek.rx.preferences2.RxSharedPreferences import com.f2prateek.rx.preferences2.RxSharedPreferences
import com.moez.QKSMS.common.ViewModelFactory import com.moez.QKSMS.common.ViewModelFactory
import com.moez.QKSMS.common.util.AnalyticsManagerImpl
import com.moez.QKSMS.common.util.NotificationManagerImpl import com.moez.QKSMS.common.util.NotificationManagerImpl
import com.moez.QKSMS.manager.AnalyticsManager import com.moez.QKSMS.manager.AnalyticsManager
import com.moez.QKSMS.manager.AnalyticsManagerImpl
import com.moez.QKSMS.manager.ExternalBlockingManager import com.moez.QKSMS.manager.ExternalBlockingManager
import com.moez.QKSMS.manager.ExternalBlockingManagerImpl import com.moez.QKSMS.manager.ExternalBlockingManagerImpl
import com.moez.QKSMS.manager.KeyManager import com.moez.QKSMS.manager.KeyManager