Compose migration from beta-07 to 1.0
This commit is contained in:
parent
d86cbe75dd
commit
a559a24fa4
4 changed files with 24 additions and 24 deletions
|
|
@ -64,40 +64,40 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
composeOptions {
|
composeOptions {
|
||||||
kotlinCompilerExtensionVersion '1.0.0-beta07'
|
kotlinCompilerExtensionVersion '1.0.0'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'androidx.core:core-ktx:1.5.0'
|
implementation 'androidx.core:core-ktx:1.6.0'
|
||||||
implementation 'androidx.appcompat:appcompat:1.3.0'
|
implementation 'androidx.appcompat:appcompat:1.3.1'
|
||||||
implementation 'com.google.android.material:material:1.3.0'
|
implementation 'com.google.android.material:material:1.4.0'
|
||||||
|
|
||||||
// Android compose
|
// Android compose
|
||||||
implementation "androidx.compose.ui:ui:1.0.0-beta07"
|
implementation "androidx.compose.ui:ui:1.0.0"
|
||||||
// Tooling support (Previews, etc.)
|
// Tooling support (Previews, etc.)
|
||||||
implementation "androidx.compose.ui:ui-tooling:1.0.0-beta07"
|
implementation "androidx.compose.ui:ui-tooling:1.0.0"
|
||||||
// Foundation (Border, Background, Box, Image, Scroll, shapes, animations, etc.)
|
// Foundation (Border, Background, Box, Image, Scroll, shapes, animations, etc.)
|
||||||
implementation "androidx.compose.foundation:foundation:1.0.0-beta07"
|
implementation "androidx.compose.foundation:foundation:1.0.0"
|
||||||
// Material Design
|
// Material Design
|
||||||
implementation "androidx.compose.material:material:1.0.0-beta07"
|
implementation "androidx.compose.material:material:1.0.0"
|
||||||
// Material design icons
|
// Material design icons
|
||||||
implementation "androidx.compose.material:material-icons-core:1.0.0-beta07"
|
implementation "androidx.compose.material:material-icons-core:1.0.0"
|
||||||
implementation "androidx.compose.material:material-icons-extended:1.0.0-beta07"
|
implementation "androidx.compose.material:material-icons-extended:1.0.0"
|
||||||
// Integration with activities
|
// Integration with activities
|
||||||
implementation "androidx.activity:activity-compose:1.3.0-alpha08"
|
implementation "androidx.activity:activity-compose:1.3.0"
|
||||||
// Integration with ViewModels
|
// Integration with ViewModels
|
||||||
implementation "androidx.lifecycle:lifecycle-viewmodel-compose:1.0.0-alpha05"
|
implementation "androidx.lifecycle:lifecycle-viewmodel-compose:1.0.0-alpha07"
|
||||||
// Integration with observables
|
// Integration with observables
|
||||||
implementation "androidx.compose.runtime:runtime-livedata:1.0.0-beta07"
|
implementation "androidx.compose.runtime:runtime-livedata:1.0.0"
|
||||||
// ConstraintLayout
|
// ConstraintLayout
|
||||||
implementation "androidx.constraintlayout:constraintlayout-compose:1.0.0-alpha07"
|
implementation "androidx.constraintlayout:constraintlayout-compose:1.0.0-beta02"
|
||||||
|
|
||||||
// Google sign in.
|
// Google sign in.
|
||||||
implementation "com.google.android.gms:play-services-auth:19.0.0"
|
implementation "com.google.android.gms:play-services-auth:19.2.0"
|
||||||
|
|
||||||
// Paging
|
// Paging
|
||||||
implementation "androidx.paging:paging-compose:1.0.0-alpha09"
|
implementation "androidx.paging:paging-compose:1.0.0-alpha12"
|
||||||
|
|
||||||
// RetroFit & Gson for webservice call
|
// RetroFit & Gson for webservice call
|
||||||
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
|
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
|
||||||
|
|
@ -114,7 +114,7 @@ dependencies {
|
||||||
|
|
||||||
// Test
|
// Test
|
||||||
testImplementation 'junit:junit:4.13.2'
|
testImplementation 'junit:junit:4.13.2'
|
||||||
androidTestImplementation "androidx.compose.ui:ui-test-junit4:1.0.0-beta07"
|
androidTestImplementation "androidx.compose.ui:ui-test-junit4:1.0.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
static def generateVersionCode() {
|
static def generateVersionCode() {
|
||||||
|
|
|
||||||
|
|
@ -28,8 +28,8 @@ class BooksViewModel : ViewModel(), IBooksViewModel {
|
||||||
private val client: IBibLibClient by inject()
|
private val client: IBibLibClient by inject()
|
||||||
private val apiCache: IAPICacheRepository by inject()
|
private val apiCache: IAPICacheRepository by inject()
|
||||||
|
|
||||||
private val formatter_long = SimpleDateFormat("MMMM yyyy", Locale.getDefault())
|
private val formatterLong = SimpleDateFormat("MMMM yyyy", Locale.getDefault())
|
||||||
private val formatter_short = SimpleDateFormat("MMM yyyy", Locale.getDefault())
|
private val formatterShort = SimpleDateFormat("MMM yyyy", Locale.getDefault())
|
||||||
|
|
||||||
private val _state = MutableLiveData<IBooksViewModel.State>(IBooksViewModel.State.Initial)
|
private val _state = MutableLiveData<IBooksViewModel.State>(IBooksViewModel.State.Initial)
|
||||||
override val state: LiveData<IBooksViewModel.State> get() = _state
|
override val state: LiveData<IBooksViewModel.State> get() = _state
|
||||||
|
|
@ -112,7 +112,7 @@ class BooksViewModel : ViewModel(), IBooksViewModel {
|
||||||
date = if (releaseDate.time < 0) {
|
date = if (releaseDate.time < 0) {
|
||||||
null
|
null
|
||||||
} else {
|
} else {
|
||||||
formatter_long.format(releaseDate).capitalize(Locale.getDefault())
|
formatterLong.format(releaseDate).capitalize(Locale.getDefault())
|
||||||
},
|
},
|
||||||
isNew = isNew,
|
isNew = isNew,
|
||||||
)
|
)
|
||||||
|
|
@ -126,7 +126,7 @@ class BooksViewModel : ViewModel(), IBooksViewModel {
|
||||||
date = if (releaseDate.time < 0) {
|
date = if (releaseDate.time < 0) {
|
||||||
null
|
null
|
||||||
} else {
|
} else {
|
||||||
formatter_short.format(releaseDate).capitalize(Locale.getDefault())
|
formatterShort.format(releaseDate).capitalize(Locale.getDefault())
|
||||||
},
|
},
|
||||||
series = series?.name,
|
series = series?.name,
|
||||||
description = synopsis ?: "",
|
description = synopsis ?: "",
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@ buildscript {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:7.0.0-beta01'
|
classpath 'com.android.tools.build:gradle:7.0.0'
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.32"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.10"
|
||||||
|
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
// in the individual module build.gradle files
|
// in the individual module build.gradle files
|
||||||
|
|
|
||||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
|
|
@ -1,6 +1,6 @@
|
||||||
#Wed Apr 28 21:29:33 CEST 2021
|
#Wed Apr 28 21:29:33 CEST 2021
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue