Skip to content

Commit

Permalink
Updated dependency versions. Compiled to run on Android Studio, Bumbl…
Browse files Browse the repository at this point in the history
…ebee 2021.1.1 Canary 1
  • Loading branch information
Johann Blake committed May 19, 2021
1 parent a84e479 commit 0e1211f
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 30 deletions.
18 changes: 9 additions & 9 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ android {
}
composeOptions {
kotlinCompilerExtensionVersion compose_version
kotlinCompilerVersion '1.4.31'
kotlinCompilerVersion '1.4.32'
}
}

Expand All @@ -45,11 +45,11 @@ dependencies {
def lifecycle_version = "2.4.0-alpha01"
def activity_version = "1.3.0-alpha07"
def retrofit_version = "2.9.0"
def paging_version = "3.0.0-rc01"
def paging_version = "3.0.0"

implementation 'androidx.core:core-ktx:1.6.0-alpha01'
implementation 'androidx.appcompat:appcompat:1.3.0-rc01'
implementation 'com.google.android.material:material:1.4.0-alpha02'
implementation 'androidx.core:core-ktx:1.6.0-beta01'
implementation 'androidx.appcompat:appcompat:1.4.0-alpha01'
implementation 'com.google.android.material:material:1.4.0-beta01'
implementation "androidx.activity:activity-ktx:$activity_version"
implementation "androidx.activity:activity-compose:$activity_version"
implementation "androidx.compose.ui:ui:$compose_version"
Expand All @@ -60,7 +60,7 @@ dependencies {
implementation "androidx.compose.foundation:foundation:$compose_version"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version"
implementation 'androidx.lifecycle:lifecycle-viewmodel-compose:1.0.0-alpha04'
implementation 'androidx.lifecycle:lifecycle-viewmodel-compose:1.0.0-alpha05'
implementation project(':navigation')

// Retrofit
Expand All @@ -71,9 +71,9 @@ dependencies {

// Paging
implementation "androidx.paging:paging-runtime:$paging_version"
implementation "androidx.paging:paging-compose:1.0.0-alpha08"
implementation "androidx.paging:paging-compose:1.0.0-alpha09"

// Coil
implementation "io.coil-kt:coil:1.1.1"
implementation "dev.chrisbanes.accompanist:accompanist-coil:0.6.2"
implementation "io.coil-kt:coil:1.2.1"
implementation "com.google.accompanist:accompanist-coil:0.10.0"
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package dev.wirespec.adoptme.ui.components

import androidx.compose.foundation.Image
import androidx.compose.foundation.clickable
import androidx.compose.foundation.horizontalScroll
import androidx.compose.foundation.layout.*
Expand All @@ -8,7 +9,7 @@ import androidx.compose.runtime.*
import androidx.compose.ui.Modifier
import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.unit.dp
import dev.chrisbanes.accompanist.coil.CoilImage
import com.google.accompanist.coil.rememberCoilPainter
import dev.wirespec.adoptme.da.web.PetsLargeImagesPath
import dev.wirespec.adoptme.da.web.PetsThumbnailImagesPath
import dev.wirespec.adoptme.models.PetListItemInfo
Expand All @@ -21,13 +22,15 @@ fun ImageGallery(pet: PetListItemInfo, modifier: Modifier = Modifier) {
modifier = modifier
.fillMaxWidth()
) {
CoilImage(
data = PetsLargeImagesPath + pet.id + "-" + selectedThumbnailNumber + ".jpg",
contentDescription = "",
Image(
painter = rememberCoilPainter(
PetsLargeImagesPath + pet.id + "-" + selectedThumbnailNumber + ".jpg",
fadeIn = true
),
contentDescription = null,
modifier = modifier
.fillMaxWidth()
.requiredHeight(400.dp),
fadeIn = true,
contentScale = ContentScale.Crop
)

Expand All @@ -47,16 +50,18 @@ fun ImageGallery(pet: PetListItemInfo, modifier: Modifier = Modifier) {
.requiredHeight(100.dp)
) {

CoilImage(
data = PetsThumbnailImagesPath + pet.id + "-" + i + ".jpg",
contentDescription = "",
Image(
painter = rememberCoilPainter(
PetsThumbnailImagesPath + pet.id + "-" + i + ".jpg",
fadeIn = true
),
contentDescription = null,
modifier = modifier
.width(90.dp)
.height(90.dp)
.clickable {
selectedThumbnailNumber = i
},
fadeIn = true,
contentScale = ContentScale.Fit
)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package dev.wirespec.adoptme.ui.screens.petslist

import androidx.compose.foundation.Image
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.*
import androidx.compose.material.Text
Expand All @@ -8,7 +9,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.unit.dp
import dev.chrisbanes.accompanist.coil.CoilImage
import com.google.accompanist.coil.rememberCoilPainter
import dev.wirespec.adoptme.da.web.PetsThumbnailImagesPath
import dev.wirespec.adoptme.models.PetListItemInfo

Expand Down Expand Up @@ -48,18 +49,19 @@ fun PetGridRow(
.requiredWidth((colWidth - 1).dp)
.requiredHeight((colWidth - 1).dp)
) {
CoilImage(
data = "$PetsThumbnailImagesPath${pet.id}-1.jpg",
contentDescription = "",
Image(
painter = rememberCoilPainter(
"$PetsThumbnailImagesPath${pet.id}-1.jpg",
fadeIn = false
),
contentDescription = null,
modifier = modifier
.fillMaxSize()
.clickable {
onItemClick(pet)
},
fadeIn = false,
contentScale = ContentScale.Fit,

)
contentScale = ContentScale.Fit
)

Row(modifier = modifier.padding(top = 110.dp)) {
Text(
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
compose_version = '1.0.0-beta05'
compose_version = '1.0.0-beta07'
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.0-alpha15'
classpath 'com.android.tools.build:gradle:7.1.0-alpha01'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.32'

// NOTE: Do not place your application dependencies here; they belong
Expand Down
2 changes: 0 additions & 2 deletions navigation/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ android {
defaultConfig {
minSdkVersion 21
targetSdkVersion 30
versionCode 1
versionName "1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
Expand Down

0 comments on commit 0e1211f

Please sign in to comment.