This repository provides commonly shared functions being used across Android apps
The TTS function is provided via TextToSpeechViewModel, which is implemented using Hilt and kapt So, make sure you have Hilt & kapt imported in your projects via below check-list:
- Add Hilt and kapt plugins in
app/build.gradlefileapply plugin: 'dagger.hilt.android.plugin' apply plugin: 'org.jetbrains.kotlin.android' apply plugin: 'kotlin-kapt'
- Add Hilt &
common-utilsdependencies inapp/build.gradlefileimplementation 'com.github.elimu-ai:common-utils:1.0.1' implementation 'com.google.dagger:hilt-android:2.55' kapt 'com.google.dagger:hilt-compiler:2.55'
- Add Hilt & Kotlin gradle plugin classpaths to project's
build.gradlefileclasspath "org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.0" classpath "com.google.dagger:hilt-android-gradle-plugin:2.55"
- Add
@HiltAndroidAppto your Application class - Add
@AndroidEntryPointto your Activity/Fragment - Initialize your
TextToSpeechViewModelin youronCreatemethod of your Activity/Fragmentprivate lateinit var ttsViewModel: TextToSpeechViewModel fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) ttsViewModel = ViewModelProvider(this)[TextToSpeechViewModelImpl::class.java] }
- Now you're ready to use the Text to Speech function
- Update versionCode, versionName in
utils/build.gradlefile by increment either major/minor/patch number and merge tomain(Do not remove theSNAPSHOTsuffix) - Trigger
Releasetask in Github Actions onmainbranch - Draft a new Release in https://github.com/elimu-ai/common-utils/releases
elimu.ai - Free open-source learning software for out-of-school children 🚀✨
Website 🌐 • Wiki 📃 • Projects 👩🏽💻 • Milestones 🎯 • Community 👋🏽 • Support 💜
