From feb3764cf5cbd404f05b520cbda7d8eac3b5fe9e Mon Sep 17 00:00:00 2001 From: Evgenii Kozlov Date: Tue, 21 Mar 2023 19:08:33 +0100 Subject: [PATCH] DROID-1096 Analytics | Tech | Enable analytics for debug nightly builds (#3031) --- Makefile | 9 ++++++--- analytics/build.gradle | 12 ------------ 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index b37514d655..7237f654e0 100644 --- a/Makefile +++ b/Makefile @@ -10,10 +10,13 @@ enable_dated_version_name: distribute_debug: ./gradlew bundleDebug appDistributionUploadDebug -enable_analytics_for_debug: - ./gradlew :analytics:enableAnalyticsForDebugBuilds - pr_check: compile_android_test_sources test_debug_all setup_local_mw: ./gradlew libs:publishToMavenLocal + +enable_analytics_for_debug: + sed -i -e 's/config.enableAnalyticsForDebugBuilds=false/config.enableAnalyticsForDebugBuilds=true/g' analytics/gradle.properties + +disable_analytics_for_debug: + sed -i -e 's/config.enableAnalyticsForDebugBuilds=true/config.enableAnalyticsForDebugBuilds=false/g' analytics/gradle.properties diff --git a/analytics/build.gradle b/analytics/build.gradle index 05bf84773a..ad429c1dfa 100644 --- a/analytics/build.gradle +++ b/analytics/build.gradle @@ -20,16 +20,4 @@ dependencies { implementation libs.coroutinesAndroid implementation libs.timber implementation libs.amplitude -} - -tasks.register("enableAnalyticsForDebugBuilds") { - doLast { - enableAnalyticsForDebugBuilds() - } -} - -def enableAnalyticsForDebugBuilds() { - def file = file('gradle.properties') - def content = "config.enableAnalyticsForDebugBuilds=true" - file.text = content.toString() } \ No newline at end of file