diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml
new file mode 100644
index 0000000..e1eea1d
--- /dev/null
+++ b/.idea/kotlinc.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index bdd9278..6e4b8a0 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,7 +1,7 @@
-
+
diff --git a/app/build.gradle b/app/build.gradle
index e52aa90..3375078 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -13,8 +13,8 @@ android {
applicationId "com.leoleo.androidgithubsearch"
minSdk 29
targetSdk 33
- versionCode 102
- versionName "1.0.2"
+ versionCode 103
+ versionName "1.0.3"
testInstrumentationRunner "com.leoleo.androidgithubsearch.CustomTestRunner"
vectorDrawables {
@@ -40,7 +40,9 @@ android {
compose true
}
composeOptions {
- kotlinCompilerExtensionVersion '1.3.2'
+ // Kotlin Versionとの互換性マップ
+ // https://developer.android.com/jetpack/androidx/releases/compose-kotlin
+ kotlinCompilerExtensionVersion '1.4.2'
}
packagingOptions {
resources {
@@ -74,19 +76,22 @@ dependencies {
implementation project(':domain')
implementation project(':data') // DIで必要
- def compose_version = '1.3.2'
+ // compose Bomを利用
+ def compose_version = platform('androidx.compose:compose-bom:2023.01.00')
+ implementation compose_version
+ androidTestImplementation compose_version
implementation 'androidx.core:core-ktx:1.9.0'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.1'
implementation 'androidx.activity:activity-compose:1.6.1'
- implementation "androidx.compose.ui:ui:$compose_version"
- implementation "androidx.compose.ui:ui-tooling-preview:$compose_version"
- implementation 'androidx.compose.material3:material3:1.1.0-alpha03'
+ implementation 'androidx.compose.ui:ui'
+ implementation 'androidx.compose.ui:ui-tooling-preview'
+ implementation 'androidx.compose.material3:material3'
testImplementation("junit:junit:$junit_version")
- androidTestImplementation 'androidx.test.ext:junit-ktx:1.1.4'
- androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.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"
+ androidTestImplementation 'androidx.test.ext:junit-ktx:1.1.5'
+ androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
+ androidTestImplementation 'androidx.compose.ui:ui-test-junit4'
+ debugImplementation 'androidx.compose.ui:ui-tooling'
+ debugImplementation 'androidx.compose.ui:ui-test-manifest'
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutines_test_version")
// DI
@@ -101,11 +106,11 @@ dependencies {
implementation "androidx.navigation:navigation-compose:2.5.3"
// Image
- implementation "io.coil-kt:coil-compose:1.3.2"
+ implementation "io.coil-kt:coil-compose:2.2.2"
// Paging
- implementation "androidx.paging:paging-compose:1.0.0-alpha17"
+ implementation "androidx.paging:paging-compose:1.0.0-alpha18"
// responsive UI for larger screens
- implementation "androidx.compose.material3:material3-window-size-class:1.0.1"
+ implementation 'androidx.compose.material3:material3-window-size-class'
}
diff --git a/app/src/main/java/com/leoleo/androidgithubsearch/ui/component/NetworkImage.kt b/app/src/main/java/com/leoleo/androidgithubsearch/ui/component/NetworkImage.kt
index 2863bea..642ac8f 100644
--- a/app/src/main/java/com/leoleo/androidgithubsearch/ui/component/NetworkImage.kt
+++ b/app/src/main/java/com/leoleo/androidgithubsearch/ui/component/NetworkImage.kt
@@ -9,16 +9,16 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.layout.ContentScale
+import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
-import coil.annotation.ExperimentalCoilApi
-import coil.compose.rememberImagePainter
+import coil.compose.rememberAsyncImagePainter
+import coil.request.ImageRequest
import coil.transform.CircleCropTransformation
import coil.transform.Transformation
import com.leoleo.androidgithubsearch.R
import com.leoleo.androidgithubsearch.ui.preview.PreviewPhoneDevice
-@OptIn(ExperimentalCoilApi::class)
@Composable
fun AppNetworkImage(
modifier: Modifier = Modifier,
@@ -27,15 +27,15 @@ fun AppNetworkImage(
transformations: List = emptyList(),
) {
Image(
- painter = rememberImagePainter(
- data = imageUrl,
- builder = {
- crossfade(true)
- placeholder(drawableResId = R.drawable.placeholder_image)
- error(drawableResId = R.drawable.error_image)
- fallback(drawableResId = R.drawable.fallback_image)
- transformations(transformations)
- }
+ painter = rememberAsyncImagePainter(
+ ImageRequest.Builder(LocalContext.current).data(data = imageUrl)
+ .apply(block = fun ImageRequest.Builder.() {
+ crossfade(true)
+ placeholder(drawableResId = R.drawable.placeholder_image)
+ error(drawableResId = R.drawable.error_image)
+ fallback(drawableResId = R.drawable.fallback_image)
+ transformations(transformations)
+ }).build()
),
contentDescription = contentDescription,
modifier = modifier,
diff --git a/build.gradle b/build.gradle
index b706e40..bfd71a5 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,18 +1,18 @@
buildscript {
ext {
- dagger_hilt_version = '2.44.2'
+ dagger_hilt_version = '2.45'
paging_common_version = '3.1.1' // androidx.paging:paging-compose内部で使っているversionを指定
junit_version = '4.13.2'
- coroutines_test_version = '1.5.2'
+ coroutines_test_version = '1.6.4'
}
dependencies {
classpath "com.google.dagger:hilt-android-gradle-plugin:$dagger_hilt_version"
}
}// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
- id 'com.android.application' version '7.3.1' apply false
- id 'com.android.library' version '7.3.1' apply false
- id 'org.jetbrains.kotlin.android' version '1.7.20' apply false
- id 'org.jetbrains.kotlin.plugin.serialization' version '1.7.20' apply false
- id 'org.jetbrains.kotlin.jvm' version '1.7.20' apply false
+ id 'com.android.application' version '7.4.1' apply false
+ id 'com.android.library' version '7.4.1' apply false
+ id 'org.jetbrains.kotlin.android' version '1.8.10' apply false
+ id 'org.jetbrains.kotlin.plugin.serialization' version '1.8.10' apply false
+ id 'org.jetbrains.kotlin.jvm' version '1.8.10' apply false
}
\ No newline at end of file
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 72737b8..5a1584a 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
#Sat Dec 17 13:46:19 JST 2022
distributionBase=GRADLE_USER_HOME
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME