From 6374e0077b70386c87b2d6b9bc4a149ce03d3c42 Mon Sep 17 00:00:00 2001 From: Nishith Khanna Date: Wed, 13 Nov 2024 17:52:39 +0530 Subject: [PATCH] Rename api key variable for consistency --- .gitlab-ci.yml | 2 +- preferences/build.gradle.kts | 2 +- .../src/main/kotlin/foundation/e/blissweather/AppPreferences.kt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 19ff330..c9c70cb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,7 @@ image: "registry.gitlab.e.foundation/e/os/docker-android-apps-cicd:1263-Add_java_17_support" variables: - OWM_KEY: ${DEFAULT_OWM_KEY} + WEATHER_API_KEY: ${WEATHER_API_KEY} SENTRY_DSN: ${SENTRY_DSN} stages: diff --git a/preferences/build.gradle.kts b/preferences/build.gradle.kts index 9b7db63..5144023 100644 --- a/preferences/build.gradle.kts +++ b/preferences/build.gradle.kts @@ -15,7 +15,7 @@ android { buildTypes { configureEach { - buildConfigField("String", "OWM_API_KEY", "\"${System.getenv("OWM_KEY")}\"") + buildConfigField("String", "WEATHER_API_KEY", "\"${System.getenv("WEATHER_API_KEY")}\"") } } diff --git a/preferences/src/main/kotlin/foundation/e/blissweather/AppPreferences.kt b/preferences/src/main/kotlin/foundation/e/blissweather/AppPreferences.kt index 8d66797..239f403 100644 --- a/preferences/src/main/kotlin/foundation/e/blissweather/AppPreferences.kt +++ b/preferences/src/main/kotlin/foundation/e/blissweather/AppPreferences.kt @@ -28,7 +28,7 @@ class AppPreferences @Inject constructor(private val sharedPrefs: SharedPreferen get() = sharedPrefs.all var weatherApiKey: String? - get() = sharedPrefs.getString(Constants.WEATHER_API_KEY, BuildConfig.OWM_API_KEY)!! + get() = sharedPrefs.getString(Constants.WEATHER_API_KEY, BuildConfig.WEATHER_API_KEY)!! set(value) { sharedPrefs.edit { putString(Constants.WEATHER_API_KEY, value?.trim()) } } -- GitLab