diff --git a/sample/build.gradle.kts b/sample/build.gradle.kts index bf36e53..4d67cfc 100644 --- a/sample/build.gradle.kts +++ b/sample/build.gradle.kts @@ -23,15 +23,18 @@ android { } signingConfigs { - create("release") { - // Load keystore - val keystoreProperties = Properties().apply{ - load(File("keystore.properties").reader()) + val propertiesFile = File("keystore.properties") + if (propertiesFile.exists()) { + create("release") { + // Load keystore + val keystoreProperties = Properties().apply{ + load(propertiesFile.reader()) + } + storeFile = File(keystoreProperties.getProperty("storeFile")) + storePassword = keystoreProperties.getProperty("storePassword") + keyAlias = keystoreProperties.getProperty("keyAlias") + keyPassword = keystoreProperties.getProperty("keyPassword") } - storeFile = File(keystoreProperties.getProperty("storeFile")) - storePassword = keystoreProperties.getProperty("storePassword") - keyAlias = keystoreProperties.getProperty("keyAlias") - keyPassword= keystoreProperties.getProperty("keyPassword") } } @@ -42,7 +45,9 @@ android { getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro" ) - signingConfig = signingConfigs.getByName("release") + runCatching { signingConfigs.getByName("release") } + .onSuccess { safeConfig -> signingConfig = safeConfig } + } } compileOptions { diff --git a/wearablesample/build.gradle.kts b/wearablesample/build.gradle.kts index fd5e446..916858c 100644 --- a/wearablesample/build.gradle.kts +++ b/wearablesample/build.gradle.kts @@ -21,15 +21,18 @@ android { } signingConfigs { - create("release") { - // Load keystore - val keystoreProperties = Properties().apply{ - load(File("keystore.properties").reader()) + val propertiesFile = File("keystore.properties") + if (propertiesFile.exists()) { + create("release") { + // Load keystore + val keystoreProperties = Properties().apply{ + load(propertiesFile.reader()) + } + storeFile = File(keystoreProperties.getProperty("storeFile")) + storePassword = keystoreProperties.getProperty("storePassword") + keyAlias = keystoreProperties.getProperty("keyAlias") + keyPassword = keystoreProperties.getProperty("keyPassword") } - storeFile = File(keystoreProperties.getProperty("storeFile")) - storePassword = keystoreProperties.getProperty("storePassword") - keyAlias = keystoreProperties.getProperty("keyAlias") - keyPassword= keystoreProperties.getProperty("keyPassword") } } @@ -40,7 +43,8 @@ android { getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro" ) - signingConfig = signingConfigs.getByName("release") + runCatching { signingConfigs.getByName("release") } + .onSuccess { safeConfig -> signingConfig = safeConfig } } } compileOptions { diff --git a/wearablesample/src/main/java/com/mutualmobile/wearablesample/presentation/MainActivity.kt b/wearablesample/src/main/java/com/mutualmobile/wearablesample/presentation/MainActivity.kt index b256bb0..7687ae2 100644 --- a/wearablesample/src/main/java/com/mutualmobile/wearablesample/presentation/MainActivity.kt +++ b/wearablesample/src/main/java/com/mutualmobile/wearablesample/presentation/MainActivity.kt @@ -83,8 +83,7 @@ class MainActivity : ComponentActivity() { } AnimatedContent( - targetState = isPermissionGranted, - label = "animated container" + targetState = isPermissionGranted ) { animatedIsGranted -> Column( horizontalAlignment = Alignment.CenterHorizontally