Skip to content

Commit

Permalink
Convert all UI to Compose
Browse files Browse the repository at this point in the history
NOTICE: This will remove any active usages of the widget.

- New app bar with back button in App List and TTS screens.
- Ignore All/None now separate app bar buttons in App List.
- Remove keyboard input option in Quiet Time. Should be temporary.
- Device States and TTS Audio Stream dialogs now have both
    'Cancel' and 'OK' buttons. Changes only saved with 'OK'.
- TTS Text Replacement dialog is less janky.
- Add title to Quiet Time dialog.
- Widget image is now a white vector with tint applied.
    This changes the widget preview from green to white.
- Include Git hash in release version name.
- Shrink/optimize release build without obfuscation.
    This reduces APK size from about 13MB to 3MB
    while maintaining trust in the build.
- minSdk: 18 (4.3) -> 21 (5.0)
- compileSdk/targetSdk: 33 (13.0) -> 34 (14.0)
- Update dependencies.
- Reorganize strings.
- Change copyright start year to start of project in all files.
    Too ambiguous to use the year the code in the file was created.
- Other fixes and improvements.
  • Loading branch information
pilot51 committed Dec 31, 2023
1 parent 2fab030 commit bbcc710
Show file tree
Hide file tree
Showing 51 changed files with 2,823 additions and 2,092 deletions.
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Voice Notify
Copyright 2011-2022 Mark Injerd
Copyright 2011-2023 Mark Injerd

Voice Notify "bell" icon
Copyright 2018 Ruel Cedeno, released under the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/).
Expand Down
43 changes: 32 additions & 11 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2023 Mark Injerd
* Copyright 2011-2023 Mark Injerd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -23,7 +23,6 @@ plugins {
id("com.android.application")
kotlin("android")
id("com.google.devtools.ksp")
id("androidx.navigation.safeargs.kotlin")
}

val keystorePropertiesFile: File = rootProject.file("keystore.properties")
Expand All @@ -43,11 +42,11 @@ val gitCommitHash by lazy {

android {
namespace = "com.pilot51.voicenotify"
compileSdk = 33
compileSdk = 34
defaultConfig {
applicationId = "com.pilot51.voicenotify"
minSdk = 18
targetSdk = 33
minSdk = 21
targetSdk = 34
versionName = "1.2.3"
versionCode = 27
vectorDrawables.useSupportLibrary = true
Expand All @@ -60,6 +59,15 @@ android {
viewBinding = true
}

buildFeatures {
buildConfig = true
compose = true
}

composeOptions {
kotlinCompilerExtensionVersion = "1.5.7"
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
Expand All @@ -78,8 +86,15 @@ android {

buildTypes {
getByName("release") {
isMinifyEnabled = false
signingConfig = signingConfigs.getByName("release")
versionNameSuffix = " [$gitCommitHash]"
@Suppress("UnstableApiUsage")
postprocessing {
isRemoveUnusedCode = true
isOptimizeCode = true
isShrinkResources = true
isObfuscate = false
}
}
getByName("debug") {
versionNameSuffix = "-debug [$gitCommitHash]"
Expand All @@ -95,10 +110,16 @@ android {
}

dependencies {
implementation("androidx.core:core-ktx:1.10.1")
implementation("androidx.core:core-ktx:1.12.0")
implementation("androidx.activity:activity-compose:1.8.2")
implementation("androidx.compose.material3:material3:1.1.2")
implementation("androidx.compose.material:material-icons-extended-android:1.5.4")
implementation("androidx.compose.ui:ui-tooling-preview:1.5.4")
debugImplementation("androidx.compose.ui:ui-tooling:1.5.4")
implementation("androidx.navigation:navigation-compose:2.7.6")
implementation("androidx.glance:glance-appwidget:1.0.0")
implementation("androidx.preference:preference-ktx:1.2.1")
implementation("androidx.navigation:navigation-fragment-ktx:2.6.0")
implementation("androidx.navigation:navigation-ui-ktx:2.6.0")
implementation("androidx.room:room-ktx:2.5.2")
ksp("androidx.room:room-compiler:2.5.2")
implementation("androidx.room:room-ktx:2.6.1")
ksp("androidx.room:room-compiler:2.6.1")
implementation("com.google.accompanist:accompanist-permissions:0.32.0")
}
8 changes: 3 additions & 5 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2012-2023 Mark Injerd
<!-- Copyright 2011-2023 Mark Injerd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -34,7 +34,7 @@
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:label="@string/app_name"
android:theme="@style/AppTheme">
android:theme="@android:style/Theme.Material.NoActionBar">
<activity
android:name=".MainActivity"
android:exported="true">
Expand All @@ -52,12 +52,10 @@
</intent-filter>
</service>
<receiver
android:name=".WidgetProvider"
android:name=".AppWidgetReceiver"
android:exported="true">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
<action android:name="voicenotify.widget.TOGGLE" />
<action android:name="voicenotify.widget.UPDATE" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/pilot51/voicenotify/App.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012 Mark Injerd
* Copyright 2011-2023 Mark Injerd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/pilot51/voicenotify/AppDatabase.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 Mark Injerd
* Copyright 2011-2023 Mark Injerd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Loading

0 comments on commit bbcc710

Please sign in to comment.