Skip to content

Release v1.0.3 #82

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Feb 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .idea/kotlinc.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/misc.xml

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

35 changes: 20 additions & 15 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down Expand Up @@ -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
Expand All @@ -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'
}
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -27,15 +27,15 @@ fun AppNetworkImage(
transformations: List<Transformation> = 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,
Expand Down
14 changes: 7 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -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
}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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