Skip to content

Commit

Permalink
attempting different compose options
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Smithy-x committed Mar 7, 2024
1 parent b7eadcd commit 81bcc17
Show file tree
Hide file tree
Showing 29 changed files with 734 additions and 227 deletions.
15 changes: 14 additions & 1 deletion .idea/deploymentTargetDropDown.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .idea/deploymentTargetSelector.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

128 changes: 58 additions & 70 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ plugins {
id 'com.android.application'
id 'kotlin-android'
id 'kotlin-kapt'
id 'com.google.devtools.ksp'
id 'kotlin-parcelize'
id 'dagger.hilt.android.plugin'
id "androidx.navigation.safeargs"
Expand All @@ -11,12 +12,12 @@ plugins {
}

android {
compileSdk 33
compileSdk 34
ndkVersion '25.1.8937393'
defaultConfig {
applicationId "io.vonley.mi"
minSdk 21
targetSdk 33
targetSdk 34
versionCode 7
versionName "1.1.1-alpha"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand Down Expand Up @@ -66,20 +67,21 @@ android {
}
kotlinOptions {
jvmTarget = '1.8'
freeCompilerArgs = ['-Xjvm-default=compatibility']
freeCompilerArgs = ['-Xjvm-default=all-compatibility']
}
buildFeatures {
compose true
viewBinding true
buildConfig true
}
lint {
abortOnError false
}
composeOptions {
kotlinCompilerExtensionVersion = "1.3.2"
kotlinCompilerExtensionVersion = "1.5.10"
}
buildToolsVersion '33.0.0'
namespace 'io.vonley.mi'
buildToolsVersion '34.0.0'
}

dependencies {
Expand All @@ -88,82 +90,79 @@ dependencies {
implementation 'com.google.accompanist:accompanist-pager:0.27.0' // Pager
implementation 'com.google.accompanist:accompanist-pager-indicators:0.27.0' // Pager Indicators

implementation 'androidx.compose.material3:material3:1.2.1'
implementation 'androidx.compose.material3:material3-window-size-class:1.2.1'

def compose = "1.3.1"
implementation 'androidx.compose.material3:material3:1.1.0-alpha02'
implementation "androidx.compose.ui:ui:$compose"

// Android Studio Preview support
implementation "androidx.compose.ui:ui-tooling-preview:$compose"
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1'
debugImplementation "androidx.compose.ui:ui-tooling:$compose"


// Optional - Included automatically by material, only add when you need
// the icons but not the material library (e.g. when using Material3 or a
// custom design system based on Foundation)
implementation "androidx.compose.material:material-icons-core:$compose"
// Optional - Add full set of material icons
implementation "androidx.compose.material:material-icons-extended:$compose"
// Optional - Add window size utils
implementation 'androidx.compose.material3:material3-window-size-class:1.1.0-alpha02'

// UI Tests
androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose"
debugImplementation "androidx.compose.ui:ui-test-manifest:$compose"

// Optional - Integration with activities
implementation "androidx.hilt:hilt-navigation-compose:1.0.0"
implementation 'androidx.activity:activity-compose:1.6.1'
// Optional - Integration with ViewModels
implementation 'androidx.lifecycle:lifecycle-viewmodel-compose:2.5.1'
// Optional - Integration with LiveData
implementation "androidx.compose.runtime:runtime-livedata:$compose"

implementation 'androidx.core:core-ktx:1.9.0'
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'com.google.android.material:material:1.7.0'
implementation 'androidx.core:core-ktx:1.12.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.11.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'

implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.1'

implementation platform('com.google.firebase:firebase-bom:31.0.3')
implementation platform('com.google.firebase:firebase-bom:32.7.3')
implementation 'com.google.firebase:firebase-analytics-ktx'
implementation 'com.google.firebase:firebase-crashlytics-ktx'

implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'androidx.preference:preference-ktx:1.2.0'
implementation 'androidx.recyclerview:recyclerview:1.3.2'
implementation 'androidx.preference:preference-ktx:1.2.1'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
implementation 'org.nanohttpd:nanohttpd:2.3.1'

def navigation = "2.5.3"

implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.7.0"
implementation "androidx.lifecycle:lifecycle-runtime-compose:2.7.0"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.7.0"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.7.0"
implementation 'androidx.lifecycle:lifecycle-viewmodel-compose:2.7.0'

// Optional - Integration with activities

implementation "androidx.hilt:hilt-navigation-compose:1.2.0"
ksp "com.google.dagger:hilt-android-compiler:$hilt_version"
kspTest "com.google.dagger:hilt-android-compiler:$hilt_version"
kspAndroidTest "com.google.dagger:hilt-android-compiler:$hilt_version"
implementation "com.google.dagger:hilt-android:$hilt_version"
testImplementation "com.google.dagger:hilt-android-testing:$hilt_version"
androidTestImplementation "com.google.dagger:hilt-android-testing:$hilt_version"

def compose = "1.6.3"
implementation "androidx.compose.material:material-icons-core:$compose"
implementation "androidx.compose.material:material-icons-extended:$compose"
implementation 'androidx.activity:activity-compose:1.8.2'
implementation "androidx.compose.runtime:runtime-livedata:$compose"
implementation "androidx.compose.ui:ui:$compose"
implementation "androidx.compose.ui:ui-viewbinding:$compose"
debugImplementation "androidx.compose.ui:ui-tooling:$compose"
implementation "androidx.compose.ui:ui-tooling-preview:$compose"
debugImplementation "androidx.compose.ui:ui-test-manifest:$compose"
androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose"

def navigation = "2.7.7"
implementation "androidx.navigation:navigation-compose:$navigation"
implementation "androidx.navigation:navigation-testing:$navigation"
implementation "androidx.navigation:navigation-ui:$navigation"
implementation "androidx.navigation:navigation-ui-ktx:$navigation"
implementation "androidx.navigation:navigation-fragment:$navigation"
implementation "androidx.navigation:navigation-fragment-ktx:$navigation"
// Testing Navigation
androidTestImplementation "androidx.navigation:navigation-testing:$navigation"

implementation "commons-net:commons-net:3.6"

implementation 'com.google.code.gson:gson:2.10'
implementation "commons-net:commons-net:3.6"
implementation 'org.jsoup:jsoup:1.15.3'
implementation 'com.google.code.gson:gson:2.10.1'

kapt 'com.github.bumptech.glide:compiler:4.14.2'
implementation 'com.github.bumptech.glide:glide:4.14.2'
implementation 'com.github.bumptech.glide:okhttp3-integration:4.14.2'
ksp 'com.github.bumptech.glide:compiler:4.16.0'
implementation 'com.github.bumptech.glide:glide:4.16.0'
implementation 'com.github.bumptech.glide:okhttp3-integration:4.16.0'

implementation 'org.jsoup:jsoup:1.15.3'
implementation 'de.hdodenhof:circleimageview:3.1.0'
implementation 'javax.inject:javax.inject:1'
implementation 'net.danlew:android.joda:2.12.1'
implementation 'net.danlew:android.joda:2.12.5'

def room = "2.4.3"
kapt "androidx.room:room-compiler:$room"
annotationProcessor "androidx.room:room-compiler:$room"
def room = "2.6.1"
ksp "androidx.room:room-compiler:$room"
implementation "androidx.room:room-runtime:$room"
implementation "androidx.room:room-ktx:$room"

Expand All @@ -172,25 +171,14 @@ dependencies {
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation "com.squareup.retrofit2:converter-gson:2.9.0"
implementation "com.squareup.retrofit2:retrofit-converters:2.8.1"
implementation('com.squareup.okhttp3:okhttp:5.0.0-alpha.10')
implementation('com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.10')
implementation('com.squareup.okhttp3:okhttp:5.0.0-alpha.11')
implementation('com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.11')

implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.5.1"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.5.1"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1"

implementation("io.coil-kt:coil-compose:2.2.2")

kapt "com.google.dagger:hilt-android-compiler:$hilt_version"
kaptTest "com.google.dagger:hilt-android-compiler:$hilt_version"
kaptAndroidTest "com.google.dagger:hilt-android-compiler:$hilt_version"
implementation "com.google.dagger:hilt-android:$hilt_version"
testImplementation "com.google.dagger:hilt-android-testing:$hilt_version"
androidTestImplementation "com.google.dagger:hilt-android-testing:$hilt_version"

implementation 'io.noties.markwon:core:4.6.2'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.4'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
}
21 changes: 15 additions & 6 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,27 @@
android:taskAffinity=""
android:name="io.vonley.mi.ui.main.MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</activity>

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<activity
android:launchMode="singleInstance"
android:taskAffinity=""
android:name="io.vonley.mi.ui.interop.MainActivityXml"
android:exported="true">
</activity>

<activity
android:launchMode="singleInstance"
android:taskAffinity=""
android:name="io.vonley.mi.ui.MainActivity"
android:exported="true"/>
android:name="io.vonley.mi.ui.compose.MainActivity"
android:exported="true">

<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!--
<meta-data
android:name="nyc.vonley.wsb.di.modules.glide.MyGlideModule"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ abstract class BaseClientHandler <N : OnClientListener, D> : CoroutineScope, Obs

val listeners = HashMap<Class<*>, N>()

override fun onChanged(t: D?) {
if (t != null) {
handle(t)
override fun onChanged(value: D) {
if (value != null) {
handle(value)
}
}

Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/io/vonley/mi/intents/VoiceServiceBinder.kt
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,10 @@ class VoiceServiceBinder @Inject constructor(
callback = null
}

override fun onChanged(list: List<Any>?) {
override fun onChanged(value: List<Any>) {

//val result = (list - stack) - processed
val result = list?: emptyList()
val result = value?: emptyList()
stack.addAll(result)
if (!voice.speaking) {
start()
Expand Down
Loading

0 comments on commit 81bcc17

Please sign in to comment.