Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 16 additions & 15 deletions sdks/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ plugins {
id "org.jetbrains.kotlin.plugin.compose"
}

def executedTask = gradle.startParameter.taskNames.toString()
def localProps = new Properties()
localProps.load(new FileInputStream(rootProject.file("local.properties")))

Properties localProperties = new Properties()
def propertiesFile = project.rootProject.file('local.properties')
if (propertiesFile.exists()) {
Expand All @@ -22,12 +18,15 @@ if (propertiesFile.exists()) {

android {
signingConfigs {
externalRelease {
storeFile file(localProperties.getProperty('storeFile'))
storePassword localProperties.getProperty('storePassword')
keyPassword localProperties.getProperty('keyPassword')
keyAlias localProperties.getProperty('keyAlias')
}

// Uncomment for sample app release build:
//
// externalRelease {
// storeFile file(localProperties.getProperty('storeFile'))
// storePassword localProperties.getProperty('storePassword')
// keyPassword localProperties.getProperty('keyPassword')
// keyAlias localProperties.getProperty('keyAlias')
// }
Comment thread
jpuneet marked this conversation as resolved.
}

namespace 'dev.deliteai.android.sampleapp'
Expand All @@ -41,19 +40,21 @@ android {
versionName "1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
signingConfig signingConfigs.externalRelease

vectorDrawables {
useSupportLibrary true
}

buildConfigField "String", "APP_CLIENT_ID", "\"${localProps['APP_CLIENT_ID']}\""
buildConfigField "String", "APP_CLIENT_SECRET", "\"${localProps['APP_CLIENT_SECRET']}\""
buildConfigField "String", "APP_HOST", "\"${localProps['APP_HOST']}\""
buildConfigField "String", "APP_CLIENT_ID", "\"${localProperties['APP_CLIENT_ID']}\""
buildConfigField "String", "APP_CLIENT_SECRET", "\"${localProperties['APP_CLIENT_SECRET']}\""
buildConfigField "String", "APP_HOST", "\"${localProperties['APP_HOST']}\""
}

buildTypes {
release {
signingConfig signingConfigs.externalRelease
// Uncomment for sample app release build:
// signingConfig signingConfigs.externalRelease

minifyEnabled true
shrinkResources true
debuggable false
Expand Down
2 changes: 1 addition & 1 deletion sdks/android/buildSrc/src/main/kotlin/Utils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ fun Project.getLocalProperty(key: String): String {
val propsFile = rootProject.file("local.properties")
val props = Properties().apply { if (propsFile.exists()) load(propsFile.inputStream()) }
return props.getProperty(key)
?: throw GradleException("Missing local property: $key")
?: ""
}

fun fetchLocalProperties(rootDir: File) =
Expand Down
Loading