Skip to content

Commit

Permalink
Libraries Updated.
Browse files Browse the repository at this point in the history
Kotlin -> 1.7.0
Jetpack Compose -> 1.2.0
Hilt -> 2.42
  • Loading branch information
ealkanat committed Aug 3, 2022
1 parent d1c4cad commit ba6ddb7
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 27 deletions.
11 changes: 0 additions & 11 deletions .idea/deploymentTargetDropDown.xml

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

21 changes: 14 additions & 7 deletions app/build.gradle
@@ -1,7 +1,7 @@
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id 'dagger.hilt.android.plugin'
id 'com.google.dagger.hilt.android'
id 'kotlin-kapt'
}

Expand Down Expand Up @@ -47,17 +47,20 @@ android {
}
}

kapt {
correctErrorTypes true
}

dependencies {

implementation "com.google.accompanist:accompanist-systemuicontroller:0.17.0"
implementation "com.google.accompanist:accompanist-placeholder-material:0.24.13-rc"


implementation "io.coil-kt:coil-compose:2.1.0"

implementation "com.google.dagger:hilt-android:2.38.1"
kapt "com.google.dagger:hilt-android-compiler:2.37"
implementation "androidx.hilt:hilt-lifecycle-viewmodel:1.0.0-alpha03"
implementation 'com.google.dagger:hilt-android:2.42'
kapt 'com.google.dagger:hilt-compiler:2.42'

kapt "androidx.hilt:hilt-compiler:1.0.0"
implementation 'androidx.hilt:hilt-navigation-compose:1.0.0'

Expand All @@ -69,12 +72,16 @@ dependencies {
implementation "androidx.compose.ui:ui:$compose_version"
implementation "androidx.compose.material:material:$compose_version"
implementation "androidx.compose.ui:ui-tooling-preview:$compose_version"
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.0'
implementation 'androidx.activity:activity-compose:1.5.0'

implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.1'
implementation 'androidx.activity:activity-compose:1.5.1'

testImplementation 'junit:junit:4.13.2'

androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version"

debugImplementation "androidx.compose.ui:ui-tooling:$compose_version"
debugImplementation "androidx.compose.ui:ui-test-manifest:$compose_version"
}
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Expand Up @@ -15,7 +15,7 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.BookSearch"
tools:targetApi="31">
tools:targetApi="32">

<activity
android:name=".fbook.presentation.MainActivity"
Expand Down
@@ -1,6 +1,8 @@
package com.inomob.booksearch.fbook.domain.util

// Expand types for the deciding which view expanded by useCase
// 'is' comparison is not working with enums so I used sealed class instead of enum.
// it helps eliminates the if/else clause and also heps easier the understand code
sealed class ExpandType {
object CardViewDetail: ExpandType()
object LanguageView: ExpandType()
Expand Down
Expand Up @@ -3,27 +3,29 @@ package com.inomob.booksearch.fbook.presentation
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.viewModels
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Surface
import androidx.compose.runtime.SideEffect
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.core.view.WindowCompat
import androidx.lifecycle.viewmodel.compose.viewModel
import androidx.navigation.compose.NavHost
import androidx.navigation.compose.composable
import androidx.navigation.compose.rememberNavController
import com.google.accompanist.systemuicontroller.rememberSystemUiController
import com.inomob.booksearch.fbook.presentation.search_book.BookSearchScreen
import com.inomob.booksearch.fbook.presentation.search_book.BooksViewModel
import com.inomob.booksearch.fbook.presentation.ui.theme.BookSearchTheme
import dagger.hilt.android.AndroidEntryPoint

@AndroidEntryPoint
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

setContent {
BookSearchTheme {
Surface(
Expand Down
Expand Up @@ -6,7 +6,6 @@ import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.inomob.booksearch.fbook.common.Resource
import com.inomob.booksearch.fbook.domain.use_case.BookUseCases
import com.inomob.booksearch.fbook.domain.use_case.ExpandCloseDetailsUseCase
import dagger.hilt.android.lifecycle.HiltViewModel
import kotlinx.coroutines.Job
import kotlinx.coroutines.flow.launchIn
Expand Down
10 changes: 5 additions & 5 deletions build.gradle
@@ -1,15 +1,15 @@
buildscript {
ext {
compose_version = '1.1.1'
compose_version = '1.2.0'
}
dependencies {
classpath 'com.google.dagger:hilt-android-gradle-plugin:2.38.1'
classpath 'com.google.dagger:hilt-android-gradle-plugin:2.42'
}
}// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '7.2.0' apply false
id 'com.android.library' version '7.2.0' apply false
id 'org.jetbrains.kotlin.android' version '1.6.10' apply false
id 'com.android.application' version '7.2.1' apply false
id 'com.android.library' version '7.2.1' apply false
id 'org.jetbrains.kotlin.android' version '1.7.0' apply false
}

task clean(type: Delete) {
Expand Down

1 comment on commit ba6ddb7

@ealkanat
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HILT -> 2.42 (It is not latest version, I didn't update HILT to 2.43 because new version of HILT requires Java 11 but it will support Java 8 again with future releases. Please look; google/dagger#3495)

Please sign in to comment.