1
0
Fork 0
mirror of https://github.com/anyproto/anytype-kotlin.git synced 2025-06-07 21:37:02 +09:00

DROID-301 CI | Enhancement | Enable debug channel analytics for debug nightly builds (#2506)

This commit is contained in:
Evgenii Kozlov 2022-08-12 17:07:04 +03:00 committed by GitHub
parent dd3dce56c0
commit 0f76e634dd
Signed by: github
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 22 additions and 2 deletions

View file

@ -16,9 +16,12 @@ jobs:
amplitude_secret_debug: ${{ secrets.ANYTYPE_AMPLITUDE_DEBUG_SECRET }}
run: ./middleware2.sh $token_secret $user_secret $amplitude_secret $amplitude_secret_debug
- name: Enable dated version for night distribution build
- name: Enable dated version for nightly debug builds
run: make enable_dated_version_name
- name: Enable analytics for nightly debug builds
run: make enable_analytics_for_debug
- name: Decrypt secrets
run: ./scripts/distribution/decrypt-secrets.sh
env:

1
.gitignore vendored
View file

@ -10,6 +10,7 @@
/apikeys.properties
/scripts/release/app-release.jks
/scripts/distribution/anytype-debug-service-account-key.json
/analytics/gradle.properties
.DS_Store
**/build
/libs

View file

@ -10,5 +10,8 @@ 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

View file

@ -20,7 +20,7 @@ android {
buildConfigField "boolean", "SEND_EVENTS", "true"
}
debug {
buildConfigField "boolean", "SEND_EVENTS", "false"
buildConfigField "boolean", "SEND_EVENTS", getProperty('config.enableAnalyticsForDebugBuilds')
}
}
@ -42,3 +42,15 @@ dependencies {
implementation app.timber
implementation analytics.amplitude
}
tasks.register("enableAnalyticsForDebugBuilds") {
doLast {
enableAnalyticsForDebugBuilds()
}
}
def enableAnalyticsForDebugBuilds() {
def file = file('gradle.properties')
def content = "config.enableAnalyticsForDebugBuilds=true"
file.text = content.toString()
}

View file

@ -0,0 +1 @@
config.enableAnalyticsForDebugBuilds=false