Change 'include-analytics' to 'include-telemetry' (mihonapp/mihon#1874)
(cherry picked from commit 093e8e5c5afe970d5aa2f1c237d43ac7936256b2)
This commit is contained in:
parent
5aaba932ec
commit
0df53a5125
10 changed files with 18 additions and 18 deletions
4
.github/workflows/build_preview.yml
vendored
4
.github/workflows/build_preview.yml
vendored
|
|
@ -151,7 +151,7 @@ jobs:
|
||||||
run: ./gradlew spotlessCheck
|
run: ./gradlew spotlessCheck
|
||||||
|
|
||||||
- name: Build app
|
- name: Build app
|
||||||
run: ./gradlew assemblePreview -Pinclude-analytics -Penable-updater
|
run: ./gradlew assemblePreview -Pinclude-telemetry -Penable-updater
|
||||||
|
|
||||||
- name: Run unit tests
|
- name: Run unit tests
|
||||||
run: ./gradlew testReleaseUnitTest
|
run: ./gradlew testReleaseUnitTest
|
||||||
|
|
@ -183,7 +183,7 @@ jobs:
|
||||||
keyPassword: ${{ secrets.KEY_PASSWORD }}
|
keyPassword: ${{ secrets.KEY_PASSWORD }}
|
||||||
env:
|
env:
|
||||||
BUILD_TOOLS_VERSION: '35.0.1'
|
BUILD_TOOLS_VERSION: '35.0.1'
|
||||||
|
|
||||||
- name: Get SHA & clean up build artifacts
|
- name: Get SHA & clean up build artifacts
|
||||||
id: get_sha
|
id: get_sha
|
||||||
run: |
|
run: |
|
||||||
|
|
|
||||||
2
.github/workflows/build_push.yml
vendored
2
.github/workflows/build_push.yml
vendored
|
|
@ -68,7 +68,7 @@ jobs:
|
||||||
run: ./gradlew spotlessCheck
|
run: ./gradlew spotlessCheck
|
||||||
|
|
||||||
- name: Build app
|
- name: Build app
|
||||||
run: ./gradlew assembleRelease -Pinclude-analytics -Penable-updater
|
run: ./gradlew assembleRelease -Pinclude-telemetry -Penable-updater
|
||||||
|
|
||||||
- name: Run unit tests
|
- name: Run unit tests
|
||||||
run: ./gradlew testReleaseUnitTest
|
run: ./gradlew testReleaseUnitTest
|
||||||
|
|
|
||||||
2
.github/workflows/build_release.yml
vendored
2
.github/workflows/build_release.yml
vendored
|
|
@ -124,7 +124,7 @@ jobs:
|
||||||
run: ./gradlew spotlessCheck
|
run: ./gradlew spotlessCheck
|
||||||
|
|
||||||
- name: Build app
|
- name: Build app
|
||||||
run: ./gradlew assembleRelease -Pinclude-analytics -Penable-updater
|
run: ./gradlew assembleRelease -Pinclude-telemetry -Penable-updater
|
||||||
|
|
||||||
- name: Run unit tests
|
- name: Run unit tests
|
||||||
run: ./gradlew testReleaseUnitTest
|
run: ./gradlew testReleaseUnitTest
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ plugins {
|
||||||
id("com.github.ben-manes.versions")
|
id("com.github.ben-manes.versions")
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Config.includeAnalytics) {
|
if (Config.includeTelemetry) {
|
||||||
pluginManager.apply {
|
pluginManager.apply {
|
||||||
apply(libs.plugins.google.services.get().pluginId)
|
apply(libs.plugins.google.services.get().pluginId)
|
||||||
apply(libs.plugins.firebase.crashlytics.get().pluginId)
|
apply(libs.plugins.firebase.crashlytics.get().pluginId)
|
||||||
|
|
@ -31,7 +31,7 @@ android {
|
||||||
buildConfigField("String", "COMMIT_COUNT", "\"${getCommitCount()}\"")
|
buildConfigField("String", "COMMIT_COUNT", "\"${getCommitCount()}\"")
|
||||||
buildConfigField("String", "COMMIT_SHA", "\"${getGitSha()}\"")
|
buildConfigField("String", "COMMIT_SHA", "\"${getGitSha()}\"")
|
||||||
buildConfigField("String", "BUILD_TIME", "\"${getBuildTime()}\"")
|
buildConfigField("String", "BUILD_TIME", "\"${getBuildTime()}\"")
|
||||||
buildConfigField("boolean", "ANALYTICS_INCLUDED", "${Config.includeAnalytics}")
|
buildConfigField("boolean", "TELEMETRY_INCLUDED", "${Config.includeTelemetry}")
|
||||||
buildConfigField("boolean", "UPDATER_ENABLED", "${Config.enableUpdater}")
|
buildConfigField("boolean", "UPDATER_ENABLED", "${Config.enableUpdater}")
|
||||||
|
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
|
|
||||||
|
|
@ -37,8 +37,8 @@ import androidx.lifecycle.LifecycleOwner
|
||||||
import androidx.lifecycle.compose.LocalLifecycleOwner
|
import androidx.lifecycle.compose.LocalLifecycleOwner
|
||||||
import eu.kanade.presentation.util.rememberRequestPackageInstallsPermissionState
|
import eu.kanade.presentation.util.rememberRequestPackageInstallsPermissionState
|
||||||
import eu.kanade.tachiyomi.core.security.PrivacyPreferences
|
import eu.kanade.tachiyomi.core.security.PrivacyPreferences
|
||||||
import eu.kanade.tachiyomi.util.system.analyticsIncluded
|
|
||||||
import eu.kanade.tachiyomi.util.system.launchRequestPackageInstallsPermission
|
import eu.kanade.tachiyomi.util.system.launchRequestPackageInstallsPermission
|
||||||
|
import eu.kanade.tachiyomi.util.system.telemetryIncluded
|
||||||
import tachiyomi.i18n.MR
|
import tachiyomi.i18n.MR
|
||||||
import tachiyomi.i18n.kmk.KMR
|
import tachiyomi.i18n.kmk.KMR
|
||||||
import tachiyomi.presentation.core.i18n.stringResource
|
import tachiyomi.presentation.core.i18n.stringResource
|
||||||
|
|
@ -178,7 +178,7 @@ internal class PermissionStep : OnboardingStep {
|
||||||
}
|
}
|
||||||
// KMK <--
|
// KMK <--
|
||||||
|
|
||||||
if (!analyticsIncluded) return@Column
|
if (!telemetryIncluded) return@Column
|
||||||
|
|
||||||
HorizontalDivider(
|
HorizontalDivider(
|
||||||
modifier = Modifier.padding(vertical = 8.dp, horizontal = 16.dp),
|
modifier = Modifier.padding(vertical = 8.dp, horizontal = 16.dp),
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ import eu.kanade.tachiyomi.ui.base.delegate.SecureActivityDelegate
|
||||||
import eu.kanade.tachiyomi.ui.category.biometric.BiometricTimesScreen
|
import eu.kanade.tachiyomi.ui.category.biometric.BiometricTimesScreen
|
||||||
import eu.kanade.tachiyomi.util.system.AuthenticatorUtil.authenticate
|
import eu.kanade.tachiyomi.util.system.AuthenticatorUtil.authenticate
|
||||||
import eu.kanade.tachiyomi.util.system.AuthenticatorUtil.isAuthenticationSupported
|
import eu.kanade.tachiyomi.util.system.AuthenticatorUtil.isAuthenticationSupported
|
||||||
import eu.kanade.tachiyomi.util.system.analyticsIncluded
|
import eu.kanade.tachiyomi.util.system.telemetryIncluded
|
||||||
import kotlinx.collections.immutable.persistentListOf
|
import kotlinx.collections.immutable.persistentListOf
|
||||||
import kotlinx.collections.immutable.toImmutableMap
|
import kotlinx.collections.immutable.toImmutableMap
|
||||||
import mihon.core.archive.CbzCrypto
|
import mihon.core.archive.CbzCrypto
|
||||||
|
|
@ -77,7 +77,7 @@ object SettingsSecurityScreen : SearchableSettings {
|
||||||
val privacyPreferences = remember { Injekt.get<PrivacyPreferences>() }
|
val privacyPreferences = remember { Injekt.get<PrivacyPreferences>() }
|
||||||
return buildList(2) {
|
return buildList(2) {
|
||||||
add(getSecurityGroup(securityPreferences))
|
add(getSecurityGroup(securityPreferences))
|
||||||
if (!analyticsIncluded) return@buildList
|
if (!telemetryIncluded) return@buildList
|
||||||
add(getFirebaseGroup(privacyPreferences))
|
add(getFirebaseGroup(privacyPreferences))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -62,11 +62,11 @@ import eu.kanade.tachiyomi.util.CrashLogUtil
|
||||||
import eu.kanade.tachiyomi.util.system.DeviceUtil
|
import eu.kanade.tachiyomi.util.system.DeviceUtil
|
||||||
import eu.kanade.tachiyomi.util.system.GLUtil
|
import eu.kanade.tachiyomi.util.system.GLUtil
|
||||||
import eu.kanade.tachiyomi.util.system.WebViewUtil
|
import eu.kanade.tachiyomi.util.system.WebViewUtil
|
||||||
import eu.kanade.tachiyomi.util.system.analyticsIncluded
|
|
||||||
import eu.kanade.tachiyomi.util.system.animatorDurationScale
|
import eu.kanade.tachiyomi.util.system.animatorDurationScale
|
||||||
import eu.kanade.tachiyomi.util.system.cancelNotification
|
import eu.kanade.tachiyomi.util.system.cancelNotification
|
||||||
import eu.kanade.tachiyomi.util.system.isDebugBuildType
|
import eu.kanade.tachiyomi.util.system.isDebugBuildType
|
||||||
import eu.kanade.tachiyomi.util.system.notify
|
import eu.kanade.tachiyomi.util.system.notify
|
||||||
|
import eu.kanade.tachiyomi.util.system.telemetryIncluded
|
||||||
import exh.log.CrashlyticsPrinter
|
import exh.log.CrashlyticsPrinter
|
||||||
import exh.log.EHLogLevel
|
import exh.log.EHLogLevel
|
||||||
import exh.log.EnhancedFilePrinter
|
import exh.log.EnhancedFilePrinter
|
||||||
|
|
@ -350,7 +350,7 @@ class App : Application(), DefaultLifecycleObserver, SingletonImageLoader.Factor
|
||||||
}
|
}
|
||||||
|
|
||||||
// Install Crashlytics in prod
|
// Install Crashlytics in prod
|
||||||
if (analyticsIncluded) {
|
if (telemetryIncluded) {
|
||||||
printers += CrashlyticsPrinter(LogLevel.ERROR)
|
printers += CrashlyticsPrinter(LogLevel.ERROR)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@ package eu.kanade.tachiyomi.util.system
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.BuildConfig
|
import eu.kanade.tachiyomi.BuildConfig
|
||||||
|
|
||||||
val analyticsIncluded: Boolean
|
val telemetryIncluded: Boolean
|
||||||
inline get() = BuildConfig.ANALYTICS_INCLUDED
|
inline get() = BuildConfig.TELEMETRY_INCLUDED
|
||||||
|
|
||||||
val updaterEnabled: Boolean
|
val updaterEnabled: Boolean
|
||||||
inline get() = BuildConfig.UPDATER_ENABLED
|
inline get() = BuildConfig.UPDATER_ENABLED
|
||||||
|
|
|
||||||
|
|
@ -3,14 +3,14 @@ package mihon.buildlogic
|
||||||
import org.gradle.api.Project
|
import org.gradle.api.Project
|
||||||
|
|
||||||
interface BuildConfig {
|
interface BuildConfig {
|
||||||
val includeAnalytics: Boolean
|
val includeTelemetry: Boolean
|
||||||
val enableUpdater: Boolean
|
val enableUpdater: Boolean
|
||||||
val enableCodeShrink: Boolean
|
val enableCodeShrink: Boolean
|
||||||
val includeDependencyInfo: Boolean
|
val includeDependencyInfo: Boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
val Project.Config: BuildConfig get() = object : BuildConfig {
|
val Project.Config: BuildConfig get() = object : BuildConfig {
|
||||||
override val includeAnalytics: Boolean = project.hasProperty("include-analytics")
|
override val includeTelemetry: Boolean = project.hasProperty("include-telemetry")
|
||||||
override val enableUpdater: Boolean = project.hasProperty("enable-updater")
|
override val enableUpdater: Boolean = project.hasProperty("enable-updater")
|
||||||
override val enableCodeShrink: Boolean = !project.hasProperty("disable-code-shrink")
|
override val enableCodeShrink: Boolean = !project.hasProperty("disable-code-shrink")
|
||||||
override val includeDependencyInfo: Boolean = project.hasProperty("include-dependency-info")
|
override val includeDependencyInfo: Boolean = project.hasProperty("include-dependency-info")
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ android {
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
getByName("main") {
|
getByName("main") {
|
||||||
val dir = if (Config.includeAnalytics) "firebase" else "noop"
|
val dir = if (Config.includeTelemetry) "firebase" else "noop"
|
||||||
kotlin.srcDirs("src/$dir/kotlin")
|
kotlin.srcDirs("src/$dir/kotlin")
|
||||||
manifest.srcFile("src/$dir/AndroidManifext.xml")
|
manifest.srcFile("src/$dir/AndroidManifext.xml")
|
||||||
}
|
}
|
||||||
|
|
@ -18,7 +18,7 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
if (Config.includeAnalytics) {
|
if (Config.includeTelemetry) {
|
||||||
implementation(platform(libs.firebase.bom))
|
implementation(platform(libs.firebase.bom))
|
||||||
implementation(libs.firebase.analytics)
|
implementation(libs.firebase.analytics)
|
||||||
implementation(libs.firebase.crashlytics)
|
implementation(libs.firebase.crashlytics)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue