diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 502a3ec0..fe064356 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -27,7 +27,13 @@ fun String.execute() = ByteArrayOutputStream().use { baot -> } val localProperties = Properties() -localProperties.load(FileInputStream(rootProject.file("local.properties"))) +val localPropertiesEnabled = try { + localProperties.load(FileInputStream(rootProject.file("local.properties"))) + true +} catch(_: Exception) { + false +} + android { testOptions { @@ -88,16 +94,19 @@ android { getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro" ) - resValue( - "string", - "debug_gdrive_secret", - localProperties.getProperty("debug.gdrive.secret") ?: "" - ) - resValue( - "string", - "debug_gdrive_clientId", - localProperties.getProperty("debug.gdrive.clientId") ?: "" - ) + + if (localPropertiesEnabled) { + resValue( + "string", + "debug_gdrive_secret", + localProperties.getProperty("debug.gdrive.secret") ?: "" + ) + resValue( + "string", + "debug_gdrive_clientId", + localProperties.getProperty("debug.gdrive.clientId") ?: "" + ) + } } } flavorDimensions.add("state") diff --git a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/GoogleDriveApi.kt b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/GoogleDriveApi.kt index 10ab64b4..9d3858dd 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/GoogleDriveApi.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/GoogleDriveApi.kt @@ -38,7 +38,7 @@ import java.io.InputStream import java.util.* -// TODO: improvements and ideas +// improvements and ideas // - add option to use proper oauth through google services one tap - would need google console project on behalf of cloudstream // - encrypt data on drive // - choose what should be synced