diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 3c7b46b5b..5623ae918 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -1,6 +1,3 @@ -import java.io.FileInputStream -import java.util.Properties - plugins { // supabase setup kotlin("plugin.serialization") version "2.0.0-RC1" @@ -16,20 +13,25 @@ plugins { id("com.google.android.libraries.mapsplatform.secrets-gradle-plugin") } +secrets { + propertiesFileName = "apikeys.properties" + defaultPropertiesFileName = "apikeys.defaults.properties" +} + android { namespace = "com.android.periodpals" compileSdk = 34 - // Load the API key from apikeys.properties - val apikeysProperties = Properties() - val localPropertiesFile = rootProject.file("apikeys.properties") - if (localPropertiesFile.exists()) { - apikeysProperties.load(FileInputStream(localPropertiesFile)) - } - val supabaseUrl = apikeysProperties.getProperty("SUPABASE_URL") ?: "couldnt get property" - val supabaseKey = apikeysProperties.getProperty("SUPABASE_KEY") ?: "couldnt get property" - val powersyncUrl = apikeysProperties.getProperty("POWERSYNC_URL") ?: "couldnt get property" - val serviceKey = apikeysProperties.getProperty("SERVICE_KEY") ?: "couldnt get property" + // // Load the API key from apikeys.properties + // val apikeysProperties = Properties() + // val localPropertiesFile = rootProject.file("apikeys.properties") + // if (localPropertiesFile.exists()) { + // apikeysProperties.load(FileInputStream(localPropertiesFile)) + // } + // val supabaseUrl = apikeysProperties.getProperty("SUPABASE_URL") ?: "couldnt get property" + // val supabaseKey = apikeysProperties.getProperty("SUPABASE_KEY") ?: "couldnt get property" + // val powersyncUrl = apikeysProperties.getProperty("POWERSYNC_URL") ?: "couldnt get property" + // val serviceKey = apikeysProperties.getProperty("SERVICE_KEY") ?: "couldnt get property" defaultConfig { applicationId = "com.android.periodpals" @@ -41,10 +43,10 @@ android { testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" vectorDrawables { useSupportLibrary = true } - buildConfigField("String", "SUPABASE_URL", "\"${supabaseUrl}\"") - buildConfigField("String", "SUPABASE_KEY", "\"${supabaseKey}\"") - buildConfigField("String", "POWERSYNC_URL", "\"${powersyncUrl}\"") - buildConfigField("String", "SERVICE_KEY", "\"${serviceKey}\"") + // buildConfigField("String", "SUPABASE_URL", "\"${supabaseUrl}\"") + // buildConfigField("String", "SUPABASE_KEY", "\"${supabaseKey}\"") + // buildConfigField("String", "POWERSYNC_URL", "\"${powersyncUrl}\"") + // buildConfigField("String", "SERVICE_KEY", "\"${serviceKey}\"") } buildFeatures { buildConfig = true } @@ -115,11 +117,6 @@ android { } } -secrets { - propertiesFileName = "apikeys.properties" - defaultPropertiesFileName = "apikeys.defaults.properties" -} - sonar { properties { property("sonar.projectKey", "PeriodPals_periodpals")